Created
February 15, 2015 17:39
-
-
Save simon04/33187c6849fd9c10ca47 to your computer and use it in GitHub Desktop.
Converts m4a files to Ogg Vorbis using ffmpeg
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/bash | |
# Author: Simon Legner <[email protected]> | |
convert () { | |
in="$1" | |
out="${in%.m4a}.ogg" | |
ffmpeg -i "$in" \ | |
-acodec libvorbis -aq 4 -vn -ac 2 \ | |
-map_metadata 0 \ | |
"$out" | |
} | |
if [[ $# == 0 ]]; then | |
echo Converts m4a files to Ogg Vorbis using ffmpeg. | |
echo Usage: $0 file1.m4a file2.m4a ... fileN.m4a | |
echo ... produces file1.ogg file2.ogg ... fileN.ogg | |
fi | |
for i in "$@"; do | |
convert "$i" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment