[FFmpeg-devel] [PATCH v1] lavf/img2enc: add support for option strftime_source

Jun Li junli1026 at gmail.com
Fri Apr 19 04:06:03 EEST 2019


On Wed, Apr 17, 2019 at 6:23 PM Carl Eugen Hoyos <ceffmpeg at gmail.com> wrote:

> 2019-04-18 2:02 GMT+02:00, Jun Li <junli1026 at gmail.com>:
> > On Wed, Apr 17, 2019 at 3:11 PM Carl Eugen Hoyos <ceffmpeg at gmail.com>
> wrote:
> >
> >> 2019-04-15 8:43 GMT+02:00, Jun Li <junli1026 at gmail.com>:
> >> > Currently the strftime option generate timestamp based on generation
> >> > time. The new option would calcualte timestamp from source's
> >> > start_realtime and pkt->pts, try to generate a timestamp matches the
> >> > source starting time.
> >>
> >> > diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
> >> > index 8349840c96..16bb143ca6 100644
> >> > --- a/libavformat/rtsp.c
> >> > +++ b/libavformat/rtsp.c
> >> > @@ -2253,6 +2253,7 @@ redo:
> >> >                                          (uint64_t)
> >> > rtpctx->st->time_base.num * 1000000,
> >> >
> >> > rtpctx->st->time_base.den);
> >> >                      }
> >> > +                    av_dict_set_int(&s->metadata, "start_realtime",
> >> > s->start_time_realtime, 0);
> >>
> >> Is this change related?
>
> > Thanks Carl for review !
>
> > Yes, it is related.
>
> But the change should be separate unless something gets broken.
>
> Carl Eugen
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".


Thanks Carl for review. Updated the version here:
https://patchwork.ffmpeg.org/patch/12805/
I re-thinked about the feature, it can be and should be separated into two
different tasks, one for img2 genrating timestamp from output timebase, the
other for passing input start_time_realtime to output. They actually donot
have direct connections.

Best Regards,
Jun


More information about the ffmpeg-devel mailing list