Skip to content

Instantly share code, notes, and snippets.

@Shubhayu-Das
Created November 9, 2021 17:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Shubhayu-Das/f4ffd45c5b87004223970aae1c657c5e to your computer and use it in GitHub Desktop.
Save Shubhayu-Das/f4ffd45c5b87004223970aae1c657c5e to your computer and use it in GitHub Desktop.
Shows the name and duration of all videos in a folder
#!/usr/bin/env bash
find . -maxdepth 1 -iname '*.mkv' | while read filename
do
# TODO: format output better
printf "$filename\t"
ffprobe -i "$filename" -show_entries format=duration -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