Embed Cover Art in Ogg Vorbis Using FFmpeg

Embedding album artwork into Ogg Vorbis audio files is a great way to ensure your music library displays correctly across various media players. Unlike MP3 files that use ID3 tags, Ogg Vorbis stores cover art inside a metadata block called METADATA_BLOCK_PICTURE. This guide provides the exact, straight-to-the-point FFmpeg commands needed to embed cover art into your Ogg files, whether you are copying the audio stream or encoding a new file from scratch.

The Basic Command (No Re-encoding)

If you already have an Ogg Vorbis file and simply want to add a JPEG or PNG cover image without losing any audio quality, use the following command. This method copies the audio stream directly:

ffmpeg -i input.ogg -i cover.jpg -map 0:0 -map 1:0 -c copy -disposition:v attached_pic output.ogg

Command Breakdown

Embedding Cover Art While Encoding

If you are converting a lossless file (like WAV or FLAC) to Ogg Vorbis and want to embed the cover art during the encoding process, use this command:

ffmpeg -i input.wav -i cover.jpg -map 0:a -map 1:v -c:a libvorbis -q:a 6 -c:v copy -disposition:v attached_pic output.ogg

In this variation: * -c:a libvorbis: Uses the Vorbis encoder to compress the audio. * -q:a 6: Sets the audio quality level (6 is a high-quality setting, roughly 192 kbps). * -c:v copy: Copies the image stream directly without re-encoding the JPG/PNG.

Verifying the Changes

To verify that the cover art was successfully embedded into your Ogg file, you can run the ffprobe command:

ffprobe output.ogg

In the console output, you should see two streams listed: Stream #0:0 (the Vorbis audio stream) and Stream #0:1 (the video/image stream marked as attached_pic).