Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#7784 closed defect (fixed)

ffmpeg/lavf changes the case of metadata keys

Reported by: Cigaes Owned by:
Priority: minor Component: undetermined
Version: git-master Keywords: ogg metadata
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Start with an Ogg Vorbis file with the reference tags:

head -c $[44100*4*60] /dev/zero > silence.pcm
oggenc -r -B 16 -C 2 -R 44100 -a Artist -t Title -l Album -c custom=Comment silence.pcm

Then use ffmpeg to remux the file:

./ffmpeg_g -i /tmp/silence.ogg -y -c copy /tmp/silence_ff.ogg

Check the output:

$ vorbiscomment silence.ogg 
custom=Comment
title=Title
artist=Artist
album=Album
$ vorbiscomment silence_ff.ogg 
CUSTOM=Comment
TITLE=Title
ARTIST=Artist
ALBUM=Album
encoder=Lavf58.26.101

The spec https://xiph.org/vorbis/doc/v-comment.html states that the keys are case-insensitive, but ffmpeg should nonetheless try to match the workings of the reference implementation, and/or not change things without a good reason.

Output of the ffmpeg command-line (does not contain any useful information):

ffmpeg version N-93308-g1144d5c96d Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 8 (Debian 8.3.0-2)
  configuration: --enable-shared --disable-static --enable-gpl --enable-libx264 --enable-libopus --enable-libass --enable-libfreetype --enable-opengl --assert-level=2
  libavutil      56. 26.100 / 56. 26.100
  libavcodec     58. 47.103 / 58. 47.103
  libavformat    58. 26.101 / 58. 26.101
  libavdevice    58.  6.101 / 58.  6.101
  libavfilter     7. 48.100 /  7. 48.100
  libswscale      5.  4.100 /  5.  4.100
  libswresample   3.  4.100 /  3.  4.100
  libpostproc    55.  4.100 / 55.  4.100
Input #0, ogg, from '/tmp/silence.ogg':
  Duration: 00:01:00.00, start: 0.000000, bitrate: 1 kb/s
    Stream #0:0: Audio: vorbis, 44100 Hz, stereo, fltp, 112 kb/s
    Metadata:
      CUSTOM          : Comment
      TITLE           : Title
      ARTIST          : Artist
      ALBUM           : Album
Output #0, ogg, to '/tmp/silence_ff.ogg':
  Metadata:
    encoder         : Lavf58.26.101
    Stream #0:0: Audio: vorbis, 44100 Hz, stereo, fltp, 112 kb/s
    Metadata:
      CUSTOM          : Comment
      TITLE           : Title
      ARTIST          : Artist
      ALBUM           : Album
      encoder         : Lavf58.26.101
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
size=      11kB time=00:00:59.99 bitrate=   1.4kbits/s speed=5.97e+03x    
video:0kB audio:3kB subtitle:0kB other streams:0kB global headers:4kB muxing overhead: 318.329468%

Change History (4)

comment:1 by Carl Eugen Hoyos, 5 years ago

Keywords: ogg metadata added

comment:2 by Jun Zhao, 5 years ago

Last edited 5 years ago by Jun Zhao (previous) (diff)

comment:3 by Jun Zhao, 5 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.