StopMotionAnimation.com

taking one frame at a time since 1999

Configuring Linux Stopmotion with DSLR camera and lossless export

Hi all, I wanted to share a solution to a problem I was having, in case someone else finds it useful.

There's a free program for Linux called "Stopmotion," which lets you capture and preview animation. Unfortunately, it's meant for webcams. So even if you can turn your DSLR camera into a webcam, it will just grab the latest frame from the live preview, instead of triggering a shuttered exposure.

Here is how you can fix that: First install gphoto2, which is a command-line tool for controlling cameras. Then in Stopmotion, go to Settings -> Configure Preferences -> Video Import tab. Then "Add" an option and give it a name. Next click Edit and add this command to the "Start daemon" field:

yes | gphoto2 --capture-image-and-download --keep --filename=$IMAGEFILE

Finally apply and close.

To capture a frame, press C or the "Toggle camera on/off" button. This should trigger an exposure on the DSLR. (Note you may have to "unmount" the camera from the computer's taskbar after plugging it in. Otherwise the Linux file browser and Stopmotion will be in competition for the USB port.)

Then to add that frame to the animation timeline, press Space or the "Capture frame" button. Finally you have to press C or the "Toggle camera on/off" button again. This will let you scrub through the captured frames and decide whether to keep the latest one. (You could also press C, then Space.) Note this solution doesn't give you a "live preview" with onion-skinning.

When you're done animating, you can get the images by making a copy of the Stopmotion project file and changing the file extension from .sto to .tar. Then uncompress it and find the image files inside that directory. Or, to export to a video, you can use the File -> Export -> Video option.

You may need to configure the Video Export options in the Preferences window. Some or all of the default options give you a video with lossy compression. Here is one way to get a lossless export: First make sure you have ffmpeg installed. Then add an option with this command in the "Start encoder" field:

ffmpeg -y -framerate $FRAMERATE -i "$IMAGEPATH/%06d.jpg" -codec:v copy "$VIDEOFILE"

Views: 15

Reply to This

Website News & Tips

NEW MEMBERS

If you are new to the site, please feel free to introduce yourself on this Message Board thread.

MY PAGE
You can now customize your personal page. Go to My Page/Customize My Page.

PRIVACY
To control who sees your posts and Profile Page, go to Settings/Privacy.

MESSAGE BOARD & BLOG POSTS
If you have a question for the community, it is best to post your question on the Message Board instead of a Blog. Blogs are best for featuring your stop motion projects.

VIDEO
When posting a video, if possible, use the Embed Code instead of the URL. Your video will be a larger, more viewable size.

MESSAGE BOARD CATEGORIES

If you have a question or are looking for answers, you'll find a wealth of information here on the Message Board.

BEGINNERS a good place to start
ANIMATOR TALK experienced animators
YOUR STOPMO FILM PROJECT what r u working on?
STORY script, storyboarding and storyreel
ANIMATION TOOLS
 what's a surface gage?
STOP MOTION & COMPUTERS Dragonframe and VFX
CAMERA & STAGE camera, lighting and moco rigs
SOUND lip-sync, sound effects and music 
ARMATURES ball & socket and wire 
MACHINE SHOP metalwork tool & talk 
SCULPTING sculpture information and advice 
HAIR & COSTUME materials and technique 
CASTING
 foam, silicone and resin 
CLAY clay puppet construction 
GENERAL PUPPET MAKING 
other puppet fab issues
STOP MOTION SETS set design and construction
MODEL DEPARTMENT
 miniature prop discussion

and even more...
MATTE PAINTINGS
GENERAL SPECIAL EFFECTS 
STOP MOTION FILM DISCUSSION 
FAVORITE STOP MOTION CHARACTERS
PRO ANIMATOR DISCUSSION
FILM FESTIVALS AND EVENTS 
ANIMATION SCHOOLS 
STOP MOTION BOOKS 
STOP MOTION ON VIDEO 
WORK OPPORTUNITIES

FOR SALE 
CHAT BOARD 

WEBSITE NEWS AND FEEDBACK

SMA.com on YouTube

New NMBC Book!

© 2021   Created by Anthony Scott.   Powered by

Badges  |  Report an Issue  |  Terms of Service

.xg_widget_forum_index_index .xg_column.xg_span-7.xg_last {display:none;} .xg_widget_forum_topic_listForCategory .xg_column.xg_span-7.xg_last {display:none;} .xg_widget_forum_topic_show .xg_column.xg_span-7.xg_last {display:none;}