Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env bash
- set -ex
- # fucking windows
- #input="$(cygpath -w "$1")"
- escapedinput="${1//\\/\\\\}"
- escapedinput="${escapedinput//\'/\\\'\\\'}"
- echo "$escapedinput"
- # no subtitles or already hardsubed
- #exec ffmpeg -i "$1" -vf "format=yuv420p" -c:a aac -b:a 160k -ac 2 -c:v libx264 -preset fast -crf 28 -tune animation "$2"
- # softsubbed
- # flock for queueing
- flock /tmp/vrcencode ffmpeg -i "$1" -vf 'format=yuv420p,subtitles=filename='\'"${escapedinput}"\' -c:v libx264 -preset fast -crf 28 -tune animation -movflags faststart -c:a aac -b:a 160k -ac 2 "$2"
- # anamorphic
- #flock /tmp/vrcencode ffmpeg -i "$1" -vf 'scale=iw*sar:ih,setsar=1,format=yuv420p,subtitles=filename='\'"${escapedinput}"\' -c:v libx264 -preset fast -crf 28 -tune animation -movflags faststart -c:a aac -b:a 160k -ac 2 "$2"
- # wacky files wth multiple language subs
- #exec ffmpeg -i "$1" -map 0:0 -map 0:2 -vf "format=yuv420p,subtitles=filename=${escapedinput}" -c:a aac -b:a 160k -ac 2 -c:v libx264 -preset fast -crf 28 -tune animation "$2"
Add Comment
Please, Sign In to add comment