Skip to content

Instantly share code, notes, and snippets.

@seece
Created October 27, 2015 19:55
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save seece/dccb123b004011e53544 to your computer and use it in GitHub Desktop.
ffmpeg and imagemagick - split video to frames and back
rem see https://en.wikibooks.org/wiki/FFMPEG_An_Intermediate_Guide/image_sequence
ffmpeg -i "video.mp4" -vf -fps=14.985015 captures\out%04d.png
REM scale the frames and quantize to 24 color palette
for %%f in (%1\*.png) do ( E:\tools\imagemagick\convert.exe "%%f" -resize x144 -unsharp 0x1 -crop 160x144+48+0 -dither None -colors 24 -scale 300%% "%2\%%~nf.png" )
ffmpeg -framerate 14.985015 -i scaled\out%04d.png -crf 18 video.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment