[FFmpeg-devel] Short last frame with movenc

Michael Niedermayer michaelni at gmx.at
Fri Sep 21 04:12:51 CEST 2012

On Thu, Sep 20, 2012 at 04:41:51PM +0100, Al Crate wrote:
> Hi, I`m trying to encoded a prores movie into a mov container.
> This works fine with
> time_base.den = 24
> time_base.num = 1
> But if I try
> time_base.den = 600
> time_base.num = 25
> I get problems with moveenc setting the duration of the last frame
> to 1, instead of 25.
> It looks like oformat->write_header() which is called in
> avformat_write_header is setting the AVStream time_base to 600:1
> instead of 600:25.
> Can some one reproduce this, I did a packet dump and the durations
> are all 0.0002, whereas using 24/1 they come out with the correct
> duration of 0.042.
> Oddly the pts and dts values look right.
> Any help would be much appreciated, the odd time_base values are for
> Final Cut Pro (yeah right) compatability.

hmm, if you want to debug this, look first at if the AVPacket.duration
is set correct for what the mov muxer (movenc.c) gets
then if that is correct check if / where it gets lost on its way
to the stts storing code

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

When the tyrant has disposed of foreign enemies by conquest or treaty, and
there is nothing more to fear from them, then he is always stirring up
some war or other, in order that the people may require a leader. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120921/d9fbe99f/attachment.asc>

More information about the ffmpeg-devel mailing list