dotfiles/scripts/videos-duration.sh

10 lines
217 B
Bash
Executable File

#!/bin/bash
{
echo -n '(0'
find "${1-.}" -type f | while read -r f; do
echo -n +
ffprobe -v quiet -of csv=p=0 -show_entries format=duration "$f" | tr -d '\n'
done
echo -n ')s'
} | qalc