[FFmpeg-devel] Fwd: Fwd: libavformat/segment : add option to increment timecode
Stefano Sabatini
stefasab at gmail.com
Tue Feb 23 19:41:55 CET 2016
On date Friday 2016-02-19 14:04:12 +0100, Martin Vignali encoded:
> 2016-02-15 2:35 GMT+01:00 Stefano Sabatini <stefasab at gmail.com>:
[...]
> > > + err = av_timecode_init_from_string(&tc, rate,
> > tcr->value, s);
> > > + if (err < 0) {
> > > + av_log(s, AV_LOG_WARNING, "Could not increment
> > timecode, error occured during timecode creation.");
> > > + break;
> > > + }
> >
> > > + tc.start += (int)
> > av_q2d(av_mul_q(av_make_q(seg->time, 1000000 ), rate));/* increment
> > timecode */
> >
> > nit: 1000000_) => 1000000)
> >
> > Also, reading from the timecode.c code it looks like the increment
> > must be expressed in fps units.
> >
>
> Sorry don't understand what's wrong now. In my tests, the timecode
> incrementation is correct (but maybe i missed a special case)
Not necessarily a problem, assuming the fps is consistent with the
rate.
> > Finally, you are using the segment->time, which is different from the
> > effective segment duration. Could you set the metadata in segment_end,
> > where the exact duration is known?
> >
>
> Do you know how can i get the exact segment duration ?
What about setting the metadata when you're *closing* the segment
(e.g. in segment_end())?
This way you can know the exact duration.
--
FFmpeg = Fancy and Fantastic Mastodontic Picky Evanescent Gigant
More information about the ffmpeg-devel
mailing list