Skip to content

Instantly share code, notes, and snippets.

@zerorooot
Last active December 1, 2022 05:23
Show Gist options
  • Save zerorooot/b8f2e8faf41192f4463a44a7ce2b3555 to your computer and use it in GitHub Desktop.
Save zerorooot/b8f2e8faf41192f4463a44a7ce2b3555 to your computer and use it in GitHub Desktop.
print video time when time < sometime
#!/bin/bash
(
IFS=$'\n'
for i in $(find -type f)
do
time=$(mediainfo -f $i | grep Duration |cut -d":" -f2 | head -1 | cut -d "." -f1)
min=480000
if [ ! -n "$time" ]; then
echo "$i IS NULL"
else
if [[ $time -le $min ]]; then
echo $i $time
#echo $i >>a.txt
#rm -rf $i
fi
fi
done
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment