[Libav-user] Get the #EXT-X-TARGETDURATION from hls demuxer.

Hristo Ivanov hivanov.ffmailing at gmail.com
Wed Mar 6 14:22:36 EET 2019


I have a HLS input and I want to be able to get value of
the #EXT-X-TARGETDURATION tag(the segments target duration) of the .m3u8
file. Is that possible? Can that information be recovered from the
AVFormatContext struct?

The reason why I need the target duration of the hls segments is the
My AVFormatContext has a custom interrupt_callback, I want to use a value
of 2xTARGETDURATION for the interrupt_callback since all the packets of a
segment are read instantly and the next av_read_frame() call does not
return until the next segment is ready. Example:
  Lets consider a TARGETDURATION of 30s and a interrupt_callback function
which expires in 2s. All the packets of the latest segment are read at once
and there is no new packets until the next segment is ready, long after the
av_read_frame() call has expired. That's is why I want to set the
expiration time in according to the segments duration.
Maybe there is a another better solution to this? Some ideas?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20190306/4b420a67/attachment.html>

More information about the Libav-user mailing list