Last active
December 7, 2019 12:38
-
-
Save UdaraAlwis/d830d88790a7307de79047460c6235a2 to your computer and use it in GitHub Desktop.
Get Video file Playback time using ffprobe
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
:: Make sure ffprobe.exe and the video file is in the same folder | |
:: Download ffmpeg: https://www.ffmpeg.org/download.html | |
:: Command Line executable code | |
:: Get video length of a given mp4 file using ffprobe.exe | |
:: 0:01:01.812000 | |
:: HOURS:MM:SS.MICROSECONDS | |
ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 video_file_name.mp4 -sexagesimal | |
:: Get video length of a given mp4 files (loop through files) | |
for %i in ("*.mp4") do ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 "%i" -sexagesimal | |
:: integrate to executable .bat file - use %% | |
for %%a in ("*.mp4") do ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 "%%a" -sexagesimal | |
pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment