Log in

View Full Version : Any Tips for VLC x264 transcoding options for Live IPTV?


tevion21
15th May 2007, 10:43
Hello guys,

itīs my first post here at doom9 and my english is not so well. Iīm currently working on my Bachelor Thesis about IPTV. The practice part of this thesis is to built up an end-to-end live-tv streaming solution with my private limited infrastructure, which i want to show in the kolloquium.

Current solution:
My video source is a DVB-C Set-Top-Box with network interface (dBox2 - neutrino). This box send a TS with MPEG2 SD (PAL) resolution Video (about 3-6 Mbit/s bitrate) to my Streaming/Compression Server (neutrinoTV with VLC activeX plugin). At this point the server has to trancode the MPEG2 Stream to x264(/aac). The transcoded stream is loaded up through my internet gateway (512 Kbit/s Upload). At the other end of my chain, there is also an internet connected pc with VLC installed. This solution works! But there is still potential for optimizations regarding "video quality experience".



Problem:
The video is sometimes stuttering. I think this is because of packet loss during transmission. The stream has sometimes huge bitrate peaks (seen in etherreal analyzer and VLC "Media Info") that are higher than my 512 Kbit/s internet upload. In VLC (more correctly the VLC Option in neutrinoTV) iīm currently using the following parameter:
:http-caching=5000
:sout=#transcode{vcodec=h264,vb=300,scale=0.35,acodec=mp4a,ab=4,channels=1}:duplicate{dst=std{access=http,mux=ts,url=0..0.0.0:80}}
:sout-keep



Future solution:
I read these documents/threads:

http://vip.ics.uci.edu/publications/2002/pv2002.pdf

Can't achieve decent CBR
http://forum.doom9.org/showthread.php?t=125008&highlight=bufsize

Straight CBR mode
http://forum.doom9.org/showthread.php?t=122224&highlight=bufsize

Chapter 3. Advanced streaming using the command line
http://www.videolan.org/doc/streaming-howto/en/ch03.html

and come to the conclusion that i need something like CBR. Please forgive me, when iīm unprecisely and intermix some things at this point. This is new terain for me. I donīt know what is possible with x264 in my case. I think i donīt need strict CBR, but nearly CBR (letīs say mostly 400 Kbit/s in my case). Another option that i ask myself is to use Constraint VBR with a given maximum output bitrate (i.e. 400 Kbit/s). The transcoding module of VLC offer these parameter:
"You can use this module to transcode a stream, i.e. to change its codecs or the encoding bitrates. Some additional processing can be done during this process, such as re-scaling, deinterlacing, resampling, etc.
Available options are:
...
venc=
This allows to set the encoder to use to encode the videos stream. Available options are:
x264. x264 is a free open-source h264 encoder. h264 (or MPEG4-AVC) is a quite recent high quality video codec.
...
Item options are: keyint=<number of frames> allows to set the maximal amount of frames between 2 key frames, idrint=<number of frames> allows to set the maximal amount of frames between 2 IDR frames, bframes=<amount of frames> allows to set the amount of B frames between an I and a P frame, qp=<quantizer parameter> allows to specify a fixed quantizer (between 1 and 51), qp-max=<quantizer parameter> allows to set the maximum value for the quantizer, qp-min=<quantizer parameter> allows to set the minimum value for the quantizer, cabac enables the CABAC (Context-Adaptive Binary Arithmetic Coding) algorithm (slower, but enhances quality), loopfilter enables deblocking loop filter, analyse enables the analyze mode, frameref=<amount of frames> allows to set the number of previous frames used as predictors, scenecut=<sensibility< allows to control how aggressively the encoder should insert extra I-frame, on scene change."

I donīt need the ultimate and optimum tuning setting for best live-tv video quality experience. But i want to utilize my available upload bandwidth to improve video quality. Another point is, that with my current VLC settings, my AthlonXP 2,1GHz CPU has nearly 98% utilization at peaks. So i canīt use additional performance hungry options like CABAC, right!? Do you have any tips or ideas for me?

Thanks
Arthur