Last active 9 hours ago
https://unix.stackexchange.com/questions/587646/how-to-get-the-total-duration-of-all-video-files-in-current-folder-and-sub-direc
0
0
1
| 1 | # Recursive all files in dir |
| 2 | exiftool -ext mp4 -r -n -q -p '${Duration;$_ = ConvertDuration(our $total += $_)}' . | tail -n 1 |
| 3 | |
| 4 | # More control |
| 5 | # calc-durs Replay_* - all files matching glob in single folder only |
| 6 | # calc-durations -r Replay_* - recursive in all folders |
| 7 | calc-durs() { |
| 8 | local -a files |
| 9 | if [[ "$1" == "-r" ]]; then |
| 10 | shift |