blob: 9d07e852873902d9665ad47abf97c4220b4659d3 (
plain)
1
2
3
4
5
6
7
8
9
10
|
#!/bin/sh -eu
printf 'DURATION\tSIZE\tB/MIN\tFILE\n'
for f in "$@"; do
dur=$(ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 "$f" | cut -d. -f1)
size=$(ls -l "$f" | awk '{print $5}')
hsize=$(ls -lh "$f" | awk '{print $5}')
bpm=$((size/dur))
printf '%dh%02dm%02ds\t%s\t%d\t%s\n' $((dur/3600)) $((dur/60%60)) $((dur%60)) $hsize $bpm "$f"
done
|