[FFmpeg-devel] [PATCH] ffmpeg: drop format specific stream copy heuristics

Clément Bœsch u at pkh.me
Tue Sep 6 17:43:21 EEST 2016


On Tue, Sep 06, 2016 at 11:32:24AM -0300, James Almer wrote:
> On 9/6/2016 9:57 AM, Clément Bœsch wrote:
> >> We don't have time_base in codecpar, so why do we need ticks per frame in it?
> >> > 
> >> > Which time_base does it modify the interpretation of? The field should
> >> > be bundled with that, then.
> > When do we have a mismatch of st->time_base and that "codec time base"?
> 
> st->time_base can be anything. Matroska for example is always 1/1000,
> and mpegps 1/90000.
> "Codec time_base" seems to be codec frame_rate * ticks_per_frame, so
> usually the same as frame_rate, except for codecs like h264 and mpeg2
> where it's twice that.

But you could deduce one from another if you have ticks per frame? That
means we could have only AVStream.{time_base,ticks_per_frame} and we will
be able to deal with all the situations were lavf/mux* need such info, and
thus not need to transmit anything in AVCodecParameters?

-- 
Clément B.


More information about the ffmpeg-devel mailing list