[Libav-user] How to perform drift compensation in MPEG-2 recorder

Mike Versteeg mike at mikeversteeg.com
Wed Dec 19 16:27:15 CET 2012

>> Either one can be used as master clock for the recorder. But I cannot sync both clocks with each other if that's what you mean.
> Yes you can! You should set the PTS for the video stream according to
> the audio clock, that's it. I believe that you can know the audio
> clock by counting the audio packets.

I can't as this would introduce double/missing frames, which is
unacceptable for my app.

I guess what I want is not possible, so I have to resort to audio
resampling. Thanks everyone.


More information about the Libav-user mailing list