[FFmpeg-devel] Input metadata not updated inside mux context

Christo Grozev cgrozev at gmail.com
Mon Jan 2 11:10:38 EET 2017

Happy New Year to all!

I am trying to create a patch for metadata-aware hls splitting.
Unfortunately, i cannot seem to get updated metadata from the
AVFormatContext object inside the muxer scope. For example, within hlsenc.c
I have this::

    static int hls_start(AVFormatContext *s)
    HLSContext *c = s->priv_data;
    AVFormatContext *oc = c->avf;
    AVFormatContext *vtt_oc = c->vtt_avf;
    AVDictionary *options = NULL;
    char *filename, iv_string[KEYSIZE*2 + 1];
    int err = 0;
    int ret = 0;
    AVDictionaryEntry *tag = NULL;
    av_log(s, AV_LOG_DEBUG, "Lets check if there's metadata now.. ");   
    tag = av_dict_get(oc->metadata, "StreamTitle", tag,


However, what is logged is always the original StreamTitle that was valid
when the initial connection to the input url was made, and is not updating
it further. Granted, this is the output stream context, but it does contain
the initial metadata, apparently. What would be the way to update it, or to
access the input context's metadata? Or is the only solution to re-poll the
input stream in a separate process?


Thanks in advance



More information about the ffmpeg-devel mailing list