[Libav-user] Params that influence time scale/duration values in MOV muxer?

Thomas Worth dev at rarevision.com
Thu Dec 22 03:51:53 CET 2011

I posted this on the FFmpeg list, but got no reply. This is take two.

I'm having trouble controlling timing values written to MOV files.
Things like timescale and duration values written to the tracks differ
from what I'm supplying in the AVCodecContext timescale parameter. For
example, if I specify a timescale of 1000/25000 (i.e. 25.00 fps), the
track's stts atom still shows a sample duration of 1001. It should be
1000, as specified. The result is a 24.98 frame rate. I don't know
where the muxer is getting this 1001 value, but it must be copying it
from the input file since the input is 23.98 fps.

Ideally, I'd like to specify the exact values for the container's time
scale as well as each individual track. the codec context's timescale
struct clearly isn't enough to do this, so I think I'm missing
something. Any help would be greatly appreciated!

More information about the Libav-user mailing list