[Libav-user] Encoding with variable frame rate
stebbins at jetheaddev.com
Tue May 21 19:20:38 CEST 2013
On 05/21/2013 10:02 AM, Paul B Mahol wrote:
> On 5/21/13, Brad O'Hearne <brado at bighillsoftware.com> wrote:
>> On May 21, 2013, at 9:34 AM, Kalileo <kalileo at universalx.net> wrote:
>>>> 1. Does FFmpeg support variable frame rate, or not?
>>> ffmpeg gives you the tools to handle it. Don't mix statements about ffmpeg
>>> command line tool with what you can do with the ffmpeg libraries.
>> Does FFmpeg support variable frame rate? If yes, let's take the specific
>> example of setting time_base.den to 30 fps. How do I send 15 fps to the
>> encoder and ensure accurate playback timing? No theory -- specifics please.
>> I'm not arguing, I'm not calling you wrong, I'm not making platitudes about
>> or branding ffmpeg. I've got code that for months showed me something
>> different and I'm trying to work that out. If you are saying that I should
>> be able to send 15fps at an encoder with time_base.den set to 30, and
>> correct it by setting pts to 1, 3, 5, 7, etc. i.e. every other frame, then
>> I'll construct that case and test it. Is that what you are saying, or
>> something different?
> Something like that, but also AVPacket.duration of each packet should
> be set in AVPacket.time_base units
>>> You might want to study the basic old example of a player written using
>>> the ffmpeg libraries by Dranger. Seriously.
>> Spent hours with it over months past. That resource, and a few other,
Hmm, I've recently started an effort to use libav for muxing in HandBrake.
HandBrake does variable framerate encoding by default. I haven't seen any synchronization issues as of yet (in mplayer
or vlc). As a test, I just ran the worst variable rate sample I have through this new code and don't see any problems
from beginning to end. My sample is a DVD that switches constantly between film and ntsc rates. Do any of you have
variable rate sources that you can demonstrate this problem with? I would be glad to test them.
John GnuPG fingerprint: D0EC B3DB C372 D1F1 0B01 83F0 49F1 D7B2 60D4 D0F7
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 490 bytes
Desc: OpenPGP digital signature
More information about the Libav-user