chrisiffer
Posts: 3
Joined: Thu Dec 28, 2017 9:27 pm

realvnc screen size under different configurations

Mon Feb 19, 2018 2:51 pm

I am working on a pi with a 1280x1024 screen for development collecting video from the pi camera. I want to view the video remotely but I don't want to vnc the entire desktop for a 320x240 video. I use vncserver -geometry 320x240 to create a virtual desktop and dump the video to that display. This setup works locally but I want to view the video stream using realvnc cloud connection. I would prefer access to both the service and virtual display through the cloud but that is not supported so I am trying to run the pi headless and set display :0 to 320x240.

Setup is a headless raspberry pi 3 2017-07-05-raspbian-jessie. Ssh on and wpa_supplicant.conf preloaded, no hdmi monitor plugged in, power on and log in via ssh, turn on vnc via raspi-config

With default config.txt vnc results in 656x416 which seems to be 720x480 with overscan of 64

Changing settings in config.txt to

Code: Select all

hdmi_force_hotplug=1
hdmi_group=1	#CEA
hdmi_mode=1	#VGA (640x480)
results in 576x416 which seems to be 640x480 with overscan of 64

Changing settings in config.txt to

Code: Select all

hdmi_force_hotplug=1
hdmi_group=2	#DMT
hdmi_mode=4	#640x480 60Hz
results in 640x480 with no overscan

Changing settings in config.txt to

Code: Select all

hdmi_cvt=320 240 60 1	#custom mode
hdmi_group=2
hdmi_mode=87
results in 320x240 with no overscan
Success! Video is available over vnc cloud connection.

However-
I succeeded in my original quest but want to learn more by understanding why these settings work the way they do. I have the following questions.

Where is the resolution 720x480 with overscan decided with default config.txt?

Why do CEA and DMT 640x480 modes differ with the overscan setting?

In the process of changing things I also did vnc to a session with the desktop GUI not running and vnc had a resolution of size 300x200. Where did this resolution get decided?

How do the changes in config.txt differ from changing settings in raspi-config->Advanced Options->Resolution?

How are the framebuffer_width and framebuffer_height different from hdmi_group and hdmi_mode settings?

andrum99
Posts: 1239
Joined: Fri Jul 20, 2012 2:41 pm

Re: realvnc screen size under different configurations

Mon Feb 19, 2018 6:41 pm

You could try installing TightVNC Server and running it on display 1 (port 5901) to provide the desktop, with the low res video display provided by RealVNC on display 0 (port 5900). The downside of TightVNC is that you would need to tunnel it via SSH if you wanted the display to be encrypted, and it doesn't have the cloud registration features of RealVNC to get you through any router NAT that is between you and the server.

Is RealVNC limited to a single display in the Pi version?

Edit: it seems the default resolution is to do with the early days of digital video (DV). NTSC has a vertical display resolution of 486 lines, and 720 pixels was chosen to give a good match between analogue studio cameras of the day and the new digital standard. DV uses 480 pixels and throws away 6 lines. See https://forum.videohelp.com/threads/312 ... hing-to-me which I found by googling 720x480. :)

andrum99
Posts: 1239
Joined: Fri Jul 20, 2012 2:41 pm

Re: realvnc screen size under different configurations

Mon Feb 19, 2018 6:56 pm

chrisiffer wrote:
Mon Feb 19, 2018 2:51 pm
Why do CEA and DMT 640x480 modes differ with the overscan setting?
CEA stands for Consumer Electronics Association and defines standards for TVs, which traditionally have used overscan due to CRT televisions having weak power supplies, leading to changes in screen size depending on the brightness of the image, and poor linearity - bright areas of the screen appear wider than dark areas of the screen.

DMT stands for Display Monitor Timing and is defined by VESA for computer displays. Traditionally computer displays don't use overscan, as back in the CRT days the screens had much better power supplies and good linearity. They also tended to have little dials to adjust the exact size and position of the image on the front of the tube.

chrisiffer
Posts: 3
Joined: Thu Dec 28, 2017 9:27 pm

Re: realvnc screen size under different configurations

Tue Feb 20, 2018 10:05 pm

andrum99 wrote:You could try installing TightVNC Server and running it on display 1 (port 5901) to provide the desktop, with the low res video display provided by RealVNC on display 0 (port 5900). The downside of TightVNC is that you would need to tunnel it via SSH if you wanted the display to be encrypted, and it doesn't have the cloud registration features of RealVNC to get you through any router NAT that is between you and the server.
I have considered running a second vnc server but I would have to work out how to get ssh tunnels working with vnc clients. I am also trying Weaved to get cloud connectivity but it is giving me trouble.
andrum99 wrote: Is RealVNC limited to a single display in the Pi version?
RealVNC only supports the display :0 with the cloud connection.
chrisiffer wrote: Where is the resolution 720x480 with overscan decided with default config.txt?
I have found answers to some of my own questions. Parsing of the config.txt is done with GPU firmware start.elf which is closed source.
chrisiffer wrote: Why do CEA and DMT 640x480 modes differ with the overscan setting?
I think setting up different modes is also done in the GPU.

I am going to do more research and submit my other questions separately. I never thought I would get deep enough into this that the closed source of the GPU would be an issue.

Return to “General discussion”