Skip to content

Instantly share code, notes, and snippets.

@FSX
Created June 7, 2012 18:29
Show Gist options
  • Save FSX/2890634 to your computer and use it in GitHub Desktop.
Save FSX/2890634 to your computer and use it in GitHub Desktop.
Make a set of thumbnails of a video.
#!/bin/bash
filename=$(basename $1)
# Uncomment for fancy notifications
# notify-send "$filename" "Created thumbnail overview..." --icon=emblem-videos-symbolic
Streams=$(ffmpeg -i $1 2>&1 | grep '^[[:blank:]]*Stream' | sed 's/^[^:]*.[^:]*..//;s/([^)]*.//g;s/ ,/,/g')
Text=$(echo "File: $filename\nSize: $(ls -lah $1 | awk '{ print $5}')\n$Streams")
# http://code.google.com/p/ffpoth/
# Seems to be dead; needs replacement
ffpoth -b1 -e-1 -n32 -w 200 "$1" | montage - -geometry +1+1 -tile 4x MIFF:- | convert label:"$Text" - -append "${filename%.*}-overview.png" &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment