Advertisement
Guest User

Untitled

a guest
Mar 26th, 2012
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.58 KB | None | 0 0
  1. #!/bin/bash
  2. video_folder="/home/share/torrent/download/"
  3. films_folder="/home/share/films/iPad/"
  4.  
  5. resolution="1280x720"
  6.  
  7. file_mask="LostFilm.TV"
  8.  
  9. for i in `ls -a $video_folder/*$file_mask*.mkv`
  10. do
  11. i=$(echo $i | sed 's/.mkv//' | sed 's%^.*/%%')
  12. if [[ ! -e "${films_folder}$i.mp4" ]]
  13. echo "${films_folder}$i.mp4 not exist"
  14. echo "Converting "$i"."
  15. then /usr/local/bin/ffmpeg -i ${video_folder}$i.mkv -acodec aac -strict experimental -ab 128k -ac 2 -vcodec libx264 -b 1200k -s 1280x720 -r 30 -threads 0 ${films_folder}$i.mp4
  16. echo "Convert "$i" to mp4 is done!"
  17. else shift
  18. fi
  19. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement