Created
September 15, 2018 12:22
-
-
Save blurymind/f6c11ee8eacde4a50f711e46dafd37b0 to your computer and use it in GitHub Desktop.
Simple Batch script to extract frames from a video file- uses ffmpeg
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
echo This requires you to install ffmpeg | |
REM ffmpeg -i file.mov -r 24/1 output%03d.png | |
REM nxF is for file with ext | |
for %%F in ("%~1") do SET fileNameExt=%%~nxF | |
for %%F in ("%~1") do SET fileName=%%~nF | |
echo file name is: %fileName% | |
SET ffmpegPath=C:\ffmpeg\bin\ffmpeg.exe | |
SET fps=30 | |
echo Trying to run %ffmpegPath% | |
echo opening "%~1" | |
echo Fps used: %fps% | |
if not exist "%fileName%" mkdir "%fileName%" | |
%ffmpegPath% -i "%~1" -r %fps%/1 %fileName%/%fileNameExt%-%%03d.png | |
REM pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment