Uploaded image for project: 'Picard'
  1. Picard
  2. PICARD-2909

OPUS - cover art in METADATA_BLOCK_PICTURE incorrectly embedded

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • 2.11
    • Tags & Metadata
    • None

      I have used a "real world" audio sample for this bugreport in order to make the results, including fingerprinting and tagging in Musicbrainz Picard reproducable.

      The attached audio sample is from this release: https://archive.org/details/BSOG0006/01-TheBurnsWeEarn_192kb.mp3

      The license looks okay for the purpose of attaching it to a bugreport.

      This is the corresponding album on musicbrainz: https://musicbrainz.org/release/c652ba28-390d-44a1-9eab-054ef41a1770

      The sample has been transcoded to OPUS using ffmpeg n6.1.1 built with libopusenc 0.2.1-4. It has then been tagged using Musicbrainz Picard 2.11 which results in the cover art being embedded. ffprobe describes the resulting file as follows:

      [ogg @ 0x5a704ad78e00] 1579 bytes of comment header remain
      Input #0, ogg, from 'tagged_01 The Burns We Earn.opus':
        Duration: 00:02:22.36, start: 0.000000, bitrate: 33 kb/s
        Stream #0:0: Audio: opus, 48000 Hz, stereo, fltp
          Metadata:      MUSICBRAINZ_RELEASEGROUPID: 14a4f11e-0813-4bd3-80a6-f3b7150d63d7
      [...lots of metadata left out here...]
        Stream #0:1: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 500x500 [SAR 1:1 DAR 1:1], 90k tbr, 90k tbn (attached pic)
          Metadata:
            comment         : Cover (front)
      

      The resulting mediafiles are attached.

      When opening the file tagged_01 The Burns We Earn.opus in Audacious 4.3.1 the cover art is not parsed and displayed. The process fails with the error

      ERROR ../audacious-plugins-4.3.1/src/opus/opus.cc:142 [read_image_from_tags]: Error parsing METADATA_BLOCK_PICTURE in file:///tmp/testme/testcase/tagged_01%20The%20Burns%20We%20Earn.opus. 
      

      Running opusinfo from opus-tools 0.2 against the tagged file results in...

      WARNING: Invalid picture parameters in METADATA_BLOCK_PICTURE comment 31 (stream 1): width (500), height (500), depth (0), and colors (0) MUST either be set to valid values or all set to 0
          METADATA_BLOCK_PICTURE=3|image/jpeg||500x500x0|<26588 bytes of image data>
      

      ...which indeed violates the format definition for METADATA_BLOCK_PICTURE as laid out here: https://www.opus-codec.org/docs/opusfile_api-0.6/structOpusPictureTag.html#a9af23c314edf9a995c95a4d28f49eac0

      I guess, the easiest way would be to just not set the image size at all, as the output of opusinfo suggests.

      backlink to the issue in the Audacious bugtracker: https://github.com/audacious-media-player/audacious/issues/1387

            Unassigned Unassigned
            hlinden Harald Linden
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                Version Package