0

I am new to raspberry pi and have started a project. I have a pi 3 and I am making an infrared night vision remote controlled car with a infrared pi camera I found on Amazon. So far everything is working good expect I can’t see the camera preview over VNC or ssh. Is there any way that I can see what my camera sees without streaming it to a website? I’m not worried about security, it’s more that I just want to be able to access it with some sort of local script without using a browser. I have attempted using python pi camera but it won’t let me see the preview either.

1
  • Can you edit this question. An entire sentence is repeated slightly differently and I don't know which is correct.
    – st2000
    Commented Jan 10, 2018 at 2:17

2 Answers 2

2

If you're using the RealVNC server which comes pre-installed in Raspbian, then you need to enable "experimental direct capture mode" (found under vnc options > troubleshooting) in order to see things like the camera preview. This is because they are drawn directly by the gpu and not part of the X11 desktop that vnc would normally be able to capture.

2
  • I've installed RealVNC by enabling it in raspi-config but the only VNC-related thing I can find there is to enable or disable it. There are no VNC Options anywhere as far as I can find. Where should they be? Is there anything else I need to install to get them to appear?
    – IpsRich
    Commented Oct 31, 2018 at 15:52
  • Ah, found it eventually! I didn't have a full desktop enabled, so even though my Pi booted into desktop mode, there was no menu and therefore no VNC icon to click -- which is where I found the options are.
    – IpsRich
    Commented Nov 1, 2018 at 9:31
0

Understand that SSH can be thought of as a encoded communication pipe you can send data through. And VNC is a protocol for displaying a desktop from the host computer on a remote computer. The host does not even need a monitor. In fact, a Unix or Linux host (unlike Windows) can have several desktops independently running at the same time.

At no time when using SSH nor VNC does one need to use a web-browser.

If an application is displaying the image of what the camera sees on the VNC server computer's desktop, then that desktop with the image of what the camera sees should be visible on the VNC client. If there are problems, check the VNC setting on the server and desktop instances of VNC. Often the settings are tuned for slower events such as word processing or web browsing. It may be necessary to change the VNC's settings to allow for faster screen updates.

4
  • I am trying to answer your question using the software tools you listed in your question. Which should eventually work. However, I would, instead, have used X11 forwarding. Which does not use VNC, only SSH. It is also likely to only work or work best on a Unix or Linux host (remote) computer. If this is really what you want - edit your question to make it clear (drop the VNC part) that you want to know how to run an application but display its graphic on a remote (Linux) X11 server.
    – st2000
    Commented Jan 10, 2018 at 2:26
  • for forwarding headless gui applications over ssh I would recommend xpra instead of the basic x-forwarding built into ssh. The performance is quite good, and you can re-attach gui programs if you disconnect
    – crasic
    Commented Jan 10, 2018 at 8:39
  • That is good to know about xpra. Thanks!
    – st2000
    Commented Jan 10, 2018 at 13:51
  • "At no time when using SSH nor VNC does one need to use a web-browser." - You clearly don't know the uses of VNC then. Commented Sep 28, 2022 at 9:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.