Skip to content

Instantly share code, notes, and snippets.

@TimothyLoyer
Last active August 29, 2015 14:04
Show Gist options
  • Save TimothyLoyer/36c7810bb2c9255d036d to your computer and use it in GitHub Desktop.
Save TimothyLoyer/36c7810bb2c9255d036d to your computer and use it in GitHub Desktop.
12 Stars Media Vidpainter
@echo off
echo ____ _____ ______ _________ ________ ______ ______
echo /___/\ /_____/\ /_____/\ /________/\/_______/\ /_____/\ /_____/\
echo \_::\ \ \:::_:\ \ \::::_\/_\__.::.__\/\::: _ \ \\:::_ \ \ \::::_\/_
echo \::\ \ _\:\^| \:\/___/\ \::\ \ \::(_) \ \\:(_) ) )_\:\/___/\
echo _\: \ \__ /::_/__ \_::._\:\ \::\ \ \:: __ \ \\: __ `\ \\_::._\:\
echo /__\: \__/\\:\____/\ /____\:\ \::\ \ \:.\ \ \ \\ \ `\ \ \ /____\:\
echo \________\/_\_____\/_____\_____\/__ \__\/___ \__\/\__\/ \_\/ \_\/ \_____\/
echo.
echo ........................................................................
echo : _ ___ __ ____ _ _____ :
echo : ^| ^| / / (_) ____/ / __ ____ / __ \/ ^| / / ^| :
echo : ^| ^| / / / / / __ / / _ \ / __ \ / / / / ^|/ / /^| ^| :
echo : ^| ^|/ / / / / /_/ / / __/ / /_/ / / /_/ / /^| / ___ ^| :
echo : ^|___/ /_/ \__,_/ \___/ \____/ /_____/_/ ^|_/_/ ^|_^| :
echo ........................................................................
echo.
echo REQUIRES: Windows and ImageMagick from imagemagick.org
echo.
echo Let's get some information...
echo.
set /p CanvasWidth= How many inches wide?
set /p CanvasHeight= How many inches tall?
set /p CanvasDPI= How many pixels per inch?
set /p FpsLimit= How many frames per second would you like to capture? (recommend 1-25)
set /a PixelWidth=CanvasWidth*CanvasDPI
set /a PixelHeight=CanvasHeight*CanvasDPI
mkdir "./VideoDNA-temp"
echo Attempting to extract frames...
ffmpeg -i "%~1" -r %FpsLimit% -s 32x%PixelHeight% VideoDNA-temp/temp-%%05d.bmp
echo Frames extracted.
echo Attemping to stitch together frames... (this will take a while)
montage VideoDNA-temp/temp-*.bmp -resize 32x%PixelHeight%^ -mode Concatenate -tile x1 -geometry 32x%PixelHeight%+0+0 VideoDNA-temp.png
convert VideoDNA-temp.png -resize %PixelWidth%x%PixelHeight%! VideoDNA.png
echo.
echo Cleaning up temp files.
cd "VideoDNA-temp"
del "temp-*.bmp"
cd "../"
rmdir "VideoDNA-temp"
del "VideoDNA-temp.png"
echo.
echo Job Done.
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment