Advertisement
Xyberviri

bunch of mp4's to mkvs

Aug 7th, 2017
248
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.43 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. if [ -n "$(find -name *.mp4)" ]
  4. then
  5.   echo -e "\nContains .mp4 files, doing magic.\n"
  6. else
  7.   echo -e "\nNo mp4 files to convert\n"
  8.   exit 0
  9. fi
  10.  
  11.  
  12. conversion_list=$(find -name *.mp4)
  13. for conversion_item in $conversion_list; do
  14.         printf '%s -> %2s\n' "$conversion_item" "${conversion_item::-4}.mkv"
  15.         HandBrakeCLI -i $conversion_item --preset Normal -f av_mkv --output "${conversion_item::-4}.mkv"
  16. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement