#!/usr/bin/env bash
total=0
for file in *; do
  duration=$(ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 "$file")
  total=$(echo "$total + $duration" |  bc)
  echo "$file: $duration seconds"
done
echo "--------------------------------------------------"
echo "TOTAL: $total seconds"
