luckyguy
Posts: 7
Joined: Fri Apr 17, 2015 5:50 pm

Stream from one RPi2 with RPi Camera to another RPi2

Sat Apr 18, 2015 3:37 pm

I've got two set up and want to send from one rpi camera to the other rpi
What's the easiest way to do this via a network protocol (any will do, as long as it works)

I tried with cvlc, but it's giving me issues

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 22743
Joined: Sat Jul 30, 2011 7:41 pm

Re: Stream from one RPi2 with RPi Camera to another RPi2

Sat Apr 18, 2015 7:28 pm

A gstreamer pipeline will work, but I don't have a specific pipeline handy - Google may help.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

towolf
Posts: 421
Joined: Fri Jan 18, 2013 2:11 pm

Re: Stream from one RPi2 with RPi Camera to another RPi2

Mon Apr 20, 2015 10:32 am

viewtopic.php?f=43&t=93330

This variant of the demo hello_video tool is supposed to stream with low latency.

luckyguy
Posts: 7
Joined: Fri Apr 17, 2015 5:50 pm

Re: Stream from one RPi2 with RPi Camera to another RPi2

Thu Apr 30, 2015 1:51 am

I'm looking to stream live video, not a file :/

towolf
Posts: 421
Joined: Fri Jan 18, 2013 2:11 pm

Re: Stream from one RPi2 with RPi Camera to another RPi2

Thu Apr 30, 2015 10:15 am

That is what the link I posted is about?

On a sending Rpi you launch raspivid or whatever to capture from camera. Then you need some kind of network protocol wrapping (simplest is just netcat, more involved is RTP over UDP with GStreamer). Then on receiving RPi you need a video player. Many are lead astray by trying to use what they know, i.e., VLC, which seems to work not so well.

The link I posted is simplest possible solution, taking network stream and playing it using demo tool "hello_video", which plays H264 camera stream using hw acceleration. OP there made his own variant "hello_video_simple" that disregards timing and plays incoming frames as soon as they arrive.

More involved network protocol like RTP needs player that can understand RTP (and at the same time HW acceleration).

So two possibilities (among others) are

raspivid →netcat → netcat → hello_video_simple

GStreamer capture and RTP sending pipeline → Gstreamer receiving pipeline with RTP unwrapping and OMX decode

Return to “Camera board”