How to remove ID3 audio tag image (or metadata) from mp3 with ffmpeg

Buzut picture Buzut · Nov 25, 2013 · Viewed 19.1k times · Source

FFMPEG is really a great tool. I know it can edit ID3 tags and even remove all tags in a row :

ffmpeg -i tagged.mp3 -map_metadata -1 untagged.mp3

But even after that, there's still the cover image.

I don't know how to remove it using ffmpeg. I know there's other soft out there that can do the job - like eyed3 - but what's the point to install it if ffmpeg can do it too, in one line, while encoding the audio ?

Answer

llogan picture llogan · Nov 25, 2013

The cover image/album art is treated as a video stream by ffmpeg. To omit it you can use the -vn or -map options.

Strip metadata and remove album art (no re-encoding)

In this example the audio is being stream copied (re-muxed) instead of being re-encoded. This is faster and will not degrade the quality:

ffmpeg -i tagged.mp3 -vn -codec:a copy -map_metadata -1 out.mp3

Same as above but using -map instead of -vn

Or you could use the -map option to explicitly choose the streams. Using -map 0:a tells ffmpeg to only select the audio stream(s) from input 0 (the first input and the only input in your case):

ffmpeg -i tagged.mp3 -map 0:a -codec:a copy -map_metadata -1 out.mp3

I prefer -map because it is very flexible.