On Wed, 26 Aug 2020, Andreas Rheinhardt wrote:

Jesper Ek:
Hi,

I have implemented a libavdevice to capture audio and video from an AJA
Kona card (similar to decklink). I'm then using the HLS muxer to encode my
stream. Now I need the HLS EXT-X-PROGRAM-DATE-TIME tag to specify exactly
when the input source was recorded, so my plan is to forward the "wall
clock time" (from the avdevice implementation) to the hls muxer, and use
that instead of using system time (av_gettime()).

I cant use PTS, so what is the correct way to pass "wall clock time"
metadata for every frame to the HLS encoder?

I noticed that the decklink implementation uses
`av_packet_add_side_data(&pkt, AV_PKT_DATA_STRINGS_METADATA, ...)` to add
timecode information, is this the correct approach?


AV_PKT_DATA_PRFT side data might be the right tool for you.

+1, this seems like the right thing. PTS is not really suitable, as that is based (or at least should be based) on monotonic clock, not realtime clock.

Probably an AVFormatContext flag should be added, similarly how it is done for avcodec.

Regards,
Marton


I hope this mailing list is appropriate for my question, otherwise please
forgive me.

It is only appropriate for this mailing list if you want to improve
FFmpeg itself (i.e. by making the hls muxer use AV_PKT_DATA_PRFT; the
dash muxer already seems to use it). If not, the user mailing list is
the right place.

- Andreas
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to