dotfiles/scripts/videos-duration.sh

10 lines
217 B
Bash
Raw Normal View History

2023-09-11 17:43:24 +02:00
#!/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