Commit 1af467bf authored by Ken Fallon's avatar Ken Fallon

2019-03-31_18-49-55_CEST

parent 461dc336
......@@ -2,9 +2,16 @@
# Copyright Ken Fallon - Released into the public domain. http://creativecommons.org/publicdomain/
find ${HOME}/processing/ -type f | egrep -v 'sponsor-anhonesthost.com-hpr15.flac|outro.flac|intro.flac|sponsor-archive.org.flac' | while read mediafile
do
duration=$( mediainfo --full --Output=XML "${mediafile}" | xmlstarlet sel -T -t -m "_:MediaInfo/_:media/_:track[@type='Audio']/_:Duration[1]" -v "." -n - | awk -F '.' '{print $1}' )
if [ "${duration}" != "" ]
then
echo "${mediafile}: ${duration}"
fi
duration=$( mediainfo --full --Output=XML "${mediafile}" | xmlstarlet sel -T -t -m "_:MediaInfo/_:media/_:track[@type='Audio']/_:Duration[1]" -v "." -n - | awk -F '.' '{print $1}' )
if [ "${duration}" != "" ]
then
echo "${mediafile}: ${duration}"
continue
fi
duration=$( /bin/date -ud "1970-01-01 $( ffprobe -i "${mediafile}" 2>&1| awk -F ': |, ' '/Duration:/ { print $2 }' )" +%s )
if [ "${duration}" != 0 ]
then
echo "${mediafile}: ${duration}"
continue
fi
done
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment