elad-bar / ha-blueiris

Integration with Blue Iris Video Security Software
184 stars 43 forks source link

Camera stream flicker/flash every second. KeyFrame issue? #108

Open craggyh opened 3 years ago

craggyh commented 3 years ago

I have this integration configured with h264 and the stream component checkbox ticked. When I view camera streams in HA they flicker/flash about twice every second. This seems to be related to the GOP setting in BlueIris is 15 as these are 30fps Reolink 5MP IP cameras meaning 2 key frames every second. It's very annoying and really makes the streams unusable. I have tested reducing the GOP to 5 and the flickers increase and increasing it to 60 and the flickers decrease to every 2s so it's confirmed that the flicker/flashing is related to the keyframe data. Right before the flash the image gets worse and more pixelated then flash, clear image before it degrades until the next flash.

I've connected to the cameras directly with HA stream component and it doesn't happen. I have also added the BlueIris web UI to my HA as an iFrame and viewed the same camera streams where it doesn't happen either. It's just the h264 feeds from BlueIris cameras using this integration that seem to have the flashing issue.

I switched to MJPEG and disabled "stream" but the streams are limited to just 1fps which is horrible considering i can view them as perfect 5MP 30fps streams in HA with the stream component enabled but the 15-30s lag is really annoying and makes it pointless for things like a front door camera where someone could press a doorbell and walk away before the stream even shows anyone at the door.

elad-bar commented 3 years ago

Hi,

2 weeks ago I switched from BI to Shinobi Video due to lots of issues, memory leaks, crashes and terrible streaming capabilities (although I have a strong server), Therefore, up until BI will get more stable, I don't plan to maintain that component, If you would like to suggest a PR, I'll approve it so you will be able to test it.

BTW, I released a Shinobi Video component (not yet published it in HA forum) just in case you would like to give it a try, it works much better

Thanks

craggyh commented 3 years ago

Hi

Thanks for the info. I looked at Shinobi recently but couldn’t see how it can do hardware decode/encode if it’s in Docker or Ubuntu and no mention in docs. Do you use hardware decode/encode with Shinobi?

elad-bar commented 3 years ago

yes, i'm using it, works pretty good, i'm using the PRO version with GPU based docker image, when I tried few months ago Shinobi, it didn't went well, last time i tried it worked smoothly.

if you would like to switch to the mail, I can send you docker-compose, settings and camera examples (with and without audio / motion detector), etc..