Author Topic: A script for making vidcaps. DrDOS  (Read 943 times)

Offline Texstar

  • Administrator
  • Super Villain
  • *****
  • Posts: 12519
A script for making vidcaps. DrDOS
« on: July 13, 2009, 04:25:39 AM »
This is a simple script using Imagemagick and SMplayer that you can use to make screen caps.


Code: [Select]
#!/bin/sh
IFS=$'\t\n'
echo "First, removing your old screen shots."
rm $HOME/snaps/*.png
echo "Press the S key to make a screen shot. Use the arrows to navigate."
echo "Close the player to start making your video screencap."
sleep 2
smplayer -actions "play" "$1"
echo "Please wait until the \"All tasks are completed\" notice is given."
echo ""
sleep 2
montage -adjoin -border 1 -quality 75 -geometry $2 -background '#000' -tile $3 $HOME/snaps/*.png $4.jpg
echo "All tasks are completed."
exit 1

# Usage: At the terminal prompt enter: bash $HOME/caps "your movie file and location" "width of each image" "number of images in a row" "your image file name"
# Example:   bash $HOME/caps "$HOME/Videos/Our trip to the beach.avi" 240 6 "Beach Trip"
# You can specify the rows and columns together, such as 6x5


Put it in your Home directory and name it caps. Make a directory named snaps. Set SMplayer to save screenshots to snaps in the png format. The script contains it own instructions. I'm sure that it can be improved greatly, adding text, etc., but this makes a good start. The caps it makes are quite attractive. It's easiest to use if you open the terminal in the directory containing the video file, then you only have to specify the file name. You will have more consistent results if you put the file name and result image name in quotes. It saves the image in .jpg format.

Thanks to everyone who donates. You keep the servers running.

Offline dobbs

  • Sr. Member
  • ****
  • Posts: 324
Re: A script for making vidcaps. DrDOS
« Reply #1 on: May 04, 2010, 01:32:53 PM »
Will this script still work for PCLinuxOS 2010 KDE?
Began the journey in 2006