Skip to content

Instantly share code, notes, and snippets.

@theKAKAN
Created November 19, 2020 19:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save theKAKAN/cf351be315c4e9dbffd136acf2b1cc32 to your computer and use it in GitHub Desktop.
Save theKAKAN/cf351be315c4e9dbffd136acf2b1cc32 to your computer and use it in GitHub Desktop.
Convert all [{container format}] in a directory to any other kind of file using bash and ffmpeg
# Modify the ffmpeg command to your liking if you want :)
for name in ./*; do ffmpeg -i "$name" -vn "./mp3/${name%.*}.mp3"; done
# Change ./* to ./*.mp4 to select only MP4 files and so on.
# Change .mp3 to any format you like and
# ffmpeg will automatically adjust to the container format
# because of -vn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment