Advertisement
Guest User

Untitled

a guest
Sep 18th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.40 KB | None | 0 0
  1. while IFS= read -r -d '' movie ; do
  2.     echo "Found: $movie"
  3.  
  4.     convert_command="ffmpeg -i '$movie' -vcodec copy -acodec copy '$movie.mp4'"
  5.  
  6.     if bash -c "$convert_command" ; then
  7.         echo "Converted to mp4"
  8.         #rm "$movie" #Uncomment to remove source file.
  9.     else
  10.         echo "Convertation failed"
  11.     fi
  12. done << (find . -type f -iregex '.*\(mkv\|mpeg\|avi\|wmv\|mov\)' -print0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement