Subir archivos a "/"

This commit is contained in:
2025-06-16 20:40:42 +00:00
commit d18c7723aa
5 changed files with 136 additions and 0 deletions

15
media.sh Normal file
View File

@ -0,0 +1,15 @@
#!/bin/bash
IFS=$'\n'
# accepts any list of files, eg. video_times *.{mp4,mov}
video_times() {
for file in $* ; do
duration=$(mediainfo --Output=JSON "$file" | jq -r '.media.track[] | select(."@type"=="General") | .Duration | tonumber | floor')
minutes=$(($duration / 60))
seconds=$(($duration % 60))
echo "$file: ${minutes}m${seconds}s"
done
}
video_times $*