Monday, December 19, 2011

Streaming using DVB Dream

DVB Dream is one of the finest ways to watch digital satellite, terrestrial or cable tv on your computer. It can also used as a streaming server. This is very convenient when you want to watch TV over nertwork. It is very easy to use it in local network (LAN). When you try to use it over internet there are some problems including bandwidth limitation.

What do you need:
Some kind of DVB tuner (DVB-T, DVB-S or DVB-C) with BDA driver support.
DVB Dream (www.dvbdream.org)
VLC player (www.videolan.org)

Install the DVB tuner and run DVB Dream. Please see DVB Dream online documentation if you have any problems installing it or searching for new channels.
After you successfully installed and started DVB Dream it is time to install VLC player. VLC player is a cross platform multimedia player which can chew almost any video file you could imagine.
Beside this it can be used to transcode the fideo file or stream that it is playing. This is very useful if you want to stream high quality video stream over internet. Since upload speeds are usually limited you will need to recompress the video stream. Average video stream (satellite or DVB-T) usually takes some 5 Mbits per second. If you have such internet upload connection you can looselesly stream it. If your connection is eg. 1Mbit then you will need to recompress the video. This can be done by reducing the resolution and bitrate.


After you install all the necesary software it is time to make the correct settings.

Run DVB Dream and tune to desired channel.

Go to Options / Preferences / LAN
Check the ticker Active, you can leave all other things as they are.

Now go to Options / Preferences / Integration
Path field indicates the location of VLC installation. Usualy it can be left as it is. Otherwise change it.

The most important setting is in command line:
udp://@ :sout=#transcode{vcodec=h264,vb=650,scale=0.75,acodec=mp3,ab=64,channels=1,samplerate=44100}:http{mux=ts,dst=:8085/}

I won't go into details here. This are the settings which are functioning very well with 1Mbit upload speed.
vcodec indicated that we will be using h264 for streaming, scale scales the resoulution by 0.75 and vb tell us the bitrate we will be using for streaming.
The most important setting is at the end of line. dst=:PORT_NUMBER
This indicates which port will be used for streaming. You will have to open this port on your Router / Firewall / NAT and direct it to the computer running the VLC.

After you have done all this, you have to run the streaming by selecting Tools / VLC. After you do it, VLC will start and it will automatically start streaming the channel you are watching.

In remote location you can start the stream by starting VLC, and opening a network stream http://your_home_ip_address:PORT_NUMBER.