Skip to content

Instantly share code, notes, and snippets.

@rija
Created November 25, 2019 06:42
Show Gist options
  • Save rija/6b34156bfdf2ad5a31e4f7bfd0c168bb to your computer and use it in GitHub Desktop.
Save rija/6b34156bfdf2ad5a31e4f7bfd0c168bb to your computer and use it in GitHub Desktop.
Batch convert mp4 to m4a
#!/bin/bash
destination=".."
source_folder="Music"
for i in $source_folder/*.mp4;
do name=`echo "$i" | cut -d'.' -f1`
echo "$name"
echo "ffmpeg -i $i -c:a aac -c:b 128k -vn -f mp4 $destination/$name.m4a"
ffmpeg -i "$i" -c:a aac -vn -f mp4 "$destination/$name.m4a"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment