[Abcde-users] Abcde -W option

josh poddmo at gmail.com
Sun Feb 8 22:21:19 GMT 2026


On Mon, 9 Feb 2026 at 01:25, Dry Martini Holding Company 😎
<qrp at kg4kgl.net> wrote:
> > On Feb 5, 2026, at 18:10, josh <poddmo at gmail.com> wrote:
> >
> > On Wed, 4 Feb 2026 at 10:42, Dry Martini Holding Company via
> > Abcde-users <abcde-users at lists.einval.com> wrote:
> >>
> >>> On 2/3/26 17:31, josh via Abcde-users wrote:
> >>> Besides the track numbering, if the -W option is set then there will
> >>> be some metadata tags written, especially flac and mp3
> >>>
> >>> Cover art selection is primitive but still not too bad for a command
> >>> line script.
> >>
> >> Regarding cover art and metadata, I searched for the ffmpeg command to
> >> embed image art, but it does not work. My workaround is to use Kid3-qt
> >> to embed the album art.
> >>
> >> Speaking of embedding art and metadata, when Kid3 grabs data from
> >> Musicbrainz, it includes a lot more than the standard band, album titles
> >> and date. Like you, I find this information useful and would like to
> >> embed it as well, but using abcde to do it automatically. I have messed
> >> with editing the script file itself, by adding additional fields, nut so
> >> far I have not been successful. How are you embedding the metadata?
> >
> > Thanks for the Kid3 pointer. I wish it could rip CDs!
> >
> > Embed cover art using abcde with the -B switch. My current testing
> > command line looks like:
> > abcde -V -o flac -d /dev/sr0 -G -B
> >
> > -G to download cover art, -B for embedding cover. No need for ffmpeg
> > to rip and encode but ffmpeg is my favourite tool to review the
> > metadata:
> > ffmpeg -i 01.Everybody\ On\ The\ Floor\ -\ Pump\ It.flac
> > Input #0, flac, from '01.Everybody On The Floor -
>
> Ffmpeg is needed for encoding the songs to aiff format. I am still experimenting to find a solution for embedding the cover art, and adding other metadata.

Ok, now I'm on the same page as you. Some notes for future changes:

1. Function do_embedalbumart
Does not handle the case of embedding cover art in aiff:
https://github.com/poddmo/abcde/blob/1f8daac9d121434a01a3dfa1bf4142a064c30cf2/abcde#L3669

2. An AI told me this:
FFmpeg can be used to mux audio and cover art into an AIFF file by
embedding the cover art as a video stream.  Use the following command:

ffmpeg -i audio.aiff -i cover.jpg -map 0:0 -map 1:0 -c:a copy -c:v
mjpeg -filter:v "scale=500:500,format=yuvj420p" -metadata:s:v
title="Album cover" -metadata:s:v comment="Cover (front)"
-disposition:v attached_pic output.aiff

-i audio.aiff: Input audio file in AIFF format.
-i cover.jpg: Input image file for cover art.
-map 0:0: Maps the audio stream from the first input.
-map 1:0: Maps the cover art (video) stream from the second input.
-c:a copy: Copies the audio stream without re-encoding.
-c:v mjpeg: Encodes the cover art as MJPEG (required for embedded
cover art in AIFF).
-filter:v "scale=500:500,format=yuvj420p": Resizes the image and sets
the pixel format for proper display.
-metadata:s:v title="Album cover": Sets the title for the video stream.
-metadata:s:v comment="Cover (front)": Adds a comment for the cover art.
-disposition:v attached_pic: Marks the video stream as attached
picture (cover art).
output.aiff: Output AIFF file with embedded cover art.
✅ This method preserves audio quality and embeds the cover art
directly into the AIFF container. Ensure the cover image is in a
supported format (e.g., JPG, PNG).

I had a quick test and the process looks ok:
ffmpeg -i test.aiff -i cover.jpg -map 0 -map 1 -c copy
-disposition:v:0 attached_pic output.aiff
[aist#0:0/pcm_s16be @ 0x7f8330906300] Guessed Channel Layout: stereo
Input #0, aiff, from 'test.aiff':
  Metadata:
    title           : Hold Tight
    comment         : Visit https://cheersquadrecordstapes.bandcamp.com
  Duration: 00:02:42.93, start: 0.000000, bitrate: 1411 kb/s
  Stream #0:0: Audio: pcm_s16be, 44100 Hz, stereo, s16, 1411 kb/s
Input #1, image2, from 'cover.jpg':
  Duration: 00:00:00.04, start: 0.000000, bitrate: 79695 kb/s
  Stream #1:0: Video: mjpeg (Baseline), yuvj420p(pc,
bt470bg/unknown/unknown), 1416x1417 [SAR 100:100 DAR 1416:1417], 25
fps, 25 tbr, 25 tbn
File 'output.aiff' already exists. Overwrite? [y/N] y
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #1:0 -> #0:1 (copy)
Output #0, aiff, to 'output.aiff':
  Metadata:
    title           : Hold Tight
    comment         : Visit https://cheersquadrecordstapes.bandcamp.com
    encoder         : Lavf61.7.100
  Stream #0:0: Audio: pcm_s16be (NONE / 0x454E4F4E), 44100 Hz, stereo,
s16, 1411 kb/s
  Stream #0:1: Video: mjpeg (Baseline), yuvj420p(pc,
bt470bg/unknown/unknown), 1416x1417 [SAR 100:100 DAR 1416:1417],
q=2-31, 25 fps, 25 tbr, 25 tbn (attached pic)
Press [q] to stop, [?] for help
[out#0/aiff @ 0x7f8330c05840] video:389KiB audio:28068KiB
subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead:
unknown
frame=    1 fps=0.0 q=-1.0 Lsize=   28068KiB time=00:00:00.04
bitrate=5748314.0kbits/s speed=0.649x

but I can't verify that it worked.  Apple Music does not show the art
and ffmpeg only shows audio info for the new file:
ffmpeg -i output.aiff
[aist#0:0/pcm_s16be @ 0x7f7eee705e40] Guessed Channel Layout: stereo
Input #0, aiff, from 'output.aiff':
  Metadata:
    title           : Hold Tight
    comment         : Visit https://cheersquadrecordstapes.bandcamp.com
  Duration: 00:02:42.93, start: 0.000000, bitrate: 1411 kb/s
  Stream #0:0: Audio: pcm_s16be, 44100 Hz, stereo, s16, 1411 kb/s
At least one output file must be specified


If you please create an enhancement issue on the github repo, I'm a
better chance to remember to work on this the next time I spend time
on abcde.
https://github.com/poddmo/abcde/issues/new/choose

Maybe there's scope for using kid3-cli from abcde to do it or more
generally manage metadata for abcde....



More information about the Abcde-users mailing list