Last active
June 23, 2024 16:20
-
-
Save watr/7860958a2a01a27e8e7a61a44b0341ce to your computer and use it in GitHub Desktop.
find artwork image and add to '*.m4a' files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## this script depends on 'mp4art', one part of 'mp4v2'. | |
# brew install mp4v2 | |
## if you need to remove artworks first, | |
# find . -type f -name '*.m4a' -print0 | xargs -0 mp4art --remove | |
## find local artwork image file and add to '*.m4a' files | |
artwork=`find . -type f \( -name '*.png' -o -name '*.jpg' -o -name '*.jpeg' \) -print | head -1`; | |
if [ -e "$artwork" ]; then find . -type f -name '*.m4a' -print0 | xargs -0 mp4art --add "$artwork" ; fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment