Video Input Card?


15 posts
by jandafields » Thu Jun 21, 2012 3:34 am
Here's what I'm wanting to accomplish:

Using 2 Raspberry Pi's on a network to stream video/audio from one to the other. Basically, Pi + Network + Pi = Virtual AV Cable.

Pi "A" would have an audio/video input capture USB device. It would send that over the network to another Pi (Pi B)

Pi "B" would output that audio/video through it's onboard audio and video output. The video latency (delay) would need to be as low as possible (less than 1 or 2 seconds.)

Network bandwidth isn't really an issue. It would be a local connection, not Internet.

So, the basic questions are what USB device would work with RPi? What is the best way to actually stream it to the other one?
Posts: 11
Joined: Thu Jun 21, 2012 3:11 am
by Grumpy Mike » Mon Jun 25, 2012 3:47 pm
No I don't think that idea would work.

The problem is that the video data would have to be split into time stamped packages for transmission and converted back into a stream for reception. This is like making the receiving Pi a set top box and the transmitting Pi a digital encoder. I would be surprised if such software exists and it is probably too complex for a single person to write.
User avatar
Posts: 783
Joined: Sat Sep 10, 2011 7:49 pm
Location: Manchester (England England)
by Gunbard » Tue Jun 26, 2012 10:19 pm
I used to do this using on my other systems using VLC's built in streaming server, but I highly doubt performance would be acceptable on a Pi. Even on 100mbps LAN and streaming with a quad core system, lag was still more than a few seconds.
User avatar
Posts: 4
Joined: Tue Jun 26, 2012 9:56 pm
by jdubin » Thu Jun 28, 2012 8:30 am
The key is to offload video encoding to an external device. Find a usb device which is v4l2 compatible that does it's own h.264 video encoding. This will free up the Raspi's CPU substantially. Plus, the Raspi's GPU has h.264 decoding built-in, so the CPU can spend it's time worrying about the other stuff, e.g. networking, GUI, etc.

It's not impossible -- but it's not going to be plug-and-play. Good luck, and please remember to post here if you find a good solution!
Posts: 12
Joined: Sun Jun 03, 2012 2:27 am
by observing » Fri Jun 29, 2012 12:26 pm
I think jdubin has the right approach, although a quick search shows that it's not a cheap solution. I found this (http://www.fastvdo.com/SmartCapture/), which looks like one of the less expensive offerings that has Linux support. If you want to capture something better than composite video, I imagine that the price will go up considerably.

As a disclaimer, I have no relationship with FastVDO and haven't used any of their products, so I can't speak for the quality or their support of them.
Posts: 41
Joined: Mon Feb 27, 2012 12:18 pm
by jamesh » Fri Jun 29, 2012 12:32 pm
The Videocore encode->network->videocore decode is certainly possible. HDMI capture is a problem, but it's possible to get latency down to low milliseconds...with the right GPU software...which is where the problem would arise.
Soon to be unemployed software engineer currently specialising in camera drivers and frameworks, but can put mind to most embedded tasks. Got a job in N.Cambridge or surroundings? I'm interested!
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 11559
Joined: Sat Jul 30, 2011 7:41 pm
by ghans » Fri Jun 29, 2012 12:58 pm
Another thread suggested netcat , a MJPEG stream from a Pi and mplayer on the target.
It was lagging behind just 1 second.
The problem is to play this stream on a Pi.
It was more of a slideshow with mplayer.

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org
Posts: 4393
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany
by bimmer » Sun Jul 01, 2012 2:57 am
I apologize I'm going a bit off topic but may I ask what video capture card were you planning to use?
I want to capture video(Original would be HDMI but I can use RCA/VGA/DVI converters) with my Pi and I can't find any good examples.
Posts: 1
Joined: Sun Jul 01, 2012 2:52 am
by eicos » Tue Aug 28, 2012 4:11 pm
It may interest you to know that as of Aug 24, RPi firmware supports hardware-accelerated H.264 encoding as well as decoding. I am not aware whether there exist compatible applications/extensions capable of utilizing this hardware, but if they aren't around yet, they will be soon.

As a side note, I would also be interested in learning how you got video into the RPi.
Posts: 1
Joined: Tue Aug 28, 2012 4:05 pm
by ghans » Tue Aug 28, 2012 4:57 pm
The only viable way is to use Webcams or Video4Linux (V4L) compatible devices (capture cards).
You could also wait for the camera module from the Foundation.

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org
Posts: 4393
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany
by cleverca22 » Thu Aug 30, 2012 8:12 am
http://www.hauppauge.com/site/products/data_hdpvr.html

USB HD analog(component)->H264 hardware encoder

would probably serve your needs, though its so massive, you can probably mount the PI inside it!
Posts: 168
Joined: Sat Aug 18, 2012 2:33 pm
by ghans » Thu Aug 30, 2012 9:12 am
This is already doing all the work by itself ...
Still the question remains .. Linux support ?

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org
Posts: 4393
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany
by cleverca22 » Fri Aug 31, 2012 1:08 am
the HD-PVR has linux support already, mythtv (linux tv recording) uses it all the time
Posts: 168
Joined: Sat Aug 18, 2012 2:33 pm
by ghans » Fri Aug 31, 2012 6:01 am
@cleverca22

Did you try it on the RPi ? I'm interested in this myself. Where are the drivers from ?

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org
Posts: 4393
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany
by cleverca22 » Fri Aug 31, 2012 9:06 am
dont actualy own an HD-PVR, just been looking at all the various HD capture things that work with linux

http://www.mythtv.org/wiki/Hauppauge_HD-PVR#HD-PVR_Driver_Compilation_Howto

this says that the drivers have been in the mainline kernel since the 2.6 days, so it may already be on the pi

'modinfo hdpvr' on my pi would agree, the driver is fully present, and will probably work (if it has the cpu power)

since its hardware encoder, all the cpu has to do is copy the bytes from usb to ethernet
Posts: 168
Joined: Sat Aug 18, 2012 2:33 pm