Skip to content

Instantly share code, notes, and snippets.

@fernandojsg
Last active August 29, 2015 14:07
Show Gist options
  • Save fernandojsg/1db01393caac3841ceba to your computer and use it in GitHub Desktop.
Save fernandojsg/1db01393caac3841ceba to your computer and use it in GitHub Desktop.
Imagemagick tricks
Convert every *.jpg into a thumbnail with 85% quality and size 125 x Auto, named tn-{originalfilename}
$ for file in *.jpg; do convert $file -thumbnail 125x -quality 85 tn-$file; done
$ for file in *.jpg; do convert $file -resize 800x600\! $file; done
Get screenshot from video frame
$ ffmpeg -ss 00:09:00 in.avi -vcodec png -vframes 1 -an -f rawvideo -s 119x64 out.png
or
$ffmpeg -ss 00:09:00 in.avi -vcodec mjpeg -vframes 1 -an -f rawvideo -s 119x64 out.jpg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment