Streaming tv signal to mobile phone

About encoding, codec settings, muxers and filter usage
ajocius
New Cone
New Cone
Posts: 5
Joined: 04 Mar 2010 13:33

Streaming tv signal to mobile phone

Postby ajocius » 04 Mar 2010 13:56

Hi, I am looking for optimal sout to stream live TV signal from satellite receiver to mobile phone.

My satellite receiver called Dreambox is on LAN and I am able to get stream from it on VLC. This stream is around 3200 kb/s and codec for video is mpgv, for audio - mpga. I am in Europe, TV signal is PAL, so it is 50 frames per second (although interlaced) and the size of each frame is 720 X 576.

VLC is extremely flexible on formats, which is great, but it leaves me with so many options that I do not know where to start testing :) I was hoping, that knowing source video dimentions and the target resolution, one can rule out some options. Like for example I do not think one needs more than 64kb/s one channel audio stream while watching on the phone. Stereo effect is difficult to hear anyway on the small device and loudspeakers are not that great to expect quality from them. I do also think that perhaps there might be logic for video encoding too. Phone screen is 800X480. It will probably be best to downsize original picture by 1,2. This should result in 600X480 video and therefore fit into screen (leaving black stripes on each side). Does that make sense? I have then tons of possible codecs , encapsulations, formats to choose. I am sure some of combo's are not suitable at all, some other probably not suitable for the target device.

Can someone advice me on what codec/encapsulation/format combo I can rule out from testing??? Any other advices to get optimal TV stream? By the way, I am working on three profiles: at home (WiFi speed), outside home, but on Wifi (lower speed depends on upload capabilities) and 3G mobile network.

ajocius
New Cone
New Cone
Posts: 5
Joined: 04 Mar 2010 13:33

Re: Streaming tv signal to mobile phone

Postby ajocius » 05 Apr 2010 10:44

so far the best souts I could come up with where:

For watching within WiFi
--sout #transcode{vcodec=MP4V,vb=3072,scale=0.8,acodec=mp3,ab=64,channels=1}:duplicate{dst=std{access=http,mux=asf,dst=192.168.1.126:8085}}

For watching outside Wifi
--sout#transcode{vcodec=h264,vb=220,acodec=mp3,ab=32,channels=1,width=320,height=196}:duplicate{dst=std{access=HTTP,mux=ASF,dst=192.168.1.126:8085}}

This was done via lots of testing and googling. I am sure there are other options to try. I am just curious what other codec/encapsulation I can try. I was following table of possible combinaitons here:
http://www.videolan.org/streaming-features.html

However, according to above table h264 codec is not working with ASF mux, but my example sout above works well... I therefore find it difficult to understand what works and what does not.

I see that many internet streaming are based on flash video these days. Is that the best way to go? Could not make it work so far... Any other combos?

Greendq
Blank Cone
Blank Cone
Posts: 18
Joined: 28 Sep 2009 12:52

Re: Streaming tv signal to mobile phone

Postby Greendq » 05 Apr 2010 18:59

Try
--sout='#transcode{venc=x264{profile=main,keyint=300,min-keyint=25,fps=25,bitrate=900},deinterlace,acodec=mp3,ab=48k,channels=1,samplerate=22050}:std{access=http,dst=0.0.0.0:8888/stream0.flv}'

ajocius
New Cone
New Cone
Posts: 5
Joined: 04 Mar 2010 13:33

Re: Streaming tv signal to mobile phone

Postby ajocius » 07 Apr 2010 12:49

thanks, what app and url should I use to open this flv stream on other pc then? I understand I would need to forward port 8888 to be able to open this stream from outside home, right?

simon272
Blank Cone
Blank Cone
Posts: 21
Joined: 07 Apr 2010 15:38
VLC version: 1.0.1
Operating System: FreeBSD
Contact:

Re: Streaming tv signal to mobile phone

Postby simon272 » 07 Apr 2010 23:34

