harlock74
Posts: 182
Joined: Fri Jan 18, 2013 10:47 am

Remote access to camera

Wed Oct 16, 2013 11:37 am

Hi there,

I would appreciate if someone could help me out with the following issue. I have got the camera up and running on my RPI and I must admit I am very impressed by its quality. I am struggling to watch the video via VNC though. I mean I can connect remotely from my macbook to my RPI (I have installed tightvncserver) but whenever I run:

Code: Select all

raspivid -o test.h264 –t 90000
from the CLI I can’t see anything on my macbook. Is this a limitation or am I doing something wrong?

I have been experiencing the same issue after installing logmein. I can always access to my RPI desktop but no video at all.

I apologize if this is not the right place to raise this question.

Many thanks in advance.

Questionario
Posts: 40
Joined: Tue Jun 04, 2013 6:22 am

Re: Remote access to camera

Wed Oct 16, 2013 12:02 pm

yup, thats how it works...
preview is only on the rpi, i think it is somehow output directly to the monitor/video output.

you need to use some kind of streaming to be able to view it remotely, check the forums on how to do this

harlock74
Posts: 182
Joined: Fri Jan 18, 2013 10:47 am

Re: Remote access to camera

Wed Oct 16, 2013 12:20 pm

Questionario wrote:yup, thats how it works...
preview is only on the rpi, i think it is somehow output directly to the monitor/video output.

you need to use some kind of streaming to be able to view it remotely, check the forums on how to do this
Hi,
many thanks for getting back to me! I will definitely check the forum. Thanks again for your help!

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

Re: Remote access to camera

Wed Oct 16, 2013 12:54 pm

You are better off using netcat - set up the camera to output to stdout, pipe that to netcat and pick it up on the remote machine.

See

http://www.raspberrypi.org/camera
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Please direct all questions to the forum, I do not do support via PM.

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

Re: Remote access to camera

Wed Oct 16, 2013 12:55 pm

Questionario wrote:yup, thats how it works...
preview is only on the rpi, i think it is somehow output directly to the monitor/video output.

you need to use some kind of streaming to be able to view it remotely, check the forums on how to do this
The preview output is superimposed (new layer) on top of the standard output (the desktop/console), so won't be picked up by something like VLC.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Please direct all questions to the forum, I do not do support via PM.

harlock74
Posts: 182
Joined: Fri Jan 18, 2013 10:47 am

Re: Remote access to camera

Wed Oct 16, 2013 1:10 pm

jamesh wrote:You are better off using netcat - set up the camera to output to stdout, pipe that to netcat and pick it up on the remote machine.

See

http://www.raspberrypi.org/camera
Hi,
many thanks for your suggestion. So for example, say that I am at work and I want to watch what my kid is doing. I logged in to logmein (for example), I connect to my raspberry pi and then I run :

Code: Select all

mkfifo buffer

nc -p 5001 -l > buffer | /opt/vc/src/hello_pi/hello_video/hello_video.bin buffer
and the to transmit the feed from the Pi itself:

Code: Select all

raspivid -t 999999 -o - | nc [insert the IP address of the client] 5001
Also could you please explain to me how to set up the camera to output to stdout?

Thanks a lot!

harlock74
Posts: 182
Joined: Fri Jan 18, 2013 10:47 am

Re: Remote access to camera

Fri Oct 18, 2013 1:56 pm

Quick update.
I have manged to set up the camera to output to stdout and I have followed the guide. Still no luck. I can watch the video on the RPI but not on my remote machine. Any suggestions please? :ugeek:

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

Re: Remote access to camera

Fri Oct 18, 2013 2:16 pm

harlock74 wrote:Quick update.
I have manged to set up the camera to output to stdout and I have followed the guide. Still no luck. I can watch the video on the RPI but not on my remote machine. Any suggestions please? :ugeek:
You didnt say you were remote - ie outside the local network. I think netcat would only work on the internal network (unless you set up a VPN), so you need a different scheme to transfer data over the net. There are ways of doing it, but I cannot remember how - RTMP or some such abbreviation rings a bell. There are posts about it on the forum.

EDIT : try here. http://www.raspberrypi.org/phpBB3/viewt ... 43&t=45368
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Please direct all questions to the forum, I do not do support via PM.

SnowLeopard
Posts: 106
Joined: Sun Aug 18, 2013 6:10 am

Re: Remote access to camera

Fri Oct 18, 2013 3:50 pm

The best streaming results I've achieved are with mjpg-streamer with input_raspicam.so by MacHack.
https://github.com/jacksonliam/mjpg-streamer
http://www.raspberrypi.org/phpBB3/viewt ... 8&start=75

