Guest User

Untitled

a guest
Jul 7th, 2020
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.01 KB | None | 0 0
  1. #!/usr/bin/env bash
  2. set -ex
  3.  
  4. # fucking windows
  5. #input="$(cygpath -w "$1")"
  6. escapedinput="${1//\\/\\\\}"
  7. escapedinput="${escapedinput//\'/\\\'\\\'}"
  8. echo "$escapedinput"
  9.  
  10. # no subtitles or already hardsubed
  11. #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"
  12.  
  13. # softsubbed
  14. # flock for queueing
  15. 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"
  16.  
  17. # anamorphic
  18. #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"
  19.  
  20. # wacky files wth multiple language subs
  21. #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