About port - yes.
You can use VLC player or some web-base player (you can place it on the page of your site, like this http://alextv.zp.ua/live.html - uses http://www.longtailvideo.com/players/jw-flv-player). URL will looks like this: http://[ip_or_dns_name_of_vlc_server]:8888/stream0.flv
... Also I recommend you to use AAC as audio codec and 44100 as sample rate (choose from 44100, 22050, 11025 - they are FLV compatible ).
Kind regards!

ajocius
New Cone
New Cone
Posts: 5
Joined: 04 Mar 2010 13:33

Re: Streaming tv signal to mobile phone

Postby ajocius » 08 Apr 2010 10:48

This works!
My 2,8 GHz 2 GB RAM server is chocking however... Video looks like it is dropping some frames. Some jittering. Chacked CPU usage, it it above 90%, guess that is a bottleneck in my setup. Video quality looks great, however.

Where should I lower parameters (I understand this will lower the quality) to get smooth video? Website http://alextv.zp.ua/live.html seems to be runing on 256 kb/s stream. Does lowering video bitrate takes some weight from CPU??? I know that h264 codec is quite CPU hungry, but I loved quality... :)

Greg
Cone that earned his stripes
Cone that earned his stripes
Posts: 316
Joined: 24 Feb 2009 00:37

Re: Streaming tv signal to mobile phone

Postby Greg » 08 Apr 2010 13:38

The parameters you need to be looking at
vb=xx
ab=xx
fps=xx
The size, eg 320x240 or width=xx, height=xx

You might find this helpfull

http://wiki.videolan.org/Stream_VLC_to_ ... _and_Flash

h/x264 does chew up cpu power both on the server and client..! Method 2 without h264 (linux users example, works OK with Windows) may be better for phone/netbook etc. Experiment to find what works best for you.

ajocius
New Cone
New Cone
Posts: 5
Joined: 04 Mar 2010 13:33

Re: Streaming tv signal to mobile phone

Postby ajocius » 08 Apr 2010 18:36

Thank you, will do some more reading and testing. Have done quite a bit already :) I do have working stream, however finding "better" solution just by trying seems very long way to go. I thought there might be some logic in what is eating more CPU power or less. For example, reducing video frame size can be done by useing Scale as well as defining width and height parameters. Is any of these faster? My source signal is around 3-4 Mb/s 720X576 PAL (50i) . Will that be faster to reencode or better video result if I go for 25 fps, instead of 15? will it be faster to reencode to 360X288 (just divided by two ) instead of 320X240, in which case some original pixels will have to be "made rectangular" (due to proportion).

In other words, what makes sense to consider when transcoding video when you want to get less CPU load and/or better video quality ?

Greg
Cone that earned his stripes
Cone that earned his stripes
Posts: 316
Joined: 24 Feb 2009 00:37

Re: Streaming tv signal to mobile phone

Postby Greg » 08 Apr 2010 21:43

Well... as they say... "You can't have your cake and eat it"
At the risk of stating the obvious:
The more pixels that have to be processed, then the more bandwidth and cpu power you will need to maintain a given quality.
So, yes, keep your aspect ratio from source.
I would start by setting your target bandwidth ... sum of vb=xx and ab=xx and leave that fixed.
Reduce your pixel area step by step and reduce fps to the lowest acceptable for your required quality given the fixed ability of your hardware. Dont forget that the pixel area is width x height. IE 360x288 is a quarter of 720x576
Open the Messages box under Tools menu to give you an idea of how the transcode is coping with what you are asking of it.
From there on, you are juggling or optimising to suit your needs and constraints
The aforementioned wiki does briefly outline the idea and also introduces some insight as to problems and likely causes.

Good luck

keol
New Cone
New Cone
Posts: 1
Joined: 26 Apr 2010 20:15

Re: Streaming tv signal to mobile phone

Postby keol » 26 Apr 2010 21:17

Thank you, will do some more reading and testing. Have done quite a bit already :) I do have working stream, however finding "better" solution just by trying seems very long way to go. I thought there might be some logic in what is eating more CPU power or less. For example, reducing video frame size can be done by useing Scale as well as defining width and height parameters. Is any of these faster? My source signal is around 3-4 Mb/s 720X576 PAL (50i) . Will that be faster to reencode or better video result if I go for 25 fps, instead of 15? will it be faster to reencode to 360X288 (just divided by two ) instead of 320X240, in which case some original pixels will have to be "made rectangular" (due to proportion).

In other words, what makes sense to consider when transcoding video when you want to get less CPU load and/or better video quality ?
Hi ajocius,

May I ask how far you are with the testing, and how your setup is?
I also have a dreambox and would like to stream it to other devices, or maybe on my homepage

Regards,
keol

JCKnight
New Cone
New Cone
Posts: 2
Joined: 12 Aug 2010 03:58

Re: Streaming tv signal to mobile phone

Postby JCKnight » 20 Aug 2010 14:34

Well... as they say... "You can't have your cake and eat it"
At the risk of stating the obvious:
The more pixels that have to be processed, then the more bandwidth and cpu power you will need to maintain a given quality.
So, yes, keep your aspect ratio from source.
I would start by setting your target bandwidth ... sum of vb=xx and ab=xx and leave that fixed.
I upgraded my cable service and jitter problems eliminated now. Interesting that it was only a few dollars more per month. so you may need more bandwidth and might want to check with your internet provider.


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: Bing [Bot] and 15 guests