harlock74
Posts: 182
Joined: Fri Jan 18, 2013 10:47 am

Re: Remote access to camera

Sat Oct 19, 2013 8:46 am

jamesh wrote:
harlock74 wrote:Quick update.
I have manged to set up the camera to output to stdout and I have followed the guide. Still no luck. I can watch the video on the RPI but not on my remote machine. Any suggestions please? :ugeek:
You didnt say you were remote - ie outside the local network. I think netcat would only work on the internal network (unless you set up a VPN), so you need a different scheme to transfer data over the net. There are ways of doing it, but I cannot remember how - RTMP or some such abbreviation rings a bell. There are posts about it on the forum.

EDIT : try here. http://www.raspberrypi.org/phpBB3/viewt ... 43&t=45368
Hi Jamesh,
Sorry, maybe I wasn't clear in my post. Yes I am trying to connect to my RPI camera outside my network. Thanks for the link. I will have a look at it!

harlock74
Posts: 182
Joined: Fri Jan 18, 2013 10:47 am

Re: Remote access to camera

Sat Oct 19, 2013 8:49 am

SnowLeopard wrote:The best streaming results I've achieved are with mjpg-streamer with input_raspicam.so by MacHack.
https://github.com/jacksonliam/mjpg-streamer
http://www.raspberrypi.org/phpBB3/viewt ... 8&start=75
Hi SnowLeopard,
Thanks to you as well for your suggestion. Would you know if I can connect remotely (outside my network) to my RPI with mjpg-streamer? Thanks!

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

Re: Remote access to camera

Sat Oct 19, 2013 9:45 am

harlock74 wrote:
SnowLeopard wrote:The best streaming results I've achieved are with mjpg-streamer with input_raspicam.so by MacHack.
https://github.com/jacksonliam/mjpg-streamer
http://www.raspberrypi.org/phpBB3/viewt ... 8&start=75
Hi SnowLeopard,
Thanks to you as well for your suggestion. Would you know if I can connect remotely (outside my network) to my RPI with mjpg-streamer? Thanks!
Note that MJPEG requires much higher bandwidth than H264 for the same image size and quality.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Please direct all questions to the forum, I do not do support via PM.

SnowLeopard
Posts: 106
Joined: Sun Aug 18, 2013 6:10 am

Re: Remote access to camera

Sat Oct 19, 2013 8:42 pm

harlock74 wrote:Would you know if I can connect remotely (outside my network) to my RPI with mjpg-streamer? Thanks!
Both the netcat method or using mjpg-streamer should work from anywhere, the main difference is the netcat method is sending the stream to a specific remote IP, and the mjpg-streamer method has the viewing end requesting the stream from the pi.
In other words, for the netcat method, you first set your macbook to listen for the stream and then make the pi send the stream to the macbook's IP. For the mjpg-streamer method, you run mjpg-streamer first (more like running a webserver) and then open a connection with a browser or media player.
If your pi is on a network behind a firewall and you don't want to allow inbound access, you'll have to use the netcat method.

I personally prefer using mjpg-streamer because I don't need mplayer and netcat on the client side -- firefox plays the stream natively with very little latency which makes aiming the camera very easy. Also, you can use both the http streaming plugin and file output plugin at the same time.

harlock74
Posts: 182
Joined: Fri Jan 18, 2013 10:47 am

Re: Remote access to camera

Sun Oct 20, 2013 9:26 am

Hi Jamesh, SnowLeopard,

Thanks again for your kind help.

I must admit I am getting confused with all the web links. :mrgreen:

SnowLeopard,

Can you please confirm that in order to stream my camera video outside my network, this is the right source to follow:

https://github.com/jacksonliam/mjpg-streamer

If not, could you please point me to the right direction?

Thanks for being patient with me :oops:

SnowLeopard
Posts: 106
Joined: Sun Aug 18, 2013 6:10 am

Re: Remote access to camera

Sun Oct 20, 2013 4:18 pm

harlock74 wrote:Can you please confirm that in order to stream my camera video outside my network, this is the right source to follow:
https://github.com/jacksonliam/mjpg-streamer
Yes, that's the one I was talking about.

harlock74
Posts: 182
Joined: Fri Jan 18, 2013 10:47 am

Re: Remote access to camera

Mon Oct 21, 2013 7:13 pm

SnowLeopard wrote:
harlock74 wrote:Can you please confirm that in order to stream my camera video outside my network, this is the right source to follow:
https://github.com/jacksonliam/mjpg-streamer
Yes, that's the one I was talking about.
OK. Thanks a lot for confirming!

Return to “Camera board”

Who is online

Users browsing this forum: No registered users and 7 guests