Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- video_folder="/home/share/torrent/download/"
- films_folder="/home/share/films/iPad/"
- resolution="1280x720"
- file_mask="LostFilm.TV"
- for i in `ls -a $video_folder/*$file_mask*.mkv`
- do
- i=$(echo $i | sed 's/.mkv//' | sed 's%^.*/%%')
- if [[ ! -e "${films_folder}$i.mp4" ]]
- echo "${films_folder}$i.mp4 not exist"
- echo "Converting "$i"."
- 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
- echo "Convert "$i" to mp4 is done!"
- else shift
- fi
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement