Skip to content

Instantly share code, notes, and snippets.

@ik5
Created October 26, 2013 13:06
Show Gist options
  • Save ik5/7169258 to your computer and use it in GitHub Desktop.
Save ik5/7169258 to your computer and use it in GitHub Desktop.
Display the duration of a movie (mp4) to screen with it's file name.
#!/bin/bash
for i in *.mp4 ; do
echo -n $(basename $i .mp4)
echo -n ": "
ffmpeg -i $i 2>&1 | grep Duration | awk '{print $2}' | tr -d ,
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment