[Ffmpeg-devel] mpeg transport streams

Luca Abeni lucabe72
Fri May 27 14:10:29 CEST 2005


Hi M?ns,

On Fri, 2005-05-27 at 13:06, M?ns Rullg?rd wrote:
> Luca Abeni <lucabe72 at email.it> writes:
> 
> >> Once the PCR is there (the patch adds it apparently) it might be good 
> >> enough (tm)
> > I do not think so... In my experience, even if the PCR field is
> > correctly filled the mpegts muxer will still produce streams that cause
> > buffer overruns/underruns in most set-top-boxes (this problem is not
> > visible using a software player, because it generally has larger
> > buffer).
> 
> At least one STB I've used ignores the PCR entirely.
This is not so uncommon... I have some DVB-T set-top-boxes at work, and
some time ago I used a DVB-T local loop to test the TS generated by
ffmpeg... It turned out that about 50% of the receivers did not care
about the PCR (!!!). 

>  Instead it has
> another peculiarity.  I requires the video stream to be about 100 ms
> ahead of the audio
Yes this is the big problem... My understanding is that the amount of
data that the decoder has to buffer is proportional to the difference
between the audio and the video pts (if we want to play audio and video
in synch, of course). So, if this difference is too big the decoder will
experience a buffer overflow and skip some video frames (if it uses the
audio clock as master clock), disable the audio, or show some
audio/video artifacts. (if the decoder really uses the PCR, what matters
is the difference between pts and PCR). In my experience, the "100ms"
value depends on the video and audio bitrate.

> BTW, how are other TS muxers faring these days?  Has anyone tried VLC
> recently?
I just quickly tried it some weeks ago, but a philips DTR6600 DVB-T
receiver did not like the generated TS.

Instead, if I use ffmpeg + the mpegtsenc patches (ermmm... hacks :) that
I sent to the list about 1 year ago and I add the PCR (based on real
time) before sending the TS in the DVB-T local loop, most of the DVB-T
receivers I tried are quite happy :).

				Luca
-- 
_____________________________________________________________________________
Copy this in your signature, if you think it is important:
                               N O    W A R ! ! !





More information about the ffmpeg-devel mailing list