[FFmpeg-user] lying about metadata output?

Moritz Barsnick barsnick at gmx.net
Wed Oct 29 15:07:23 CET 2014


Hi,

I just encountered a situation where there was a mismatch between what
ffmpeg claimed to put into its output metadata, and what was actually
put into the resulting file.

Why do I bother? It's confusing, and also caused me to try to
manipulate the metadata further, although ffmpeg was already doing the
right thing. I had grabbed an m4a file from YouTube, but it has the
metadata "major_brand : dash", which AtomicParsley refuses to process.
So I though I'd use ffmpeg instead to add artist and title metadata,
and at the same time change the major_brand. In the "conversion"
(remuxing) process, ffmpeg claims to retain this metadata, but in
reality, changes major_brand and compatible_brands (which is good).

So just out of interest: Does the muxer change metadata _after_ what is
reported by the section "Output #0, ipod, [...] Metadata:"? I thought
"Output #0" was the muxer (i.e. container), "Stream #0" was the encoder
(i.e. codec).

Here are the two commands, the first command remuxing the file and
reporting unchanged metadata, the second command inspecting the remuxed
file and reporting the changed metadata:

$ ffmpeg -y -i Null\$katte\$nylterne\ -\ Instinkt-WpMqlB2yp-w.m4a -map 0:a -c:a copy -metadata artist=Null\$katte\$nylterne -metadata title=Instinkt Null\$katte\$nylterne\ -\ Instinkt.m4a
ffmpeg version 2.4.git Copyright (c) 2000-2014 the FFmpeg developers
  built on Oct 28 2014 13:43:00 with icc (ICC) 14.0.3 20140422
  configuration: --prefix=/usr/new/tools/video/install/ffmpeg/20141027 --enable-gpl --enable-version3 --enable-nonfree --disable-shared --enable-x11grab --enable-gnutls --enable-libcdio --enable-libfreetype --enable-libx264 --enable-libmp3lame --enable-openal --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libass --enable-libv4l2 --enable-libvidstab --enable-libfdk-aac --enable-libsmbclient --cc=icc --cxx=icpc --extra-ldflags='-L/usr/new/tools/video/install/x264/current/lib -L/usr/new/tools/video/install/fdk-aac/current/lib' --extra-cflags='-I/usr/new/tools/video/install/x264/current/include -I/usr/new/tools/video/install/fdk-aac/current/include'
  libavutil      54. 11.100 / 54. 11.100
  libavcodec     56. 10.100 / 56. 10.100
  libavformat    56. 11.100 / 56. 11.100
  libavdevice    56.  1.100 / 56.  1.100
  libavfilter     5.  2.100 /  5.  2.100
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Null$katte$nylterne - Instinkt-WpMqlB2yp-w.m4a':
  Metadata:
    major_brand     : dash
    minor_version   : 0
    compatible_brands: iso6mp41
    creation_time   : 2013-09-15 05:40:46
  Duration: 00:02:58.05, start: 0.000000, bitrate: 127 kb/s
    Stream #0:0(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 125 kb/s (default)
    Metadata:
      creation_time   : 2013-09-15 05:40:46
      handler_name    : SoundHandler
Output #0, ipod, to 'Null$katte$nylterne - Instinkt.m4a':
  Metadata:
    major_brand     : dash
    minor_version   : 0
    compatible_brands: iso6mp41
    artist          : Null$katte$nylterne
    title           : Instinkt
    encoder         : Lavf56.11.100
    Stream #0:0(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, 125 kb/s (default)
    Metadata:
      creation_time   : 2013-09-15 05:40:46
      handler_name    : SoundHandler
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
size=    2760kB time=00:02:58.05 bitrate= 127.0kbits/s
video:0kB audio:2730kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.128712%

$ ffmpeg -i Null\$katte\$nylterne\ -\ Instinkt.m4a
ffmpeg version 2.4.git Copyright (c) 2000-2014 the FFmpeg developers
  built on Oct 28 2014 13:43:00 with icc (ICC) 14.0.3 20140422
  configuration: --prefix=/usr/new/tools/video/install/ffmpeg/20141027 --enable-gpl --enable-version3 --enable-nonfree --disable-shared --enable-x11grab --enable-gnutls --enable-libcdio --enable-libfreetype --enable-libx264 --enable-libmp3lame --enable-openal --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libass --enable-libv4l2 --enable-libvidstab --enable-libfdk-aac --enable-libsmbclient --cc=icc --cxx=icpc --extra-ldflags='-L/usr/new/tools/video/install/x264/current/lib -L/usr/new/tools/video/install/fdk-aac/current/lib' --extra-cflags='-I/usr/new/tools/video/install/x264/current/include -I/usr/new/tools/video/install/fdk-aac/current/include'
  libavutil      54. 11.100 / 54. 11.100
  libavcodec     56. 10.100 / 56. 10.100
  libavformat    56. 11.100 / 56. 11.100
  libavdevice    56.  1.100 / 56.  1.100
  libavfilter     5.  2.100 /  5.  2.100
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Null$katte$nylterne - Instinkt.m4a':
  Metadata:
    major_brand     : M4A
    minor_version   : 512
    compatible_brands: isomiso2
    title           : Instinkt
    artist          : Null$katte$nylterne
    encoder         : Lavf56.11.100
  Duration: 00:02:58.05, start: 0.000000, bitrate: 127 kb/s
    Stream #0:0(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 125 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
At least one output file must be specified

Thanks,
Moritz


More information about the ffmpeg-user mailing list