Reply
Thread Tools
Posts: 9 | Thanked: 8 times | Joined on Feb 2010
#1
Hello,

FIFA World Cup 2010 is coming:

Since the time in South Africa is the same as the time in Finland, I realized that there will probably be some games played while I'm still at work. I did not want to miss those games so I decided to set up my ubuntu 10.04 desktop to stream the dvb-t channels so that I can watch the games whenever I like (at work).

There are of course internet services providing streams of the games, but where is the fun in using those?

Here is how I got the n900 and my ubuntu 10.04 desktop to play together:

I have a Cinergy T2 usb dvb-t receiver connected to my desktop and I use cvlc (command line vlc) to transcode a dvb-t channel on the fly to my local network. An Openssh server running on the desktop is also required.

SSH is used to provide a safe way to connect to the desktop from a remote location.

mplayer on n900 is used to view the stream.

1. Open a ssh connection from your n900 to your desktop

ssh -p 22 -L 1234:localhost:1234 username@yourip

2. Start the streaming from dvb-t stick:

Below you have two command line examples to get the streaming started. The examples are for two finnish dvb-t channels that are showing the games.

Run the command(s) on ssh command prompt (or create bash scripts and run those):

Finnish channel YLE TV1:
Code:
cvlc dvb:// :dvb-adapter=0 :dvb-inversion=2 :dvb-bandwidth=8 :dvb-fec=2 :dvb-modulation=64 :dvb-transmission=8 :dvb-guard=8 :dvb-hierarchy=-1 :dvb-frequency=562000000 :dvb-srate=304 --program=17 --sout="#transcode{vcodec=h264,vb=300,scale=0.5,acodec=mp3,ab=32,channels=1,samplerate=44100, venc=x264}:std{access=http,mux=ts,dst=0.0.0.0:1234}"
or

Finnish channel YLE TV2:
Code:
cvlc dvb:// :dvb-adapter=0 :dvb-inversion=2 :dvb-bandwidth=8 :dvb-fec=2 :dvb-modulation=64 :dvb-transmission=8 :dvb-guard=8 :dvb-hierarchy=-1 :dvb-frequency=562000000 :dvb-srate=304 --program=33 --sout="#transcode{vcodec=h264,vb=300,scale=0.5,acodec=mp3,ab=32,channels=1,samplerate=44100, venc=x264}:std{access=http,mux=ts,dst=0.0.0.0:1234}"
3. Watch the stream on n900 with mplayer:

open a new terminal on n900 and run mplayer:

mplayer http://localhost:1234

Note that it takes some time for mplayer to open the stream, so wait patiently for at least 30-60 seconds.

Things you should know about this experimental set up:
- I have only tested this setup on n900 that is connected to the internet using wlan.
- mplayer on n900 seems to drop the stream quite often, so if you really want to watch the games at work, instead of n900 use a desktop or a laptop that has internet connection and vlc player and ssh-client installed.

<edit>
After a bit more experimenting it is clear that n900 mplayer drops the stream way too often and it is almost unusable for this purpose.

Fortunately there is a vlc player for n900 in development. Vlc installation files can be downloaded from:

http://www.remlab.net/files/vlc/fremantle/

- installation: dpkg -i <filename>

The development version of vlc works very well for watching the stream. To run vlc (instead of mplayer) to watch the stream on n900:

vlc http://localhost:1234

</edit>

Regards,
propelli

Last edited by propelli; 2010-06-05 at 06:41. Reason: added more information
 

The Following 6 Users Say Thank You to propelli For This Useful Post:
Posts: 45 | Thanked: 45 times | Joined on Jul 2010 @ Berlin
#2
Just some more information about the command line parameters, especially for Germany, Berlin:

Check the existing channels.conf for Berlin
http://www.vdr-wiki.de/wiki/index.ph...in-Brandenburg

There are the DVB-T parameters needed for vlc:

--dvb-frequency in Hz

This is the third parameter of channels.conf * 1000.

--program number

This is the fourth parameter from the end.

For example:

Code:
Das Erste;ARD:522000:I999B8C23D12M16T8G8Y0:T:27500:
1401:1402=ger:1404:0:14:8468:258:0
--dvb-frequency=522000000
--program=14

Here is a the vlc command to stream ARD:

Code:
cvlc -vvv dvb:// :dvb-adapter=0 --dvb-frequency=522000000 \
--dvb-bandwidth=8 --program=14 \
--sout="#transcode{vcodec=h264,vb=400,width=512,height=288}\
:std{access=http,mux=ts,dst=0.0.0.0:1234/stream}"
vb=400 is the bitrate. The performance of your computer decides if you can choose better parameters.

Tunnel port 1234 through ssh.

Code:
ssh -L1234:localhost:1234 username@yourIP
On the N900 command line receive the stream:

Code:
cvlc http://localhost:1234/stream
 

The Following 2 Users Say Thank You to TorstenT For This Useful Post:
Posts: 3,464 | Thanked: 5,107 times | Joined on Feb 2010 @ Gothenburg in Sweden
#3
damn cant get it to work seems related to ssh it just displays the screen at my mediabox screen instead of my N900.

I dont know if its related to X11Foreard or what the problem is...

hmm just came up with a new idea why do I need to login via localhost/ssh would it be possible to setup a TCP link instead vlc://workstationip:1234 hmm need to check

Last edited by mikecomputing; 2010-08-13 at 20:50.
 
Posts: 45 | Thanked: 45 times | Joined on Jul 2010 @ Berlin
#4
Originally Posted by mikecomputing View Post
damn cant get it to work seems related to ssh it just displays the screen at my mediabox screen instead of my N900.

I dont know if its related to X11Foreard or what the problem is...

hmm just came up with a new idea why do I need to login via localhost/ssh would it be possible to setup a TCP link instead vlc://workstationip:1234 hmm need to check
You can try to find the problem step by step.

1. Start VLC on your computer and check if it is running.

Code:
netstat -platn
Netstat should display that your VLC is listening to port 1234.

2. Check VLC on the same computer and connect to localhost port 1234.

3. If this works then try to connect from the N900 directly to your computer with

Code:
cvlc http://<IPaddressOfComputer>:1234/stream
4. If this works then you can try the ssh tunnel.
 

The Following User Says Thank You to TorstenT For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 06:08.