Git Product home page Git Product logo

Comments (17)

RChadwick7 avatar RChadwick7 commented on July 28, 2024

I would be very curious to know the same thing.

from displaycameras.

Anonymousdog avatar Anonymousdog commented on July 28, 2024

from displaycameras.

shark92651 avatar shark92651 commented on July 28, 2024

I finally got a chance to configure a RPi4 with 4GB and a 4K TV that I recently purchased. I am having no luck so far. Just trying to use 2 1920x1080 camera feeds I could only get one to display when I had gpu_mem set to 512. It would switch back and forth (like a flicker, but only displaying one feed at a time) between both feeds until ultimately one would go blank and then the 2nd would display fine. As ahjcheng mentioned in a closed post I read earlier, I then tried setting gpu_mem=1024 and I was able to get 2 1080p feeds to display, however an attempt to display 4 of them would only display the original 2. I then tried a lower res substream of 704x480. With this resolution I can only get 7 of 9 to display when trying a 3x3 layout. I'm not sure if this is just poor support for 4k displays in the RPi4, an issue with my 4K TV, or what.

https://www.raspberrypi.org/documentation/configuration/config-txt/memory.md
The documentation linked above states:
Values of gpu_mem over 512 are not recommended, will provide no performance improvements, and are untested.

Something did change when I set it to 1024, in that it would allow 2 1080p streams where when I set it to 512 it would flash back and forth between the 2. In the end, it is very inconsistent and I can't figure out any combination of settings that will allow me to display more than 2 streams at 1080p or more than 7 at D1 (704x480).

from displaycameras.

shark92651 avatar shark92651 commented on July 28, 2024

I did some more testing this morning. When changing the gpu_mem to 512 or less, the system will display all 9 feeds in a 3x3 matrix, but has the super-seizure flashing issue. If I up the gpu_mem to 944 or 1024, there is no flashing but will only display 7 feeds. Any suggestions on settings I should try to resolve the issue?

These are the display related settings that are uncommented in config.txt:
hdmi_group=1
hdmi_mode=95
config_hdmi_boost=6
dtoverlay=vc4-fkms-v3d
max_framebuffers=2
gpu_mem=944

More Info: If I switch from the 4K 30hz to 60hz (hdmi_enable_4kp60=1 and hdmi_mode=97) then the number of feeds displayed drops down from 7 to 5. I also tried setting max_framebuffers=1 since I am using a single monitor but that had no effect. There definitely seems to be some issue with the 4k monitor support in the RPi4.

from displaycameras.

TLovskog avatar TLovskog commented on July 28, 2024

I have the exact same problem with 2560x1440.
With 512 gpu_mem all streams (10) show up, but with some serious flickering. With higher gpu_mem omxplayer fails to start playback of stream 8 and above.
I accidentally run omxplayer with one of the failing streams, to test. Then I started the displaycameras. Now only 6 streams appear and after that opmxplayer fails on all remaining.

... cut successful stream 1-6
Starting omxplayer for Garage
Garage started
Starting omxplayer for LivingRoom
Waiting for LivingRoom omxplayer startup 0
Waiting for LivingRoom omxplayer startup 1
Waiting for LivingRoom omxplayer startup 2
Waiting for LivingRoom omxplayer startup 3
Waiting for LivingRoom omxplayer startup 4
Waiting for LivingRoom omxplayer startup 5
Waiting for LivingRoom omxplayer startup 6
Waiting for LivingRoom omxplayer startup 7
Waiting for LivingRoom omxplayer startup 8
Waiting for LivingRoom omxplayer startup 9
Waiting for LivingRoom omxplayer startup 10
LivingRoom failed playback
... cut

from displaycameras.

shark92651 avatar shark92651 commented on July 28, 2024

I believe the issue is either with Omxplayer or with the RPi4 support for 4k monitors. I tried a different solution that uses Omxplayer and it behaved exactly the same - can only get 8 streams to work.

from displaycameras.

TLovskog avatar TLovskog commented on July 28, 2024

If I edit the displaycameras script to omit any start of omxplayer between 1-7, number 8 will start. Seams to be something with starting more than 7 omxplayer instances.

from displaycameras.

Anonymousdog avatar Anonymousdog commented on July 28, 2024

from displaycameras.

TLovskog avatar TLovskog commented on July 28, 2024

Thanks for responding.
Resolutions as in my total 2560x1440 or resolutions on my streams 640x360 x 10

from displaycameras.

rws832 avatar rws832 commented on July 28, 2024

Do you have the code for the 4x4 layout for a 1920x1080 screen? I am trying to get 13 cameras on one screen.

from displaycameras.

shark92651 avatar shark92651 commented on July 28, 2024

I have a code generator that can create it. Here it is assuming you want to divide the screen evenly between 16 windows in 4x4 matrix. Obviously you need to tweak your user/pass and rtsp stream URLs. Also keep in mind that if the Pi has to downscale your actual feed resolutions to fit the window sizes it will impact performance.

layout.txt

from displaycameras.

Anonymousdog avatar Anonymousdog commented on July 28, 2024

from displaycameras.

rws832 avatar rws832 commented on July 28, 2024

Thanks for the code. Where can I find this code generator at also? We have several displays to convert over to the displaycameras an it would come in handy.

from displaycameras.

shark92651 avatar shark92651 commented on July 28, 2024

It's a simple C++ app I wrote in Visual Studio. Here is the main code. You just need to add a simple UI or adapt it into a console app. You need to input 4 integers:

seCols.Value and seRows.Value is the size of the matrix (4x4 for example)
seW.Value and seH.Value is the window width and height of the feeds
meResults.Lines is the UI control that receives the output, or you could dump it to a file.

Form1.txt

from displaycameras.

rws832 avatar rws832 commented on July 28, 2024

Thanks Shark92651. This will save a lot of time.

from displaycameras.

SvenVD avatar SvenVD commented on July 28, 2024

just FYI, https://github.com/SvenVD/rpisurv has integrated autocalculation of the windows. Downside is that currently all streams are handled the same, so you can not make one stream bigger as another, but this covers must use cases like a 4x4.

from displaycameras.

shark92651 avatar shark92651 commented on July 28, 2024

That's good to know. I would give rpisurv a try but I fear it also won't handle 9 streams on RPi4 and 4K monitor since it also uses omxplayer. I have tried two different packages, both based on omxplayer, and both fail to handle 9 streams at 704x480 on 4K monitor.

from displaycameras.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.