Advertisement
Guest User

Untitled

a guest
May 9th, 2022
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.58 KB | None | 0 0
  1. # 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 .
  2. # IFS explanation:
  3. # https://unix.stackexchange.com/a/184867
  4.  
  5. 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
  6.  
  7.  
  8.  
  9.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement