Site hosted by Angelfire.com: Build your free website today!

MovieCaps

This shell script creates a sheet with screen captures from a movie.

Requirements

Files

Installation

  1. Download make_caps.sh and put it somewhere into your $PATH (e.g. /usr/local/bin).
  2. Make the file executable: chmod a+x make_caps.sh.

Usage

Type make_caps.sh --help to get a short description of the program:
Usage: make_caps.sh [OPTIONS] <filename of the movie>
 -o, --offset <start in seconds>           Start capturing here (default: 0).
 -e, --end <end in seconds>                End capturing here (default: length of the movie). Specifying a negative ends capturing an movielength-value.
 -i, --interval <time between screencaps>  Interval between screencaps (default: 30).
 -n, --number <number of screencaps>       Specify how many screencaps should be taken. This overwrites -i.
 
 -s, --scale <scale factor>                Scale the screencaps by this factor (default: no scaling).

 -c, --crop <crop-spec>                    Crop the images using Imagemagick. See Imagemagick (1) details.
 -a, --autocrop                            Trim the picture's edges via an simple heuristic.
 
 -p, --prefix <prefix>                     Prefix of the screencaps (default: ).
 
 -x, --no-timestamps                       Don't write timestamps into the screencaps.
 -f, --fontsize <fontsite in pixels>       Default is 24.
 
 -l, --columns <number of columns>         Number of columns the final picture sheets should have (default: 4).
     --pause                               Wait before composing the final picture. You may modify or delete some of the
                                           screencaps before they are composed into the final image.
     --dont-delete-caps                    Do not delete the screen captures afterwards.
     
 -h, --help                                Print this message and exit.
 -V, --version                             Print the version and exit.

Work cycle

make_caps.sh determines which frames are to be captured. For every frame, it
  1. Captures the frame with mplayer, optionaly scaling it.
  2. If requested, the frame is cropped.
  3. A timestamp is added to the picture
After grabbing, the program pauses to enable the user to inspect the screencaps and delete any unwanted pictures. After a keypress, the remaining screen captures are composed into a single sheet.

Examples

Make a screendump every 20 second:
make_caps.sh --interval 20 movie.avi
Make 24 screendumps from the first five minutes of the movie without creating timestamps. Shrink the screendumps to 50% of the original size:
make_caps.sh --number 24 --end 300 --scale 0.5 --no-timestamps movie.avi
Let's assume our movie looks like this (x = 30 pixels, y = 20 pixels, width = 160 pixels and height = 120 pixels):

To crop the image accordingly, do this:

make_caps.sh --crop 160x120+30+20 movie.avi
Consult this site for further information.

Screenshots

Everybody loves screenshots (pun intended *g*)! Here's a capture sheet of the trailer of Metal Gear Solid 4, made via
make_caps.sh -o 20 -e -42 -s 0.35 -f 16 -l 4 -n 24 mgs4_trailer.avi:

MGS4 Trailer

Tips

To Do

Changelog

Version 0.5:
Version 0.4:
Version 0.3:
Version 0.2:
Version 0.1:

Contact

moviecaps@livemy.de