rubenhak
Posts: 4
Joined: Mon Feb 09, 2015 6:07 am

VIdeo Capture

Mon Feb 09, 2015 6:14 am

Hi Everybody,

I'm new to raspberry pi programming. Trying to implement a project.

Is it possible to capture video (analog or better an hdmi) signal and perform some processing over the video? Basically get an access to raw frame buffer?

Came across this USB capture device. Is it compatible with Raspberry PI?
http://www.amazon.com/EASYCAP-Audio-Vid ... B0019SSSMY

Also, are there some libraries that would let me to capture the video? The best choice would be C++. If not any other language should be fine.

Thanks,
Ruben

User avatar
realies
Posts: 43
Joined: Fri Jul 18, 2014 9:27 am

Re: VIdeo Capture

Mon Feb 09, 2015 1:13 pm

I haven't seen a compatible hdmi capturer for the raspberry pi so far, but the company Auvidea are planning to release a HAT (hardware attached on top) for the model B from what I can see on their photos - http://www.auvidea.com/index.php/theme- ... pi-hdmi-in

Otherwise you could use a compatible composite video USB capturing, just search the forums.

User avatar
Defiant
Posts: 179
Joined: Tue Oct 30, 2012 6:17 pm
Location: Hamburg, Germany

Re: VIdeo Capture

Mon Feb 09, 2015 7:03 pm

The Pis broken USB cannot handle the easycap, just search the forum for it.

rubenhak
Posts: 4
Joined: Mon Feb 09, 2015 6:07 am

Re: VIdeo Capture

Mon Feb 09, 2015 11:07 pm

Defiant wrote:The Pis broken USB cannot handle the easycap, just search the forum for it.
Could you elaborate more on this? I've came across this thread and looks like the author managed to use the easycap with RPi.
http://www.raspberrypi.org/forums/viewt ... 47#p690047

rubenhak
Posts: 4
Joined: Mon Feb 09, 2015 6:07 am

Re: VIdeo Capture

Mon Feb 09, 2015 11:10 pm

realies wrote:I haven't seen a compatible hdmi capturer for the raspberry pi so far, but the company Auvidea are planning to release a HAT (hardware attached on top) for the model B from what I can see on their photos - http://www.auvidea.com/index.php/theme- ... pi-hdmi-in

Otherwise you could use a compatible composite video USB capturing, just search the forums.
I'd like to go with analog captured. Just am not sure which particular USB will work with RPi.

User avatar
realies
Posts: 43
Joined: Fri Jul 18, 2014 9:27 am

Re: VIdeo Capture

Mon Feb 09, 2015 11:37 pm

You could try these tutorials for EasyCAP - http://elinux.org/RPi_VerifiedPeriphera ... e_grabbers

User avatar
fbutler
Posts: 302
Joined: Thu Mar 15, 2012 4:09 pm
Location: Surrey, England

Re: VIdeo Capture

Fri Feb 13, 2015 10:23 am

Defiant wrote:The Pis broken USB cannot handle the easycap, just search the forum for it.
This is correct for stk1160 based capture devices especially as the driver only enables captures at 720x480 for NTSC and 720x576 for PAL.

However with em28xx based capture devices you can select many more frame sizes.

Using a Pi2 and an em28xx based device recently I've been able to stream with reasonable quality at 640x480 using the following command:

Code: Select all

avconv -f video4linux2 -threads 4 -i /dev/video0 -s 640x480 -vcodec mpeg2video -r 25 -pix_fmt yuv420p -me_method epzs -b 2600k -bt 256k -f rtp rtp://192.168.1.64:8080
Unfortunately I'm still having issues trying to capture audio using it as per this thread: http://www.raspberrypi.org/forums/viewt ... 38&t=99921

Fergal

npp1993
Posts: 1
Joined: Thu Jul 23, 2015 9:01 pm

Re: Video Capture

Thu Jul 23, 2015 9:06 pm

Hello,

I am working on a project which requires analog video capture. I'm using a Raspberry PI 2, and have an stk1160 based EasyCap card. I haven't had luck getting it to work (see https://github.com/raspberrypi/linux/issues/620). I found this post, and I'm hoping that the em28xx based cards might give me more luck. I want to make sure I'm buying the right EasyCap card with the correct chipset. Can someone maybe provide me with a model/product number or amazon link to the correct EasyCap USB card with the em28xx chipset?

feklee
Posts: 5
Joined: Sat Jul 25, 2015 10:10 am

Re: VIdeo Capture

Sat Jul 25, 2015 3:49 pm

What specifically is the problem with the Pi's USB in relation to video capture devices? Has the problem been fixed in version 2?

I'm asking because I read that getting the H.264 video stream from the C920 has issues as well, on the Pi, but not on the BeagleBone. It makes me wonder if, for streaming live video to the Internet, the BeagleBone is a better solution.

Higgs
Posts: 43
Joined: Tue May 26, 2015 2:17 pm

Re: VIdeo Capture

Wed Sep 30, 2015 7:45 pm

Just got around to trying this on my Pi2. No go. EMP28xx driver gives the dreaded green screen. The same Easycap knockoff with EMP28xx driver on a linux x86 PC works fine with TVTime.

However, good to know that a Beaglebone has no problem. Rather than buy another RPi, I may instead just get a BB in it's place.

Higgs
Posts: 43
Joined: Tue May 26, 2015 2:17 pm

Re: VIdeo Capture

Wed Sep 30, 2015 9:28 pm

Spoke too soon.

Just after posting about the inability to run anything with my emp28xx Easycap knockoff, I instead tried switching from a Raspbian SD to my Ubuntu Mate SD.

Installed TVTime and like Raspbian it did not run. However, found a general Ubuntu posting that suggested mplayer, and it works with

Code: Select all

mplayer tv:// -tv device=/dev/video0:driver=v4l2:input=1:norm=NTSC
This mplayer command did NOT work in Raspbian, so the Mate distro has something that allows the command to run.

It displays tearing and artifacts, but at least produces a recognizable image on the RPi2 (I have attached a CCTV camera to the pseudo-Easycap). Forgot to check if it carried sound, since I was just doing this for spits and giggles.

The quality isn't good enough for capturing much of anything because of the occasional tearing and artifacts. Monitoring perhaps, but not capturing for posterity.

EDIT: Went back to Raspbian SD and ran updates and now the mplayer command works. Still has intermittent screen tearing (no sound) but is mostly viewable as a monitoring device (640x480).

So now with wifi enabled, a static IP, and X11VNC running on bootup, I can start mplayer and see what is on the CCTV camera.
Just to see if it could be done.

RpiName
Posts: 712
Joined: Sat Jul 06, 2013 3:14 am

Re: VIdeo Capture

Wed Oct 26, 2016 8:51 am

rubenhak wrote:Is it possible to capture video (analog or better an hdmi) signal and perform some processing over the video? Basically get an access to raw frame buffer?
The UV4L suite includes the raspidisp driver which allows to create a virtual Video4Linux2-compliant device from HDMI-out:

http://www.linux-projects.org/2016/10/2 ... r-is-born/

h0b0byter99
Posts: 1
Joined: Wed Dec 27, 2017 3:31 pm

Re: VIdeo Capture

Wed Dec 27, 2017 3:33 pm

I kinda hate to revive an old post but for people that come in the future here's the link to the Raspberry Pi HAT that the first reply talks about. https://auvidea.com/b101-hdmi-to-csi-2- ... 5-pin-fpc/

Return to “Graphics, sound and multimedia”