Skip to content

Instantly share code, notes, and snippets.

@BrunoReX
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BrunoReX/fe8f659c31186328d317 to your computer and use it in GitHub Desktop.
Save BrunoReX/fe8f659c31186328d317 to your computer and use it in GitHub Desktop.
Prints file name and framerate from video files inside of the current folder
@echo off
Setlocal EnableDelayedExpansion
REM Path to MediaInfo executable, not needed if already in PATH
set MEDIAINFO_EXE=mediainfo
REM Cleanup
del /f /q framerates.txt
REM Add or remove extensions if needed
for /r %%a in (*.mp4;*.mpg;*.mpeg*) do (
REM Prints the full path of the file into text file (change %%~fa to %%~nxa to print file name plus extension)
echo %%~fa>>framerates.txt
REM Get framerate from MediaInfo output and print into the text file
"%MEDIAINFO_EXE%" --Output="Video;%%FrameRate%%" "%%~a">>framerates.txt
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment