SvenVD / rpisurv

Robust Platform for Integrated Streaming
https://community.rpisurv.net
GNU General Public License v2.0
625 stars 101 forks source link

Blinking stream on 2x2 #112

Closed gabiX87 closed 3 years ago

gabiX87 commented 3 years ago

My raspberryPI 4 running rpisurv v3_ľatest is experiencing ,on a 2x2 layout, a strange blinking issue. See here https://youtu.be/8axsQqVENfc

pulling the ( _2 ) low resolution RTSP streams from Unifi Video NVR + another 4 high quality streams on rotation. I tried changing the caching but it did not help.

Also if I enabled audio on all 4 high res streams the audio is overlaping each other. Wouldn't it be possible to mute the audio until the stream is displayed on the screen ?

SvenVD commented 3 years ago

This is most probably because you are requesting more from the raspberry gpu then it can handle. You should use low res streams as the gpu of the pi can not handle downscaling to the window size with that much high res streams.

For the audio we can theoretically disable it for all streams when that screen is inactive. However that requires caching to be disabled too. Please create feature request on https://community.rpisurv.net for this. My time is limited so no guarantees this will ever be implemented. But when it is a feature request then at least it is on the radar if time becomes available.

gabiX87 commented 3 years ago

streams on the 2x2 are 640x360 @ 10FPS

streams ending with _2 - low , _1 - medium , _0 - high

I will try to incrementaly disable _0 streams which are solo 1x1 on rotation after the 2x2

SvenVD commented 3 years ago

What raspberry pi device do you have,

My guess is that you high res streams, are too high res, if you remove them, do you still experience the issue?

gabiX87 commented 3 years ago

Raspberry PI 4 model B - 2GB RAM High res streams are 1920x1080 i.e FHD @ 25FPS

rPI4 can handle 4K@60FPS

4 times FHD = one 4K , PI should handle twice as many 1080 streams

SvenVD commented 3 years ago

it also depends on other things like if the pi needs to do downscaling or not. What were the result of your tests? Does it still flickers with lower res streams? ( so no downscaling needs to happen?)

4K@60FPS video using H.265, 1080p@60FPS video using @H.264

gabiX87 commented 3 years ago

yeah , you're right....

I lowered all stream to LOW _2 ... blinking/flickering stopped. I am going to write the feature request then "option to not load the stream in the background" It would allow for many more high quality streams w/o the audio overlapping issue.

SvenVD commented 3 years ago

That option is already available: in general.yml set enable_opportunistic_caching_next_screen: False . This will disable loading the streams of the next screen in background.

gabiX87 commented 3 years ago

Thank you. I completely missed it , not familiar with all the options yet. Tomorrow I'm going to test it.