add videos-duration script

This commit is contained in:
LordMZTE 2023-09-11 17:43:24 +02:00
parent d79192260e
commit b0775d032a
Signed by: LordMZTE
GPG key ID: B64802DC33A64FF6
2 changed files with 10 additions and 0 deletions

9
scripts/videos-duration.sh Executable file
View file

@ -0,0 +1,9 @@
#!/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

View file

@ -18,6 +18,7 @@
(mklink "scripts/startriver.sh" (bin-path "startriver"))
(mklink "scripts/update-nvim-plugins.rkt" (bin-path "update-nvim-plugins"))
(mklink "scripts/use-country-mirrors.sh" (bin-path "use-country-mirrors"))
(mklink "scripts/videos-duration.sh" (bin-path "videos-duration"))
;; Compile scripts
(install-zig "scripts/alecor")