Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Just tries to make a folder called "audio_rips" under the current directory if not already present, finds all the MP4 files in the sub-directories, checks to see if there is already a file with the expected name in that directory, and if not, run ffmpeg to losslessly extract the audio as an m4a .
- # IFS explanation:
- # https://unix.stackexchange.com/a/184867
- mkdir -p "audio_rips" && IFS=$'\n'; for orig_file in $(find . -name '*.mp4' ); do [ ! -f "audio_rips/${orig_file%.*}.m4a" ] && ffmpeg -i "$orig_file" -vn -acodec copy "audio_rips/${orig_file%.*}.m4a"; done; unset IFS
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement