Posts: 1
Joined: Thu May 08, 2014 11:40 pm

Grabbing Images using EasyCap capture device

Thu May 08, 2014 11:51 pm

I can connect a RPi to Easycap capture device and get video from a analog camera using Mplayer.

But I need to capture images so I am trying to use python code. I have tried pygame, opencv but no video appears.

Can anyone help me figure a way to capture images using python code when a Easycap capture device is connected .

PS: Mplayer picks up /dev/video0 and plays. Pygame also uses /dev/video0 but no video appears and when I break the command, it shows segmentation fault.

Posts: 1
Joined: Sat May 31, 2014 9:47 pm

Re: Grabbing Images using EasyCap capture device

Sat May 31, 2014 9:56 pm

I had exactly the same problem with EasyCap and Pygame and ended up calling the mplayer directly using subprocess:

Code: Select all

import subprocess
import shlex #splits the command
command = 'mplayer tv:// -tv driver=v4l2:device=/dev/video0:norm=NTSC -vo png -frames 1'

Return to “Troubleshooting”