Opened 7 years ago

Last modified 8 days ago

#4448 open enhancement

Support writing album cover art image embedded in ogg / opus metadata

Reported by: llogan Owned by:
Priority: wish Component: avformat
Version: git-master Keywords: ogg opus metadata
Cc: jamrial@gmail.com, mitar Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

$ ./ffmpeg -i ../fate-suite/cover_art/cover_art.flac ../out.ogg
ffmpeg version N-71319-g43b4342 Copyright (c) 2000-2015 the FFmpeg developers
  built with gcc 4.9.2 (GCC) 20150304 (prerelease)
  configuration: --enable-gpl --disable-doc
  libavutil      54. 22.100 / 54. 22.100
  libavcodec     56. 34.100 / 56. 34.100
  libavformat    56. 29.100 / 56. 29.100
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 13.101 /  5. 13.101
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
Input #0, flac, from '../fate-suite/cover_art/cover_art.flac':
  Metadata:
    RATING          : 0
    ALBUM           : Ангелофрения
    ARTIST          : Мельница
    TITLE           : Дороги
    TRACKTOTAL      : 11
    TOTALTRACKS     : 11
    GENRE           : Folk
    DATE            : 2012
    track           : 2
  Duration: 00:03:09.05, start: 0.000000, bitrate: 1 kb/s
    Stream #0:0: Audio: flac, 44100 Hz, stereo, s16
    Stream #0:1: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 350x350 [SAR 1:1 DAR 1:1], 90k tbr, 90k tbn, 90k tbc
    Metadata:
      comment         : Other
Output #0, ogg, to '../out.ogg':
  Metadata:
    RATING          : 0
    ALBUM           : Ангелофрения
    ARTIST          : Мельница
    TITLE           : Дороги
    TRACKTOTAL      : 11
    TOTALTRACKS     : 11
    GENRE           : Folk
    DATE            : 2012
    track           : 2
    Stream #0:0: Video: theora, none, q=2-31, 128 kb/s
    Metadata:
      comment         : Other
    Stream #0:1: Audio: flac, 0 channels, 128 kb/s
Stream mapping:
  Stream #0:1 -> #0:0 (mjpeg (native) -> ? (?))
  Stream #0:0 -> #0:1 (flac (native) -> flac (native))
Encoder (codec theora) not found for output stream #0:0

Of course if Theora is supported by the build then a Theora video stream will be outputted (90k frame rate in this case).

Possibly related to #4442 since I assume the cover art mechanics would be similar:
https://wiki.xiph.org/VorbisComment#Cover_art

Change History (6)

comment:1 by James, 7 years ago

Cc: jamrial@gmail.com added
Status: newopen
Type: defectenhancement

I wrote a patch a couple years ago implementing FLAC's METADATA_BLOCK_PICTURE structure: https://ffmpeg.org/pipermail/ffmpeg-devel/2013-August/146869.html

As discussed in that thread, it's been on hold until a proper AVPacketList API is implemented in order to avoid duplicating code, but it could nonetheless be committed as is.
Feel free to resurrect that thread to see what's people opinion in the matter.

After that it would be a matter of sharing that code so the Ogg muxer can also make use of it.

comment:2 by James, 7 years ago

Priority: normalwish

Related to ticket #4442

comment:3 by llogan, 17 months ago

Keywords: opus added
Summary: Properly support cover art in oggSupport writing album cover art in ogg / opus

comment:4 by mitar, 8 months ago

Cc: mitar added

comment:5 by mitar, 8 months ago

It would be really useful if somebody could revive this patch.

comment:6 by Justin Case, 8 days ago

Keywords: metadata added
Summary: Support writing album cover art in ogg / opusSupport writing album cover art image embedded in ogg / opus metadata

Hello,

I am also interested in this request resolution.

Here is a patch someone pointed to me:

https://patchwork.ffmpeg.org/project/ffmpeg/list/?series=7314

It allows ffmpeg to embed an image into an ogg container as a metadata field containing binary data, just like opusenc --picture mycover.jpg does. This follows the FLAC specification.

Please can a developer merge this to mainstream if the code is OK?

Cheers,
Justin

PS: here is a question on SE describing the need

Last edited 8 days ago by Justin Case (previous) (diff)
Note: See TracTickets for help on using tickets.