Skip to content

Instantly share code, notes, and snippets.

@ohnotnow
Created October 15, 2021 17:16
Show Gist options
  • Save ohnotnow/1d9fc31e43506292dfb365a37cbc3112 to your computer and use it in GitHub Desktop.
Save ohnotnow/1d9fc31e43506292dfb365a37cbc3112 to your computer and use it in GitHub Desktop.
Get the length of a video (in minutes) using ffprobe
#!/bin/bash
T=`ffprobe -i "$1" -v quiet -show_entries format=duration -hide_banner | grep duration | cut -f2 -d'='` && echo "${T}/60" | bc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment