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/:/\\:}
- escapedinput="${escapedinput//\\/\\\\}"
- ##what the actual fuck
- escapedinput=${escapedinput//[/\\[}
- 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
- exec ffmpeg -i "$1" -vf "format=yuv420p,subtitles=filename=${escapedinput}" -c:a copy -c:v libx264 -preset fast -crf 28 -tune animation -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}:si=1" -c:a aac -b:a 160k -ac 2 -c:v libx264 -preset fast -crf 28 -tune animation "$2"
Advertisement
Add Comment
Please, Sign In to add comment