adrianidar
Posts: 20
Joined: Sun Dec 22, 2013 7:33 am
Location: London, UK

raspistill preview not working over VNC

Thu Dec 26, 2013 10:06 pm

Hello.

When launching raspistill over the VNC connection there is no preview. It appears instead on a monitor connected to HDMI.

Details: Pi running TightVNC on 5901 and simultaneously connected to monitor over HDMI.

Having preview over VNC would greatly help on a number of situations when wanting to adjust the camera before shooting (e.g. no monitor but instead VNC connection over USB tethering - when doing time-lapse photography outdoors).

Would this be a feature or a bug? Not very sure. I guessed that the preview may appear over HDMI (that's why simultaneously connected the monitor). If a bug or an useful feature I'll raise it as such in github but wanted to first to check.

Thanks,

Adrian

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

Re: raspistill preview not working over VNC

Fri Dec 27, 2013 11:08 am

The preview is a superimposed video layer on top of whatever desktop or console you are using and is therefore not available for VNC to send/receive.

You could try network streaming.
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."

adrianidar
Posts: 20
Joined: Sun Dec 22, 2013 7:33 am
Location: London, UK

Re: raspistill preview not working over VNC

Fri Dec 27, 2013 2:12 pm

Yes, that's an idea, indeed! But this is a for doing time-lapse from the office window where there is no network. To be precise it is but I cannot connect anything, I work in an investment bank.

Currently I control the Pi using the buttons on the LCD plate. I'm happy I can connect with bVNC Free via USB tethering from my Galaxy S2 phone, it's magic. But although I have a full X desktop I cannot see the preview...

One idea that came reading around was to replace TightVNC with x11vnc. Apparently that one can latch on the native X session. But would the preview appear? I'll try and tell the findings.

Adrian

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

Re: raspistill preview not working over VNC

Fri Dec 27, 2013 7:59 pm

There is nothing you can do since the preview is on a video layer that that arm is not aware of.
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."

adrianidar
Posts: 20
Joined: Sun Dec 22, 2013 7:33 am
Location: London, UK

Re: raspistill preview not working over VNC

Fri Dec 27, 2013 10:05 pm

Indeed... Just tried x11vnc but no joy. I actually reverted to TightVNC as the other one had a couple of things I didn't like.

Is it worth for me create a request (not a bug, from what you say) in github and suggest adding support for preview functionality over VNC or is it technically impossible? Would be useful for time-lapse photography in headless mode. Without it you take a picture, adjust, take a picture, adjust...

So, if I understand correctly, the preview goes directly in the framebuffer and all vnc clients do not use that? From where do they get the image then? Sorry, curious...

Thanks,

Adrian

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

Re: raspistill preview not working over VNC

Sat Dec 28, 2013 10:08 am

No, the point is that it DOESNT go in to the framebuffer, it's a superimposed overlay. There might be some nasty hacky way of copying the content in to the framebuffer, but it will be very very slow.

So from my POV, this is theoretically possible, but technically/usefully impossible.
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."

User avatar
AndyD
Posts: 2331
Joined: Sat Jan 21, 2012 8:13 am
Location: Melbourne, Australia
Contact: Website

Re: raspistill preview not working over VNC

Sat Dec 28, 2013 10:52 am

adrianidar wrote:...Is it worth for me create a request (not a bug, from what you say) in github and suggest adding support for preview functionality over VNC or is it technically impossible? Would be useful for time-lapse photography in headless mode. Without it you take a picture, adjust, take a picture, adjust...
You can have a look at this. It is a VNC server that uses the dispmanx snapshot functionality.
adrianidar wrote:So, if I understand correctly, the preview goes directly in the framebuffer and all vnc clients do not use that? From where do they get the image then? Sorry, curious...
As I understand it the TV signal (RCA or HDMI) that come out of the Raspberry Pi is a composite of a number of layers. These layers are created/controlled/modified by the compositor known as DispmanX. The linux framebuffer on the Raspberry Pi is a single Dispmanx layer. This framebuffer can be accessed/modified using the usual linux framebuffer interface. So no, the preview is on a different Dispmanx layer, separate from the framebuffer. That is why none of the standard linux VNC servers can see it.
Last edited by AndyD on Sun Dec 29, 2013 2:22 am, edited 3 times in total.

adrianidar
Posts: 20
Joined: Sun Dec 22, 2013 7:33 am
Location: London, UK

Re: raspistill preview not working over VNC

Sat Dec 28, 2013 11:30 am

Thanks guys. It helped having the explanations. I may try later that VNC program (now it looks like mouse support is not that great).

In the meantime I'll make a "poor's man previewer" - take pictures as fast as possible, pipe them into a custom Python image viewer (no gpicviewer because I want control when to show the image and where), etc. Or I don't know, maybe motion can stream from the camera? There seem to be ways.

Adrian

tarunsharma1
Posts: 3
Joined: Wed Sep 24, 2014 7:08 am

Re: raspistill preview not working over VNC

Wed Sep 24, 2014 7:17 am

I tried ssh-ing the pi using putty and an ethernet cable from my windows pc..i was also running Xming on my pc..I was able to get the camera stream to open though there was a 5second lag..
I suggest you try ssh using putty(without the lan cable) and run xming on your windows pc and then try opening the camera stream


sevent
Posts: 1
Joined: Fri Nov 28, 2014 7:04 pm

Re: raspistill preview not working over VNC

Fri Nov 28, 2014 7:09 pm

tarunsharma1 wrote:I tried ssh-ing the pi using putty and an ethernet cable from my windows pc..i was also running Xming on my pc..I was able to get the camera stream to open though there was a 5second lag..
I suggest you try ssh using putty(without the lan cable) and run xming on your windows pc and then try opening the camera stream
How did you display the live feed ? Was it through python-picamera / raspivid and what command did you type?

I am also trying to display the feed on my windows PC with Putty and Xming. I can save pictures fine but I cannot display the feed/preview. Thank you if you can help.

barsznica
Posts: 18
Joined: Thu Apr 14, 2016 12:38 pm

Re: raspistill preview not working over VNC

Fri Aug 04, 2017 12:10 am

https://raspberrypi.stackexchange.com/q ... -on-laptop:
Only the "realvnc" implementation currently supports forwarding the camera's preview over the VNC connection (because it's the only implementation that uses dispmanx for screen-scraping at the moment). You also have to enable "experimental capture mode" or something like that in the options interface – Dave Jones

https://raspberrypi.stackexchange.com/q ... vnc-viewer:
It is now possible to do this over VNC. If you're using the RealVNC server on the Pi, go to VNC options > troubleshooting and enable "experimental direct capture mode", then you'll be able to view the camera preview image over the vnc connection. – Andrew Wedgbury

Return to “Troubleshooting”