Created
January 4, 2017 23:04
-
-
Save pwqw/71b6e2604d4e22dcff355f3c09c06bda to your computer and use it in GitHub Desktop.
Search and convert all mp4 videos to mp3 audio files
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 | |
# requires ffmpeg | |
# apt install ffmpeg | |
find . -type f -iname "*.mp4" -exec bash -c 'FILE="$1"; ffmpeg -i "${FILE}" -vn -acodec libmp3lame -ac 2 -ab 320k -ar 48000 "${FILE%.mp4}.mp3";' _ '{}' \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment