GeSHi Source Viewer: encode_vp9.batView Raw


  1. @echo off
  2. set ztmp_ffmpeg=C:\bin\ffmpeg64.exe
  3. setlocal EnableExtensions
  4. setlocal EnableDelayedExpansion
  5. set ztmp_src=%1
  6. set ztmp_dest=%~n1.webm
  7. if exist "%ztmp_src%" (
  8. 	%ztmp_ffmpeg% -y -i "%ztmp_src%" -pass 1 -vf scale=1920:1080 -c:v libvpx-vp9 -crf 10 -b:v 3500k -threads 1 -tile-columns 0 -frame-parallel 0 -g 30 -aq-mode 0 -an -f webm "%ztmp_dest%"
  9. 	%ztmp_ffmpeg% -y -i "%ztmp_src%" -pass 2 -vf scale=1920:1080 -c:v libvpx-vp9 -crf 10 -b:v 3500k -threads 1 -tile-columns 0 -frame-parallel 0 -auto-alt-ref 1 -lag-in-frames 25 -g 30 -aq-mode 0 -an -f webm "%ztmp_dest%"
  10. 	del ffmpeg2pass-0.log
  11. ) else (
  12. 	echo Could not find file %ztmp_src%
  13. 	goto :failed
  14. )
  15.  
  16. goto :cleanup
  17.  
  18. :cleanup
  19. set "ztmp_src="
  20. set "ztmp_dest="
  21. goto :eof
  22.  
  23. :failed
  24. echo This stage of the encoding has failed...
  25. goto :cleanup
  26.