[FFmpeg-trac] #6602(undetermined:new): Can't set or remove encoder metadata

FFmpeg trac at avcodec.org
Mon Apr 6 03:50:07 EEST 2020


#6602: Can't set or remove encoder metadata
-------------------------------------+-------------------------------------
             Reporter:  Psychonaut   |                    Owner:
                 Type:  defect       |                   Status:  new
             Priority:  normal       |                Component:
                                     |  undetermined
              Version:  unspecified  |               Resolution:
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------

Comment (by rindeal):

 Replying to [comment:6 mkver]:
 > av_dict_set() with a NULL parameter as value (like in the else branch of
 the code snippet I quoted above) deletes a tag of the name specified. In
 other words: It filters the libavcodec's encoder tag out. The metadata
 that you see comes from a stage before filtering it out. Write the output
 to an actual file and you'll see that it (normally) doesn't have this
 encoder tag.

 Sadly, that is not the reality.

 When using the same command as above, but writing it to Matroska, it
 produces this file:

 {{{
 + EBML head
 |+ EBML version: 1
 |+ EBML read version: 1
 |+ Maximum EBML ID length: 4
 |+ Maximum EBML size length: 8
 |+ Document type: matroska
 |+ Document type version: 4
 |+ Document type read version: 2
 + Segment: size 491
 |+ Seek head (subentries will be skipped)
 |+ EBML void: size 165
 |+ Segment information
 | + Timestamp scale: 1000000
 | + Multiplexing application: Lavf
 | + Writing application: Lavf
 | + Duration: 00:00:00.000000000
 |+ Tracks
 | + Track
 |  + Track number: 1 (track ID for mkvmerge & mkvextract: 0)
 |  + Track UID: 1
 |  + Lacing flag: 0
 |  + Language: und
 |  + Codec ID: A_PCM/INT/LIT
 |  + Track type: audio
 |  + Audio track
 |   + Channels: 1
 |   + Sampling frequency: 44100
 |   + Bit depth: 8
 |+ Tags
 | + Tag
 |  + Targets
 |   + Track UID: 1
 |  + Simple
 |   + Name: ENCODER
 |   + String: Lavc pcm_u8
 | + Tag
 |  + Targets
 |   + Track UID: 1
 |  + Simple
 |   + Name: DURATION
 |   + String: 00:00:00.000000000
 }}}

 Both tags are bloat.

 > (Some muxers also add something like this on their own. For e.g.
 Matroska this happens in lines 1842-1844 of matroskaenc.c.)

 MATROSKA_ID_MUXINGAPP and MATROSKA_ID_WRITINGAPP are ok and per spec.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/6602#comment:7>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list