Page 1 of 1

Streaming video fom one pi to another over network

Posted: Sat Dec 06, 2014 1:31 pm
by dom
I was playing with getting a reasonably low latency video stream from one pi to another over a network.
It uses a simplified version of hello_video with no clock or scheduler to just display video from network with minimal latency (I measured 200ms end to end).

I've pushed the code and instructions to github in case it's useful for anyone else:
https://github.com/popcornmix/userland/ ... deo_simple

Re: Streaming video fom one pi to another over network

Posted: Sat Dec 06, 2014 2:55 pm
by DavidMS
I am no doubt being thick but when I follow your instructions I get

pi@raspberrypi ~/hello_video_simple $ ./raspi-vid start
-bash: ./raspi-vid: Permission denied

and similarly on the display pi

pi@raspberrypi ~/hello_video_simple $ nc 192.168.1.132 5001 | ./hello_video_simple
-bash: ./hello_video_simple: No such file or directory


I assume I am missing something obvious here ?

Re: Streaming video fom one pi to another over network

Posted: Sat Dec 06, 2014 4:19 pm
by jamesh
for both files

chmod +x <filename>

to make them executable.

Re: Streaming video fom one pi to another over network

Posted: Sat Dec 06, 2014 4:57 pm
by DirkS
pi@raspberrypi ~/hello_video_simple $ nc 192.168.1.132 5001 | ./hello_video_simple
-bash: ./hello_video_simple: No such file or directory
That should be

Code: Select all

nc 192.168.1.132 5001 | ./hello_video_simple.bin
Gr.
Dirk.

Re: Streaming video fom one pi to another over network

Posted: Sat Dec 06, 2014 6:06 pm
by dom
DirkS wrote:That should be

Code: Select all

nc 192.168.1.132 5001 | ./hello_video_simple.bin
Updated.

Re: Streaming video fom one pi to another over network

Posted: Sun Dec 07, 2014 4:43 pm
by DavidMS
Sorry but I must still be missing something, I seemingly have the raspi-vid working but I am still getting the same error on the second pi

pi@raspberrypi ~/hello_video_simple $ nc 192.168.1.132 5001 | ./hello_video_simple.bin
-bash: ./hello_video_simple.bin: No such file or directory

I think I get what 'nc' is doing but am confused about the './hello_video_simple.bin' - what is this ? I cannot find it on the pi and do not see how it takes me from a stream of data to displaying video ?

Should I be doing something with the makefile or video.c ?

Re: Streaming video fom one pi to another over network

Posted: Sun Dec 07, 2014 5:14 pm
by DirkS
Should I be doing something with the makefile or video.c ?
Yes, it needs to be compiled first...

Easiest way to get it compiled is to copy the whole directory to

Code: Select all

/opt/vc/src/hello_pi
You'll probably have to compile the other examples before you can compile the new one:

Code: Select all

cd /opt/vc/src/hello_pi
./rebuild.sh
cd hello_video_simple
make
HTH
Dirk.

Re: Streaming video fom one pi to another over network

Posted: Sun Dec 07, 2014 6:06 pm
by DavidMS
Thanks Dirk, I suspected it was a little more involved than implied, anyway something to have a go at over Christmas

Re: Streaming video fom one pi to another over network

Posted: Mon Dec 08, 2014 7:29 pm
by tvoverbeek
Note that you can download a binary version of Dom's special hello_video program from this page:
http://www.gertbot.com/toaste.html.
See the 'Video Streaming' section at the bottom of the page.

Re: Streaming video fom one pi to another over network

Posted: Fri Feb 06, 2015 11:33 pm
by DavidMS
Ok so I have come back to try this again, following the instructions on the previous post I seem to have the camera pi setup ok [well I did not get any errors but there is not clue that anything is actually a happening] But on the receiving pi I get the following 'bash: ./hello_video.bin: Permission denied'.

edit -

So after a bit of reading around it would seem the problem is down to my lack of knowledge with linux - the bit that I was missing was that having copied the file across I needed to 'chmod u+x hello_video.bin' so linux would accept is as an executable

Re: Streaming video fom one pi to another over network

Posted: Mon Apr 20, 2015 1:44 pm
by ekla
Hi all,

Thanks Dom. I just tested the solution. Works great
really great

T*H*A*N*K*S

Re: Streaming video fom one pi to another over network

Posted: Tue Apr 21, 2015 12:52 pm
by towolf
You need to use hello_video_simple. Not just hello_video. That one plays frames as fast as possible with no regard to timing in the stream.

The code dom mentioned in OP is still buried in his private GitHub repo. You can download those 5 files and move them to new folder /opt/vc/src/hello_pi/hello_video_simple/. Then go to parent folder /opt/vc/src/hello_pi/ and run rebuild.sh