Page 1 of 1

VIdeo Capture

Posted: Mon Feb 09, 2015 6:14 am
by rubenhak
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

Re: VIdeo Capture

Posted: Mon Feb 09, 2015 1:13 pm
by realies
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.

Re: VIdeo Capture

Posted: Mon Feb 09, 2015 7:03 pm
by Defiant
The Pis broken USB cannot handle the easycap, just search the forum for it.

Re: VIdeo Capture

Posted: Mon Feb 09, 2015 11:07 pm
by rubenhak
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

Re: VIdeo Capture

Posted: Mon Feb 09, 2015 11:10 pm
by rubenhak
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.

Re: VIdeo Capture

Posted: Mon Feb 09, 2015 11:37 pm
by realies
You could try these tutorials for EasyCAP - http://elinux.org/RPi_VerifiedPeriphera ... e_grabbers

Re: VIdeo Capture

Posted: Fri Feb 13, 2015 10:23 am
by fbutler
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

Re: Video Capture

Posted: Thu Jul 23, 2015 9:06 pm
by npp1993
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?

Re: VIdeo Capture

Posted: Sat Jul 25, 2015 3:49 pm
by feklee
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.

Re: VIdeo Capture

Posted: Wed Sep 30, 2015 7:45 pm
by Higgs
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.

Re: VIdeo Capture

Posted: Wed Sep 30, 2015 9:28 pm
by Higgs
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.

Re: VIdeo Capture

Posted: Wed Oct 26, 2016 8:51 am
by RpiName
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/

Re: VIdeo Capture

Posted: Wed Dec 27, 2017 3:33 pm
by h0b0byter99
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/