Maddog64
Posts: 7
Joined: Fri Feb 14, 2014 12:27 am

picamera preview over x11

Fri Feb 14, 2014 11:17 am

Hi,

Complete newbie here so apologies for the dumb question. I have the Pi with the pi NoIR camera board and installed the picamera library. I have it set up with just power and ethernet and I'm controlling from my iMac (OS X 10.9.1). I can access either from a Remoter app VNC session but also ssh -X though an X11 window. I can then do an Idle3 & command to get a python shell and I can take a still image and find it in the home directory. However, what I'm struggling with is how to get a window to show the camera.start_preview(). I can run the command and when the Pi was attached to an HDMI TV I could see the preview on the TV but I can't work out how to get a window through my X11 session to see the preview on the iMac. I've googled loads of sites but can't find a solution. I'm guessing that the preview command sends a signal to the HDMI port and I need to somehow direct this to my iMac.

Is this possible?

Cheers

Rob

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

Re: picamera preview over x11

Fri Feb 14, 2014 12:02 pm

The reason you are having trouble is that it's not really possible.

The Raspi camera preview is a superimposed bitmap layer over the top of the Linux framebuffer, which Linux knows nothing about, so X11 doesn't even realise it exists. It's the only way it can be done fast enough.

There are various mechanism for encoding and then streaming the output that may give you what you want.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

Return to “Camera board”