Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2K monitor 2688x1512 issue #193

Open
gabiX87 opened this issue Oct 28, 2024 · 6 comments
Open

2K monitor 2688x1512 issue #193

gabiX87 opened this issue Oct 28, 2024 · 6 comments

Comments

@gabiX87
Copy link

gabiX87 commented Oct 28, 2024

I have a 2K monitor with native 2560x1440 resolution. Using Raspberry PI 4 model B 2GB , Buster 32bit LITE.

The problem is rpisurv can't display a solo/single rtsp stream in a 2688x1512 resolution. Which is a RTSP from a Unifi Camera in HIGH resolution. MEDIUM (1280x720) and LOW (640x360) streams do work.

I tried to edit/change general.yml fallbacks to 2560x1440 , that had no effect.

also rpisurv status

Oct 28 21:24:30 raspberry rpisurv[8897]: 2024/10/28 21:24:30 - l_default - INFO - Starting rpisurv 3.0.0
Oct 28 21:24:30 raspberry rpisurv[8897]: 2024/10/28 21:24:30 - l_default - INFO - Auto detected display GSM-27GL850 at HDMI 0 with display number 2 3840 x 2160
Oct 28 21:24:30 raspberry rpisurv[8897]: 2024/10/28 21:24:30 - l_default - INFO - Unique id of this installation is ca5ee024e277a367cd9ae8003c4dd76b35f22c6654bba2bd30b2d50660e655ff

Auto detected display GSM-27GL850 at HDMI 0 with display number 2 3840 x 2160

Interestingly --aspect-ratio=3840:2160 is not correct for my monitor


 rpisurv.service - Rpisurv Raspberry Pi Surveillance
   Loaded: loaded (/etc/systemd/system/rpisurv.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2024-10-28 21:24:30 CET; 2min 45s ago
 Main PID: 8897 (rpisurv)
    Tasks: 13 (limit: 3720)
   CGroup: /system.slice/rpisurv.service
           ├─8897 /bin/bash /usr/bin/rpisurv
           ├─8898 python3 surveillance.py
           ├─8915 python3 surveillance.py
           └─8916 /usr/bin/vlc -I dummy --aspect-ratio=3840:2160 --vout mmal_vout --network-caching 500 --no-video-title-show --mmal-display=hdmi-1 --input-timeshift-granularity=0 --repeat --mmal-vout-transparent --mmal-vout-windo

Any ideas ?

@gabiX87
Copy link
Author

gabiX87 commented Oct 28, 2024

raspberrypi/firmware#1385

sudo nano /boot/config.txt

and add this...

dtoverlay=vc4-fkms-v3d
gpu_mem=256
hdmi_group=2
hdmi_mode=87
hdmi_cvt=2560 1440 60 3 0 0 1
max_framebuffer_width=2560
max_framebuffer_height=1440
hdmi_pixel_freq_limit=400000000
hdmi_group:1=2
hdmi_mode:1=87
hdmi_cvt:1=2560 1440 60 3 0 0 1
hdmi_pixel_freq_limit:1=400000000

after this I get the correct --aspect-ratio=2560:1440

pi@raspberry:~ $ sudo service rpisurv status
● rpisurv.service - Rpisurv Raspberry Pi Surveillance
   Loaded: loaded (/etc/systemd/system/rpisurv.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2024-10-28 21:54:53 CET; 17s ago
 Main PID: 1992 (rpisurv)
    Tasks: 21 (limit: 3292)
   CGroup: /system.slice/rpisurv.service
           ├─1992 /bin/bash /usr/bin/rpisurv
           ├─1993 python3 surveillance.py
           ├─2004 python3 surveillance.py
           └─2005 /usr/bin/vlc -I dummy **--aspect-ratio=2560:1440** --vout mmal_vout --network-caching 1000 --no-video-title-show --mmal-display=hdmi-1 --input-timeshift-granularity=0 --repeat --mmal-vout-transparent --mmal-vout-windo

The stream works now , but it's blown out , flicker-fest.

@gabiX87
Copy link
Author

gabiX87 commented Oct 28, 2024

I had to change ENCODING from Standard to Enhanced. Whatever Enhanced means in this case , it works now.

image

IMO Enhanced might mean HEVC (H.265) and Standard H.264 because when I check the rpisurv status I get this ...

Oct 28 22:30:52 raspberry rpisurv[531]: [b3515f70] hevc packetizer: Waiting for VPS/SPS/PPS
Oct 28 22:30:53 raspberry rpisurv[531]: [b3515948] mmal_avcodec decoder: Looking for HEVC decoder 'hevc'

P.S.
HIGH quality stream from a older G3 camera , 1920x1080 , with standard encoding works flawlessly. The main issue is the higher resolution from the new =>G4 cameras.

@gabiX87
Copy link
Author

gabiX87 commented Oct 29, 2024

I am out of ideas how to fix this ...

IMG_1233

@SvenVD
Copy link
Owner

SvenVD commented Oct 31, 2024

I am not sure the raspberry pi4 can even handle such higher resolution streams. You could try with vlc and different vlc options first on the raspberry pi

@gabiX87
Copy link
Author

gabiX87 commented Oct 31, 2024

I am not sure the raspberry pi4 can even handle such higher resolution streams. You could try with vlc and different vlc options first on the raspberry pi

It works with Enhanced encoding (H265) but not with standard encoding (H264) the RTSP stream resolution is the same 2688x1512.

Raspberry Pi 4 has 4K (3840 x 2160) support for two monitors , it can handle it ....

Must try some VLC options ... I remember two years ago I tried G4 Pro , which is a 4K camera and it was working back then.

@71403
Copy link

71403 commented Nov 5, 2024

This also worked with a Hanwha 4mp camera streaming at 2560 x 1440, also had to use H.265 stream.

Pi 4, 4gb, Buster 32-bit full version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants