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

Luca Abeni lucabe72
Thu Jan 22 08:22:40 CET 2009


On Thu, 2009-01-22 at 00:55 +0000, M?ns Rullg?rd wrote:
> >> 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.

Me too ;-)
While I agree with Baptiste that in this specific case the problem might
just be the missing "-re" option, I also experienced buffer overflow
problems in the past (I mean, overflows in the receiving buffers of the
client). These were mainly due to bad interleaving of audio and video:
hardly noticeable with a software player, but very problematic with

Anyway, this night I took some time to look at the current situation. I
have no access to STBs anymore (I changed my job), but I tried to have a
look at the generated TSs. So, my conclusions might be wrong... In any
case, my impression is that the TS muxer generates a quite bad TS for
the first 20 or 30 seconds, then things start to be more reasonable. I
suspect the muxer currently relies on receiving constant bitrate video
(or, video without many variations in the bitrate)? At the beginning,
the codec's rate control is "not very stable", so the muxer seems to
have problems in correctly interleaving the video; but after the rate
control starts to work properly, the TS muxer seems to be able to
interleave the two ESs in a reasonable way.
I am not sure if this is completely correct, but various experiments I
repeated seem to confirm this theory...

Maybe setting a maxrate in the codec can help?


More information about the ffmpeg-devel mailing list