Advertisement
sroller

HEVC, WEBM creation

Jan 10th, 2017
263
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 2.25 KB | None | 0 0
  1. SETLOCAL
  2. TIMER /1 /Q ON
  3. PATH=C:\UTIL;C:\WINDOWS;C:\WINDOWS\SYSTEM32
  4. SET FNAME=%@NAME[%1]
  5. REM possible loglevels: quiet, panic, fatal, error, warning, info, verbose, debug, trace
  6. SET LOGLEVEL=verbose
  7. : constant rate factor aka quality
  8. SET CRF=28
  9. SET PRESET=veryslow
  10.  
  11. goto hevc
  12.  
  13. :best-vod
  14. ffmpeg -y -v %LOGLEVEL% -i %* -c:v libvpx-vp9 -pass 1 -b:v 0 -crf 33 -threads 8 -speed 4 -tile-columns 6 -frame-parallel 1 -an -f webm nul
  15. ffmpeg -y -v %LOGLEVEL% -i %* -c:v libvpx-vp9 -pass 2 -b:v 0 -crf 33 -threads 8 -speed 2 -tile-columns 6 -frame-parallel 1 -auto-alt-ref 1 -lag-in-frames 25 -c:a libopus -b:a 128k -f webm %FNAME%-best-vod.webm
  16.  
  17. :GOTO ENDE
  18.  
  19. :1400K
  20. ffmpeg -y -v %LOGLEVEL% -i %* -c:v libvpx-vp9 -pass 1 -b:v 1400K -crf 33 -threads 8 -speed 4 -tile-columns 6 -frame-parallel 1 -an -f webm nul
  21. ffmpeg -y -v %LOGLEVEL% -i %* -c:v libvpx-vp9 -pass 2 -b:v 1400K -crf 33 -threads 8 -speed 2 -tile-columns 6 -frame-parallel 1 -auto-alt-ref 1 -lag-in-frames 25 -c:a libopus -b:a 64k -f webm %FNAME%-1400K.webm
  22.  
  23. :GOTO ENDE
  24.  
  25. :best-quality
  26. ffmpeg -y -v %LOGLEVEL% -i %* -c:v libvpx-vp9 -pass 1 -b:v 0 -crf %CRF% -threads 1 -speed 4 -tile-columns 0 -frame-parallel 0 -g 9999 -aq-mode 0 -an -f webm nul
  27.  
  28. ffmpeg -y -v %LOGLEVEL% -i %* -c:v libvpx-vp9 -pass 2 -b:v 0 -crf %CRF% -threads 1 -speed 0 -tile-columns 0 -frame-parallel 0 -auto-alt-ref 1 -lag-in-frames 25 -g 9999 -aq-mode 0 -c:a libopus -b:a 64k -f webm %FNAME%-two-pass-crf%crf%.webm
  29.  
  30. GOTO ENDE
  31.  
  32. :crf
  33. ffmpeg -y -v %LOGLEVEL% -i %* -c:v libvpx-vp9 -b:v 0 -crf %CRF% -preset %PRESET% -threads 1 -speed 0 -tile-columns 0 -frame-parallel 0 -auto-alt-ref 1 -lag-in-frames 25 -g 9999 -aq-mode 0 -c:a libopus -b:a 128k %FNAME%-vp9-%PRESET%-crf%crf%.webm
  34.  
  35. GOTO ende
  36.  
  37. :hevc
  38. ffmpeg -v %LOGLEVEL% -i %* -c:v libx265 -vf yadif -b:v 0 -crf %CRF% -preset %PRESET% -threads 1 -speed 0 -tile-columns 0 -frame-parallel 0 -auto-alt-ref 1 -lag-in-frames 25 -g 9999 -aq-mode 0 -c:a aac -b:a 128k %FNAME%-HEVC-%PRESET%-crf%CRF%.mp4
  39. : ffmpeg -v %LOGLEVEL% -i %* -c:v libx265 -flags +ilme -b:v 0 -crf %CRF% -preset %PRESET% -threads 1 -speed 0 -tile-columns 0 -frame-parallel 0 -auto-alt-ref 1 -lag-in-frames 25 -g 9999 -aq-mode 0 -c:a aac -b:a 128k %FNAME%-HEVC-%PRESET%-crf%CRF%.mp4
  40.  
  41. GOTO ENDE
  42.  
  43. :ENDE
  44. TIMER /1 OFF
  45. ENDLOCAL
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement