[Libav-user] libavformat and nested output formats

Alfred E. Heggestad alfred.heggestad at gmail.com
Tue Aug 4 13:45:37 EEST 2020


hi,

I have a question about libavformat and nested formats.


My application is using libavformat with muxers like "dash" and "hls".
These muxers are using a low-level format for the actual container.

For example:

- dash muxer is using file format mp4/webm
- hls muxer is using file format mpegts/fmp4


for the application that is using the libavformat API
(e.g. avformat_alloc_output_context2), is it possible to
get access to the real file format that is used ?


The reason why I am asking about this, is that the flags stored
in AVOutputFormat does not match up between the high-level format
(e.g. hls) and the low-level format (e.g. mpegts).


Here is an example:


hlsenc:

     AVFMT_NOFILE | AVFMT_GLOBALHEADER | AVFMT_ALLOW_FLUSH |
     AVFMT_NODIMENSIONS,


mpegtsenc:

     AVFMT_ALLOW_FLUSH | AVFMT_VARIABLE_FPS | AVFMT_NODIMENSIONS,


Please note that mpegts specifies AVFMT_VARIABLE_FPS, but not hlsenc.
The ffmpeg application is doing various workarounds based on
these flags, but how can it be sure that it is using the right flags ?


/alfred


More information about the Libav-user mailing list