Advertisement
AyrA

GIF-high.bat

Jun 5th, 2015
349
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 0.53 KB | None | 0 0
  1. @ECHO OFF
  2.  
  3. REM Creates GIF files with high quality settings.
  4. REM Basically this will create a gif in the resolution and FPS of the source material
  5.  
  6. SETLOCAL
  7. PUSHD "%~dp0"
  8. IF "%~1"=="" GOTO HELP
  9. REM SET FILTER=fps=15,scale=320:-1:flags=lanczos
  10.  
  11.  
  12. :LOOP
  13. SET TMPPAL=%RANDOM%
  14. FFMPEG -i "%~1" -vf "palettegen" -y %TMPPAL%.PNG
  15. FFMPEG -i "%~1" -i %TMPPAL%.PNG -lavfi "paletteuse" -gifflags +transdiff -y "%TMPPAL%.gif"
  16. DEL %TMPPAL%.PNG
  17.  
  18. SHIFT
  19. IF "%~1"=="" GOTO END
  20. GOTO LOOP
  21.  
  22. :HELP
  23. ECHO Help
  24. GOTO END
  25.  
  26. :END
  27. POPD
  28. ENDLOCAL
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement