Advertisement
Guest User

Untitled

a guest
Oct 3rd, 2016
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.60 KB | None | 0 0
  1. @echo off
  2. set bv=0
  3. set crf=35
  4. set gop=480
  5. set threads=4
  6. set ffmpeg=%~dp0
  7. set list=%~dp0list.txt
  8. set subt=-sn
  9. set scaleV=720
  10. set output=%DATE:~0,5%.%DATE:~8,2%[%TIME:~0,2%-%TIME:~3,2%-%TIME:~6,2%]
  11. for /F "delims=" %%n in ('findstr /N /R "." %list%') do set "coun=%%n"
  12. for /F "delims=:" %%y in ("%coun%") do set "count=%%y"
  13. set count-=1
  14. set strcount=1
  15. echo %count% files to encode
  16. :loopstart
  17. for /F "delims=" %%i in ('findstr /B /L /C:"%strcount% " %list%') do set "string=%%i"
  18. set /a strcount+=1
  19. for /F "tokens=1,2,3,4 delims= " %%a in ("%string%") do set "xx=%%a" &set "ss=%%b" &set "to=%%c" &set "source=%%d"
  20. if %ss% neq huy (
  21. set "sst=-ss %ss% "
  22. ) else (
  23. set "sst="
  24. )
  25. if %to% neq huy (
  26. set "tot=-to %to% "
  27. ) else (
  28. set "tot="
  29. )
  30. set namae=%source%
  31. %ffmpeg%ffmpeg.exe -i %ffmpeg%%source% -c:v libvpx-vp9 -y -b:v %bv% -crf %crf% -threads %threads% -frame-parallel 0 -tile-columns 2 -strict -2 -rc_lookahead 25 -lag-in-frames 16 -g %gop% -sc_threshold 40 -auto-alt-ref 1 -arnr_strength 3 -arnr_max_frames 8 -arnr-type centered -c:a libopus -b:a 64K -vf scale=-1:%scaleV% -pix_fmt yuv420p -speed 4 -pass 1 %sst%%tot%-f webm NUL
  32. %ffmpeg%ffmpeg.exe -i %ffmpeg%%source% -c:v libvpx-vp9 -y -b:v %bv% -crf %crf% -threads %threads% -frame-parallel 0 -tile-columns 2 -strict -2 -rc_lookahead 25 -lag-in-frames 16 -g %gop% -sc_threshold 40 -auto-alt-ref 1 -arnr_strength 3 -arnr_max_frames 8 -arnr-type centered -c:a libopus -b:a 64K -vf scale=-1:%scaleV% -pix_fmt yuv420p -speed 1 -pass 2 %sst%%tot%-f webm %ffmpeg%webm%output%.webm
  33. set /a count-=1
  34. if %count% neq 0 (
  35. goto :loopstart
  36. ) else (
  37. exit /b
  38. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement