Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Storage & Archiving A way to see total duration of footage from multiple files in a Mac?

  • A way to see total duration of footage from multiple files in a Mac?

  • Ignacio Segato

    September 1, 2020 at 2:09 pm

    Hello this is a question that has been bothering me for years:

    Does anyone know of a way to quickly check the total duration of footage, on a folder, or selecting multiple video files, specifically on a Mac?

    For me this is very a relevant issue, because when we organize rushes I feel that knowing easily the amount of footage shot is key to anticipate how much work we are giving to an editor, for instance. In any case it just feels like important information we should be able to produce with more ease, for archiving for instance: this is information I would put on a volume’s final name.

    VLC playlist is not a real solution since it always shaves off a few seconds, and is inconsistent, perhaps due to drop/non-drop settings.

    These days I normally open an empty Premiere Pro project in order to put things on a timeline, and then check total duration. But it’s a very clumsy process. There must be an easier tool! I’ve been poking around Adobe Bridge, and Prelude, but haven’t found this functionality in a practical way yet.

    Thank you for any help!

  • Terry Barnum

    September 7, 2020 at 9:00 pm

    If you have installed ffmpeg, you have ffprobe which can calculate durations. In the, navigate to the directory that contains the video files or type cd and a space then drag the folder containing the videos onto the terminal window and hit return. Then run this command (hopefully the forum doesn’t mess with the characters or formatting).

    find . -maxdepth 1 -iname ‘*.mp4’ -exec ffprobe -v quiet -of csv=p=0 -show_entries format=duration {} \; | paste -sd+ -| bc

    It will do a search for all mp4 files in the current directory, then run ffprobe to get each of their durations and paste the results into a calculator to tally them. If your files are not mp4s but are .mov for example, change ‘*.mp4’ to ‘*.mov’

  • Ignacio Segato

    September 7, 2020 at 9:18 pm

    Amazing, thank you!!!!!!

    I had a little problem though: I am getting this message:

    syntax error near unexpected token ` |’

    I am trying to figure out which character is off. Can you tell?

    Someone should seriously create a script for this, don’t you think?

  • Rich Rubasch

    September 7, 2020 at 9:41 pm

    I used to love a feature in Avid where you could open a bin full of clips and select all or a group of clips and simply hit Command-I and it would give the total running time. Very cool. Avid’s database back end and the way it understood timecode was very impressive. Not helpful for this post however!

  • Terry Barnum

    September 8, 2020 at 8:10 pm

    Hi Ignacio. The forum changed some of the formatting. Try this:

    find . -maxdepth 1 -iname '*.mp4' -exec ffprobe -v quiet -of csv=p=0 -show_entries format=duration {} \; | paste -sd+ - | bc

    You will need ffmpeg installed to get ffprobe (from, or homebrew).

Viewing 1 - 5 of 5 posts

Log in to reply.

We use anonymous cookies to give you the best experience we can. Our Privacy policy | GDPR Policy