Created
January 8, 2026 02:25
-
-
Save managedkaos/72aa5036208c3feb951598ebd0689046 to your computer and use it in GitHub Desktop.
A script to extract the length of a video from media files on macOS devices.
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
| #!/bin/bash | |
| find . -type f -name "*.mov" -print0 | while IFS= read -r -d '' f; | |
| do | |
| echo "$(mdls -name kMDItemDurationSeconds -raw "$f" \ | |
| | awk '{printf "%02d:%02d:%02d", $1/3600,$1%3600/60,$1%60}') - $f" | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment