[FFmpeg-devel] mpeg2ts/udp --> broken display by set-top-box

Måns Rullgård mans
Thu Jan 22 01:55:55 CET 2009

Baptiste Coudurier <baptiste.coudurier at gmail.com> writes:

> Hi,
> Alexandre FERRIEUX - FT/RD/SIRP/ASF/SOFTL wrote:
>> Hi,
>> I am now using ffmpeg to stream video to a set-top-box:
>> ./ffmpeg -i 134.wmv -vcodec mpeg2video -acodec mp2 -f mpegts 
>> udp://HOST:PORT\?pkt_size=1316
>> What I see on the TV is a sequence of chunks of correct video and 
>> (somewhat shorter) correct sound.
>> Of course I first thought about a problem in the bitstream or TS muxer, 
>> but... if I receive the same UDP flow and concatenate the contents in a 
>> .ts file, that file is played perfectly by mplayer/ffplay/vlc.
> Well, if the generated TS plays fine, this might indicate the TS is
> somehow correct.

The TS playing on a PC means very little.  It could still be
overflowing buffers on the STB.  I've been down that road.  One thing
to watch out for is STBs that don't use the PCR, instead using the
audio timestamps as reference.  Keeping the video DTS about 80 ms
ahead of the audio DTS in the stream sometimes helps with these

M?ns Rullg?rd
mans at mansr.com

More information about the ffmpeg-devel mailing list