Created
October 8, 2021 20:01
-
-
Save Shubhayu-Das/c61c5f92394b65413a942bc0841e97b0 to your computer and use it in GitHub Desktop.
Script to find duration of all videos in a folder
This file contains 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
find . -maxdepth 1 -iname '*.mp4' -exec ffprobe -v quiet -of csv=p=0 -show_entries format=duration {} \; | paste -sd+ -| bc | awk '{printf("%d:%02d:%02d:%02d\n",($1/60/60/24),($1/60/60%24),($1/60%60),($1%60))}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment