[FFmpeg-devel] [bug/patch] MPEG-TS muxer: PCR not in sync withPTS/DTS

Alexandre Ferrieux alexandre.ferrieux
Wed Oct 21 10:20:45 CEST 2009


Mike Scheutzow wrote:
> Alexandre Ferrieux wrote:
>>>>
>>>> ffmpeg.r20212vbr -i file.wav -vn -ar 44100 file.ts
>>>>
>  >> ...
>>> Could you try this regression between the unpatched ffmpeg and the 
>>> version 4?
>>
>> Yes. Results below (20212 == unpatched) for the stereo file (ab) above:
>>
>>      ab.20212.ts:    delta PCR == 342432 -> very jerky
>>      ab.20212vbr.ts: delta PCR == 19890  -> no sound
>>      ab.19754vbr.ts: delta PCR == 182975 -> perfect
>>
>> -Alex
> 
> Alex,
> 
> It looks to me like the the first entry ("very jerky") is the closest to 
> being correct. If the clip is 4.8 seconds, it should give a delta of 
> about 430000 (= 4.8 * 90000).

Oh, thanks for pointing that out. I now realize that all the PCR values I am displaying are actually the high 32 bits of 
the 33 (for obvious convenience reasons), so they are scaled by 1/2. IOW, they stick to a 45kHz clock.

In that corrected view, the one that is closest to truth is 182975 (corresponding to 4.06 seconds).
(which is consistent with the fact that it plays perfectly !)

As to the missing ~0.7s, I notice that by running ffmpeg -i again on any of the three generated TS, I get:

   Duration: 00:00:04.78, start: 0.700000, ...

This "start 0.7" seems to account for the missing delta PCR. No idea where it comes from though.

-Alex



More information about the ffmpeg-devel mailing list