[FFmpeg-user] MPEG-TS PCR Accuracy over +-500ns
battistel at gmail.com
Tue Nov 26 11:34:57 CET 2013
> I have a problem using mpegts muxer, and I need your help.
> In order to get a better PCR accuracy ,I set -muxrate and use CBR .
> But PCR accuracy of MPEG-TS is still over +-500ns,about +-600ns~700ns.
> Is it a bug of ffmpeg？How can I keep PCR accuracy within +-500ns?
I've asked the same question some time ago (with no answer).
My problem was sending a transport stream (mpeg2, mp2) to an hardware
Using -muxrate I've been able to obtain about 20ms for PCR interval, which
is good enough to stay below 500ns of clock jitter.
Also forcing CBR is good (for some decoders mandatory) to reach the goal.
But that was not enough.
The steps that made the difference were:
1. specify -minbitrate too.
2. use -bufsize bigger than bitrate (in my case ~1.8 * bitrate).
3. set -muxrate value like bufsize (1.8 * bitrate).
This worked for me (decoder now works 24/7). Everything was very empirical
anyway, my guess is that a *real* constant bitrate for mpeg2 is not
possible to obtain.
Keep also in mind that different hw decoders may require different setting
(mine is Scopus).
More information about the ffmpeg-user