Skip to content

Instantly share code, notes, and snippets.

@sibosend
Created February 29, 2024 10:47
Show Gist options
  • Save sibosend/f2fc1b68a721b4d417df352966ac4bdc to your computer and use it in GitHub Desktop.
Save sibosend/f2fc1b68a721b4d417df352966ac4bdc to your computer and use it in GitHub Desktop.
extract audio track from multiple .mp4 files
#!/bin/bash
eval "files=($(ls ./*/*))"
for f in "${files[@]}"; do
# printf '%s\n' "$f"
# printf '%s\n' './wangwangduimp3/'"$f"'.mp3'
ffmpeg -i $f -map 0:a -acodec libmp3lame -y './wangwangduimp3/'"$f"'.mp3'
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment