Skip to content

Instantly share code, notes, and snippets.

@kickbase
Created November 11, 2019 03:17
Show Gist options
  • Select an option

  • Save kickbase/3cb13eb82571a763d6b216a891651afb to your computer and use it in GitHub Desktop.

Select an option

Save kickbase/3cb13eb82571a763d6b216a891651afb to your computer and use it in GitHub Desktop.
[ shellscript ] Check videos duration.
#!/bin/sh
# usage
# 1 chmod 755 check_duration.sh
# 2 ./check_duration.sh
for FILE in *.mp4
do
FILENAME=`echo ${FILE} | sed 's/\.[^\.]*$//'`
ffprobe -i ${FILENAME}.mp4 -show_entries format=filename,duration -sexagesimal -v quiet -of csv="p=0"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment