Anonymousdog / displaycameras

System for displaying RTSP feeds from IP cameras on the Raspberry Pi
Apache License 2.0
568 stars 114 forks source link

Odd issue with rotated 1x3 display #65

Closed NicholasBoccio closed 2 years ago

NicholasBoccio commented 4 years ago

Loss of synchronization & bad lag once 3rd stream starts in 1x3 configuration (rotated portrait mode).

I have been using this for 1 year, no issues, and recently all 3 of my displays immediately become laggy (within 2 seconds of the reboot and 3rd stream loading, the .5 second delay turns into 1-2 second delay and continues to get worse as it stays on. It does not recover.

Oddly, the same Pi, same code (just changed the rotation and layout) it will remain stable in a 2x2 grid.

I cannot figure out what happened. I thought Ubiquity might have tried to sabotage RTSP streaming, so I removed the cameras from Unifi and downgraded the firmware - no change. I then factory reset the cameras - no change.

My only experience with raspberry pis is this project, so I don't know what else to trouble shoot. I updated 1 pi - no change, and then I completely started over and again no change.

To reproduce: set rotation in boot.txt to 1 screen blanking (doesnt matter if on or off) No to display detect Edit layout config as such: "0 0 1080 640" "0 640 1080 1280" "0 640 1080 1920" image

All 3 cameras RTSP streams are low quality 1st is from G4 Pro 640x360 2nd and 3rd are from G3AF 640x360 each.

I've been fighting this for 1 week, trying new Pis, new SD cards, and changing wifi access point. Nothing has changed the issue. Thanks for the help

akoryuerek commented 4 years ago

Look here https://github.com/Anonymousdog/displaycameras/issues/61#issuecomment-668052526

and don´t rotate in config.txt. Use --orientation 90 in displaycameras

NicholasBoccio commented 4 years ago

Look here #61 (comment)

and don´t rotate in config.txt. Use --orientation 90 in displaycameras

Thank you for the reply, however this did not rotate the display. Can you include a screen shot of the code?

NicholasBoccio commented 4 years ago

Also, my display is rotated fine, the streams just lag after the 3rd stream starts.

However, in a 2x2 display (same streams, same quality) there is no issue.

Again, these have worked fine for a year, I dont know what has changed.

NicholasBoccio commented 4 years ago

I think I figured it out. I think that with a recent Ubiquiti update, that their camera firmware upgraded the FPS or bitrate of the cameras. The displays behave normally if I reduce the quality to 10 FPS and 1000bps, which is fine for what I use these for.

I think that because I have the 1x3 portrait mode, that the Pi is working more to stretch the 3 streams, than the other pi since the 2x2 display requires practically no stretching or resizing.

I'd love to get feed back on this, and see if it makes sense to everyone that is more familiar with the player and the code than I am.

Anonymousdog commented 4 years ago

This layout, Edit layout config as such: "0 0 1080 640" "0 640 1080 1280" "0 640 1080 1920" Overlaps the 2nd and 3rd windows. This will reliably cause display problems as soon as the last stream loads.

Thanks, Andy

On Thu, Aug 6, 2020, 5:16 PM NicholasBoccio notifications@github.com wrote:

I think I figured it out. I think that with a recent Ubiquiti update, that their camera firmware upgraded the FPS or bitrate of the cameras. The displays behave normally if I reduce the quality to 10 FPS and 1000bps, which is fine for what I use these for.

I think that because I have the 1x3 portrait mode, that the Pi is working more to stretch the 3 streams, than the other pi since the 2x2 display requires practically no stretching or resizing.

I'd love to get feed back on this, and see if it makes sense to everyone that is more familiar with the player and the code than I am.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Anonymousdog/displaycameras/issues/65#issuecomment-670196071, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHIYIKNNRDBPGQ7PBYW2P4TR7MMSXANCNFSM4PW2KLEQ .

NicholasBoccio commented 4 years ago

I apologize, that was a typo. Here is what the 1x3 display was configured as: image

As I mentioned, I believe the new forced FW caused the RTSP streams to default to 30fps each, do you think that, coupled with the stretching of the 640x360 stream could have degraded the performance in the pi, when the 2x2 displays continued to display properly?

Anonymousdog commented 4 years ago

Sounds reasonable to me. You can't reduce bitrate since the update?

On Sat, Aug 8, 2020, 7:09 PM NicholasBoccio notifications@github.com wrote:

I apologize, that was a typo. Here is what the 1x3 display was configured as: [image: image] https://user-images.githubusercontent.com/30320991/89721334-f4e79080-d9a1-11ea-9631-51288742e419.png

As I mentioned, I believe the new forced FW caused the RTSP streams to default to 30fps each, do you think that, coupled with the stretching of the 640x360 stream could have degraded the performance in the pi, when the 2x2 displays continued to display properly?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Anonymousdog/displaycameras/issues/65#issuecomment-670983415, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHIYIKMOKEHPRZD4CNKHFYTR7XLKTANCNFSM4PW2KLEQ .