NOTE:
This website is alive and growing.
Devices Configuration
Linux Stopmotion can capture your frames from webcams and MiniDv cameras. Herman Robak set up an experimental grabber for DSLR cameras.
Tools and devices for capture will not be set automatically. Capture settings must be set up manually in the Settings -> Configure Stopmotion window, using only the first two tabs:
Video device: to set the camera you are using.
Video import: to set the external command line application you are going to use for grabbing.
The external command line applications used for grabbing must be installed separately.
Capture from webcams
Video device
Plug in your webcam and open Stopmotion. It should be automatically detected and listed in the Video device tab.
Video import tool
Option 1 - VGRABBJ
Install vgrabbj with the following terminal command:
sudo apt-get install vgrabbj
In the video import tool select vgrabbj VGA daemon
Apply.
If you put your webcam in front of you, attached to the opposite end of the table you are sitting at, you might want to rotate the image 180 degrees. In that case, select vgrabbj rotated as your import tool.
VGRABBJ issues
Unfortunately vgabbj is a stalled project. It was developed untill 2008. For this reason it supports only Video for Linux 1 (V4L1) devices. V4L1 is now deprecated, in favour of V4L2. Modern kernels (like the one shipped with Ubuntu 11.10) have dropped the support for V4L1.
Fortunately in 2010 Debian packagers modified vgrabbj to support also V4L2 cameras through the libv4l library.
For this reason vgrabbj may have some issues, depending on the age of your system:
- on systems before 2008: it suppors only V4L1
- on systems between 2008 and 2010 (e.g Ubuntu 11.10): it supports only v4L1. It is dropped by systems that have dropped V4L1.
- on systems after 2010 (e.g. Ubuntu 12.04): it supports both V4L1 and V4L2 cameras
Option 2 - UVCCAPTURE (recommended)
Install uvccapture with the following terminal command:
sudo apt-get install uvccapture
Go back to the Stopmotion configuration window, Video import tab.
Select uvccapture - grab from V4L devices.
Click on Apply and Close the configuration window. Stopmotion is now ready to capture from your webcam.
Stopmotion will grab your frames with a resolution of 640x480 pixels by default.
If you want to capture at a different resolution:
- select the uvccapture line
- click on Edit
- on the command line adjust the resolution to your wish (and to your webcam supported resolutions)
- Click on Apply and Close the configuration window.
Only for old source code (before March 3, 2012)
- Go back to the Stopmotion configuration window, Video import tab.
- Click on the Add button. A new line will be created.
- Double click in the new Name text field. Type: uvccapture.
- Double click in the new Description text field. Type: grabbing from V4L2 devices
- Click on the Edit button. If the text is not properly displayed, enlarge the window by dragging its bottom border downwards.
- In the Pre-poll command text field copy and paste the following command:
uvccapture -d$VIDEODEVICE -x640 -y480 -o$IMAGEFILE
.
Adjust the resolution to your case.- Leave the other two fields blank.
- Click on Apply and Close the configuration window. Stopmotion is now ready to capture from your webcam.
UVCCAPTURE issues
uvccapture counts the time in seconds. For this reason the smaller supported framerate is 1 fps. This will give you a pretty slow preview, with frames updated every second. This problem is being addressed.
See also the uvccapture related Stopmotion bugs
Capture from MiniDV cameras
Video device
- Double click in an empty Name text field. Type: MiniDV.
- Double click in the Description text field on the right. Type: MiniDV firewire camera
- Click on the Edit button. If the text is not properly displayed, enlarge the window by dragging its bottom border downwards.
- In the Video device text field enter:
/dev/raw1394
- Click on Apply.
Video import tool
The tool to use for capturing is dvgrab. The dvgrab package available in Ubuntu (up to 11.10 at least) misses a very important improvement added to the code: the possibility to capture JPEG images in high quality. For this reason I recommend you install dvgrab by compiling it from source. Use svn revision 1464 or a more recent one.
How to compile latest dvgrab
Get the latest source code with the following terminal commands:
sudo apt-get install subversion
svn checkout https://svn.code.sf.net/p/kino/code/trunk/dvgrab
(if you think nothing is happening, just be patient for a few seconds)
Get dependencies with:
sudo apt-get build-dep dvgrab
sudo apt-get install autoconf
Compile it with:
cd dvgrab autoreconf -i --force ./configure make sudo make install sudo ldconfig
Only for old source code (before March 3, 2012)
- Go back to the Stopmotion configuration window.
- Select the device called dvgrab - Grabbing from DV-cam. Leave the experimental one behind.
- Click on the Edit button. If the text is not properly displayed, enlarge the window by dragging its bottom border downwards.
- Delete the long command you find in the Stard deamon text field and replace it with:
dvgrab --format jpeg --jpeg-overwrite --jpeg-temp dvtemp.jpeg --every 25 $IMAGEFILE &To know more see the dvgrab related bug reports.
Connect your MiniDV camera to your computer using the firewire cable. Remember that to avoid the risk of burning your camera firewire card you should do this operation with both camera and computer off.
Turn the camera on and set it on record mode.
Stopmotion is now ready to capture from your MiniDv camera.
Capture from DSLR cameras
Stopmotion can support capture from the DSLR cameras that have the live view feature. At present Stopmotion captures frames from the live view, allowing a good but not HD resolution.
In the future it would be nice to make Stopmotion work with proxies, saving HD pictures and previewing low res pictures.
So far only a few DSLR cameras have been tested:
- Canon EOS 7D
- Canon EOS 1100D (live view resolution: 1056x704)
- Canon EOS 60D (live view resolution: 1056x704)
- Nikon D90 (live view resolution: 640x426)
- Nikon D5100
Video device
- Double click in an empty Name text field. Type: Canon EOS 60D.
- Double click in the Description text field on the right. Type: my DSLR camera
- Click on the Edit button. If the text is not properly displayed, enlarge the window by dragging its bottom border downwards.
- In the Video device text field enter:
/dev/video0
If you have a laptop with an integrated webcam you should change the line to /dev/video1. If you have more USB video devices plugged in, you should type /dev/video2. - Click on Apply.
Video import tool
The tool for grabbing from DSLR cameras is gphoto. Install it with the following terminal command:
sudo apt-get install libgphoto2-2-dev
Unfortunately gphoto has not all the functionalities needed for a proper frame capture. For this reason Herman Robak made up a small command line tool to make gphoto the right tool for the task. It is called StubGrabber. As the name suggests it is a prototype.
Get the latest StubGrabber from our SourceForge repository with the commands:
sudo apt-get install git-core git clone git://git.code.sf.net/p/linuxstopmotion/fe09/code linuxstopmotion-fe09-code
Compile it with the following terminal commands:
cd linuxstopmotion-fe09-code/stubgrabber
gcc -o stubgrabber preview-capture.c -lgphoto2
Now we can go back to Stopmotion configuration window, Video import tab.
- Click on the Add button. A new line will be created.
- Double click in the new Name text field. Type: gphoto.
- Double click in the new Description text field. Type: StubGrabber for DSLR cameras
- Click on the Edit button. If the text is not properly displayed, enlarge the window by dragging its bottom border downwards.
- Leave the Pre-poll command field blank.
- In the Start deamon text field copy and paste the following command:
/home/raffa/linuxstopmotion-fe09-code/stubgrabber/stubgrabber $IMAGEFILE &
Adjust the path to the stubgrabber file to your case, reflecting the location of the StubGrabber folder. - In the Stop deamon text field type:
kill -9 $(pidof stubgrabber)
- Click on Apply and Close the configuration window.
Stopmotion is now ready to capture from your camera.
DSLR tips
gpcont
Normally you have to prepare your DSLR camera before connecting it to the computer (e.g adjusting white balance and exposure) because once connected to the computer most setting will be locked out. You'll be left only with adjustable zoom and focus. Alternatively, you can use gpcont, an utility that allow adjusting the settings of your camera directly from your computer. To install and use it follow the instructions below.
- To install gpcont you first need to install its dependencies. Use the following terminal command:
sudo apt-get install git-core libgphoto2-2-dev libqt4-dev
- Download the gpcont source code from the utils LSM repo with the command:
git clone git://git.code.sf.net/p/linuxstopmotion/fe09/code linuxstopmotion-fe09-code
- Enter the gpcont folder with the command:
cd linuxstopmotion-fe09-code/gpcont
- Then compile it with the commands:
qmake gpcont2.pro
make
- Connect your camera and turn it on. Make sure it is not mounted.
- Then run gpcont with the command:
./gpcont2
A window with three sliders should appear.
You need to look at the camera's screen to see the effect of the sliders adjustments. If you don't see any change, then I bet you run gpcont before connecting the camera and turning it on.
To update the util source use the following commands:
cd linuxstopmotion-fe09-code
git pull
Automount
When you turn on the camera Ubuntu will likely automount it. You have to unmount it to make gphoto work.
When you connect Stopmotion to the camera and click with your mouse on the Stopmotion camera button you'll hear a click-sound from the camera.