Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

Get total duration of video files in a directory

find . -maxdepth 1 -iname '*.mp4' -exec ffprobe -v quiet -of csv=p=0 -show_entries format=duration {} ;
149.233333
130.146667
275.690000

find . -maxdepth 1 -iname '*.mp4' -exec ffprobe -v quiet -of csv=p=0 -show_entries format=duration {} ; | paste -sd+ -| bc
555.070000
Source by unix.stackexchange.com #
 
PREVIOUS NEXT
Tagged: #Get #total #duration #video #files #directory
ADD COMMENT
Topic
Name
7+6 =