ubuntuubuntu-14.04eyed3

Recursively remove all embedded images in mp3 using eyed3


Have used below eyed3 command in Ubuntu to remove all the images embedded in mp3, but not recursively. How to perform recursively in each folder and sub folders?

If someone can modify and present me the below command line would be great.

eyeD3 --remove-all-images *.mp3

Solution

  • As eyeD3 --help shows, specifying a path instead of *.mp3 will work recursively, e.g.

    eyeD3 --remove-all-images .
    

    will start from the current directory and work recursively.

    In most cases eyeD3 will only do something when a file is an MP3 file, but if you want to specifically target files that end in .mp3 you might want to use find:

    find . -name \*.mp3 -execdir eyeD3 --remove-all-images {} \;
    

    This will find all .mp3 files recursively, starting in the current directory, and run the eyeD3 command on each of them ({} gets replaced by the file name). Use -iname instead of -name for case insensitivity (e.g. also find files ending in .MP3 or .Mp3).

    Tip: you probably want to add --max-padding 1 to your eyeD3 command to actually free up the space previously used by embedded images (shrink the MP3 file after removing embedded artwork). This however requires the latest version of eyeD3 (see its website), the version provided by Ubuntu 16.04 repositories (0.6.18) doesn't support this option.