Guest User

vrcencode.sh

a guest
Sep 29th, 2019
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.85 KB | None | 0 0
  1. #!/usr/bin/env bash
  2. set -ex
  3. # fucking windows
  4. #input="$(cygpath -w "$1")"
  5. escapedinput="${1//\\/\\\\}"
  6. escapedinput=${escapedinput/:/\\:}
  7. escapedinput="${escapedinput//\\/\\\\}"
  8. ##what the actual fuck
  9. escapedinput=${escapedinput//[/\\[}
  10. escapedinput=${escapedinput//]/\\]}
  11. #echo "$escapedinput"
  12.  
  13. # no subtitles or already hardsubed
  14. #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"
  15.  
  16. # softsubbed
  17. 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"
  18.  
  19. # wacky files wth multiple language subs
  20. #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