Last active
June 10, 2021 12:48
-
-
Save martjanz/383612d00007f53eee54484ed4e45657 to your computer and use it in GitHub Desktop.
Convert audio and image formats to smaller and compressed formats
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
#!/bin/sh | |
# (Linux, Unix) Convert to mp3 at maximum VBR using ffmpeg, then delete source audio files | |
fd -t f -e aiff -x ffmpeg -i "{}" -qscale:a 0 "{.}.mp3" && fd -t f -e aiff -x rm {} | |
fd -t f -e flac -x ffmpeg -i "{}" -qscale:a 0 "{.}.mp3" && fd -t f -e flac -x rm {} | |
fd -t f -e m4a -x ffmpeg -i "{}" -qscale:a 0 "{.}.mp3" && fd -t f -e m4a -x rm {} | |
fd -t f -e wav -x ffmpeg -i "{}" -qscale:a 0 "{.}.mp3" && fd -t f -e wav -x rm {} | |
fd -t f -e wma -x ffmpeg -i "{}" -qscale:a 0 "{.}.mp3" && fd -t f -e wma -x rm {} | |
# (Mac) Convert bmp to jpeg | |
fd -t f -e bmp -x mogrify -format jpg "{}" && fd -t f -e bmp -x rm {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment