The simplest way to capture, record, stream or play a DVB-T signal on Linux
[ Download] [ Project Page ] [ Runtime Container ] [ JavaDoc ]
DVB is a new standard for transimition of digital video and audio.
DVB-T is its subset describing telestrial protocol transmission which
can be captured with regular TV antena. Many European countries
broadcast DVB-T signal in addition to the old analog TV signal which is
slowly being abadoned. By 2012 all EU countries are supposed to replace
the old analog broadcasting with DVB-T.
DVB format is very "user friendly" - it is an mpeg stream. As a result the simplest thing to do with it is to record it - one does not need to do any encoding, just store the data on a disk. Streaming is also very easy as most of the movie players directly understands the format. The only problem that has to be solved is management of the actual DVB card - e.g. tuning it, allowing multiple programs to read data from it (as it is usually possible to process about five or even more channels at one), scheduling recordings. This is the right job for DVB Central - it contains command line interface so it can run on a server, HTTP server for easy configuration via browser and for broadcasting video, it can record files to disk, it can multicast them to network using RTP, and much, much more.
After a half a year of development this project is ready to announce
the general availability of a working version ready for public consumption.
The version is running in a production environment (e.g. on my server at home, used
by my wife) and has been heavily tested by always demanding users (my wife
cannot understand that bugs are natural) and as such it seems to be ready for general
usage. That is why go on and download the new
binary release,
unzip it and execute bin/dvbcentral script.
It is necessary to have a config file in /etc/dvb/channels.conf,
$HOME/.mplayer/channels.conf or $HOME/.xine/channels.conf.
The format of the file should match the one used by mplayer, xine & co.
The possible arguments include --station name to tune the right
station, --stdout to send the TS mpeg stream to standard output,
--file name to save the stream to a given file and --rtp 224.0.1.2:5004
to broadcast the TS around local network. Very useful is also embeded execution
of other commands, so one can use for example
--exec -- mplayer - to send the data to mplayer embeded as an subprocess.
The important feature of the
application is that it can be started without any arguments, left running
and then started once again (or many times) with proper arguments. The
first instance is then going to act as a server and the other ones are going
to connect to it and give it proper instructions of what to do.
Certain libraries produced by this project can be easily incorporated into
other standalone java applications. Probably the most interesting one for
Java programmers that are interested in DVB is the
Frontend wrapper.
It is a set of classes wrapping native calls to Linux DVB
API.
The online javadoc of the Frontend library is available
here. To get the
library itself, download some
binary release
of DVB Central and pickup net-sf-dvbcentral.jar from it.
The library runs only on Linux as it uses a native wrapper to do
necessary ioctl calls. These calls are carefully wrapped
with the pure java classes like:
The DVB central is build in a modular way with a set of extensible
APIs and it is easy to extend its functionality by writing additional
components. The goal is to encourage other developers to extend the
dvbcentral's functionality with out extensions.
The general motivation and examples are given in
the NetBeans Runtime Container
manifesto page. However all one needs to do to easily start
developing against dvbcentral, is to download the
binary release and install it as a NetBeans
platform into
NetBeans IDE 5.5 or (better) 6.0.
| Build with and on top of NetBeans | Hosted on sourceforge.net |
|
|
|