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

Mike Versteeg mike at mikeversteeg.com
Thu Dec 20 11:18:56 CET 2012


>> the audio clock. But I have since learned (offline) that this is not
>> possible as indeed the video PTS, at least for MPEG-2, increments as
>> integer (0, 1, 2, ...). There's no fiddling with it.  So short of
>
> Can't you set the video's time scale such that an integer increment corresponds to an amount of real time that's relevant to your situation?

No. The MPEG-2 encoder seems very picky (possibly part of the
protocol) when it comes to that. In fact a time base other than 1/25
or 1/30 and it either returns an error or smacks me with an AV. Won't
even do 29.97 fps or 50 or 60 fps.

> Of course I know next to nothing about libav O:^)

I've been using it for about a year and still feel I know nothing
about it. It requires a lot of dedication, surfing and reading to get
comfortable with it. Great code though, and (mostly) free.

Mike


More information about the Libav-user mailing list