Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#8608 closed defect (fixed)

Fix #7784 Breaks Vorbis Album Art Extraction

Reported by: nanoman Owned by:
Priority: important Component: avformat
Version: git-master Keywords: ogg vorbis regression
Cc: boxletterblues@fastmail.com Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description (last modified by Carl Eugen Hoyos)

Summary of the bug:

The latest release of FFmpeg (4.2) breaks album art extraction for ogg vorbis files (it worked in 4.1.3). I was able to confirm this on the most recent development branch of FFmpeg, and I was able to fix it by undoing the offending commit here and re-compiling: 8d3630c5402fdda2889fe4f74f7dcdd50ebca654

I have attached a vorbis file from Wikipedia. I put a public domain photo into the vorbis metadata_block_picture using mutagen.

How to reproduce the error (using the latest ffmpeg release, 4.2.2):

% ffmpeg -i Example.ogg /tmp/foo.jpg
ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 9 (GCC)
  configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --docdir=/usr/share/doc/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' --extra-ldflags='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld ' --extra-cflags=' ' --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-version3 --enable-bzlib --disable-crystalhd --enable-fontconfig --enable-frei0r --enable-gcrypt --enable-gnutls --enable-ladspa --enable-libaom --enable-libdav1d --enable-libass --enable-libbluray --enable-libcdio --enable-libdrm --enable-libjack --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libmp3lame --enable-nvenc --enable-openal --enable-opencl --enable-opengl --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librsvg --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzimg --enable-libzvbi --enable-avfilter --enable-avresample --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-libmfx --enable-runtime-cpudetect
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
[ogg @ 0x55f46dfa9a80] 1129 bytes of comment header remain
Input #0, ogg, from 'Example.ogg':
  Duration: 00:00:06.10, start: 0.000000, bitrate: 226 kb/s
    Stream #0:0: Audio: vorbis, 44100 Hz, stereo, fltp, 160 kb/s
    Metadata:
      title           : Test
      metadata_block_picture: AAAAAwAAAAppbWFnZS9qcGVnAAAAC0Zyb250IENvdmVyAAAAAAAAAAAAAAAAAAAAAAAAwMT/2P/gABBKRklGAAEBAAABAAEAAP/hAF5FeGlmAABJSSoACAAAAAEAmIICADwAAAAaAAAAAAAAAFB1YmxpYyBEb21haW4sIGZyb20gdGhlIEJyaXRpc2ggTGlicmFyeSdzIGNvbGxlY3Rpb25zLCAyMDEzAP/hCyhodHRwOi8vbnMuYWRvYmUuY29
Output #0, image2, to '/tmp/foo.jpg':
Output file #0 does not contain any stream

Upon undoing the offending commit, it works fine:

% ffmpeg -i Example.ogg /tmp/foo.jpg
ffmpeg version N-97225-g081ef58619 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 9 (GCC)
  configuration: 
  libavutil      56. 42.102 / 56. 42.102
  libavcodec     58. 77.101 / 58. 77.101
  libavformat    58. 42.100 / 58. 42.100
  libavdevice    58.  9.103 / 58.  9.103
  libavfilter     7. 77.101 /  7. 77.101
  libswscale      5.  6.101 /  5.  6.101
  libswresample   3.  6.100 /  3.  6.100
[ogg @ 0x32406c0] 1129 bytes of comment header remain
Input #0, ogg, from 'Example.ogg':
  Duration: 00:00:06.10, start: 0.000000, bitrate: 226 kb/s
    Stream #0:0: Audio: vorbis, 44100 Hz, stereo, fltp, 160 kb/s
    Metadata:
      TITLE           : Test
    Stream #0:1: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 313x437 [SAR 1:1 DAR 313:437], 90k tbr, 90k tbn, 90k tbc (attached pic)
    Metadata:
      comment         : Cover (front)
      title           : Front Cover
Stream mapping:
  Stream #0:1 -> #0:0 (mjpeg (native) -> mjpeg (native))
Press [q] to stop, [?] for help
[image2 @ 0x32574c0] Frame rate very high for a muxer not efficiently supporting it.
Please consider specifying a lower framerate, a different muxer or -vsync 2
Output #0, image2, to '/tmp/foo.jpg':
  Metadata:
    encoder         : Lavf58.42.100
    Stream #0:0: Video: mjpeg, yuvj420p(pc), 313x437 [SAR 1:1 DAR 313:437], q=2-31, 200 kb/s, 90k fps, 90k tbn, 90k tbc (attached pic)
    Metadata:
      comment         : Cover (front)
      title           : Front Cover
      encoder         : Lavc58.77.101 mjpeg
    Side data:
      cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A
frame=    1 fps=0.0 q=4.3 Lsize=N/A time=00:00:00.00 bitrate=N/A speed=0.000875x    
video:22kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

Attachments (1)

Example.ogg (168.9 KB ) - added by nanoman 4 years ago.
Vorbis file containing album art metadata in the metadata_block_picture comment

Download all attachments as: .zip

Change History (3)

by nanoman, 4 years ago

Attachment: Example.ogg added

Vorbis file containing album art metadata in the metadata_block_picture comment

comment:1 by Carl Eugen Hoyos, 4 years ago

Description: modified (diff)
Keywords: regression added; artwork metadata removed
Priority: normalimportant
Reproduced by developer: set
Resolution: fixed
Status: newclosed
Version: 4.2git-master

Fixed by Mattias Wadman in 9d21d18ec3ca2721e989fd4522d19bd90d6ac2db

comment:2 by nanoman, 4 years ago

Cc: boxletterblues@fastmail.com added

I notice this fix was not included in the latest 4.2.3 release. Is there a reason why?

Note: See TracTickets for help on using tickets.