Sei sulla pagina 1di 2

undefined

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

REQUIREMENTS
Linux standard GNU utils (should also work under *BSD and Solaris) getopt (normally part of the GNU utils) awk/gawk/mawk Mplayer ImageMagick

FILES
make_caps.sh

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 -o, --offset <start in seconds> -e, --end <end in seconds> -i, --interval <time between screencaps> -n, --number <number of screencaps> -s, --scale <scale factor> -c, --crop <crop-spec> -a, --autocrop -p, --prefix <prefix> -x, --no-timestamps -f, --fontsize <fontsite in pixels> -l, --columns <number of columns> --pause --dont-delete-caps -h, --help -V, --version the movie> Start capturing here (default: 0). End capturing here (default: length of the movie). Specifying a negative ends capturing an movielength-value. Interval between screencaps (default: 30). Specify how many screencaps should be taken. This overwrites -i. Scale the screencaps by this factor (default: no scaling). Crop the images using Imagemagick. See Imagemagick (1) details. Trim the picture's edges via an simple heuristic. Prefix of the screencaps (default: ). Don't write timestamps into the screencaps. Default is 24. Number of columns the final picture sheets should have (default: 4). Wait before composing the final picture. You may modify or delete some of the screencaps before they are composed into the final image. Do not delete the screen captures afterwards. Print this message and exit. 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
Looking for a good scaling factor? Play your movie with mplayer -xy FACTOR movie.avi to get a preview. Want more control over the layout of the final capture sheet? Have a look at this page and change the script accordingly.

TO DO
Currently, mplayer seems to only make screenshots at keyframes. Find a way to capture arbitrary frames. Better error checks. Better customization of the timestamps (colors, font, etc.). Create a GUI Make a clean rewrite in perl or python...

CHANGELOG
Version 0.5: Fixed another "off by one"-bug. Version 0.4: now accepts negative values. Added --pause and --dont-delete-caps. Default fontsite reduced to 24. Timestamps are now inserted into the lower left corner. Fixed "create more images than needed". Small fixes and spelling.
-e

Version 0.3: Added --number. Added turning off of timestamps. Added cropping. Small fixes and spelling. Version 0.2: Fixed lots of typos and a few bugs I don't remember anymore. "Added" webpage. Version 0.1: Initial Release.

CONTACT
moviecaps@livemy.de

Sponsored by

undefined

Potrebbero piacerti anche