fwestenberg / reolink_dev

Home Assistant Reolink addon
MIT License
553 stars 101 forks source link

RLC-812A / RLC-811 A wont steam #514

Open rougewan opened 2 years ago

rougewan commented 2 years ago

Hello,

I have bought three new cameras and all integrated fine however when I click to view the steam on the 812a and 881a the steam will no load and only show a grey screen. However, for the cheaper 510a it loads fine.

All three work fine in the native app.

I was hoping someone might be able to suggest why the two cameras won't stream? Problem

Any help would be appreciated! :D

GewoonRoy commented 2 years ago

@rougewan Have you checked issue #364 ? I think it might help you a little further

craggyh commented 2 years ago

The issue is that Reolink 8MP cameras (810/811/820/822 etc.) all use h265 for the main stream which can't yet be decoded over HTML5 due to licensing restrictions (except for Safari). The 5MP cameras 510/511/522 etc. all use h264 for the main stream because of the lower bandwidth requirements and so have no issue playing in the Homeassistant front-end. The h265 streams will work on VLC player because it's not being decoded by a web browser.

Even if you set the stream source to h264 in Homeassistant the camera actually still hands out a h265 stream over the same URL. You can confirm this behavious in VLS player by opening the /h264ProfileMain and /h265ProfileMain streams and going to Codec Info, you'll see both streams are the same HEVC source.

If you have an 8MP camera the stream should load perfectly in Homeassistant on IOS because Apple doesn't have the h265 license limitation (presumably they just paid the fees). This isn't really an Reolink issue, more of a h265 licensing issue introduced because of the bandwidth requirements for 8MP 4k streams on the higher end cameras. A firmware update is unlikely to fix this as the functionality is likely built into hardware. Considering the computational requirements or HEVC and need to use the most cost effective hardware, I can't see a software based solution ever coming out for these cameras.

GewoonRoy commented 2 years ago

@craigueh Completely true.

It's not what you actually want but i've got it working by setting the resolution to a 2k resolution instead of 4k resolution in the Reolink Client app. By doing this it seems it can fall back to h264 and it's possible to stream through Home Assistant in Google Chrome or Home assistant app etc. It's better then running it on a "sub" setting which would be a resolution of 640 unless you want it to have it as a small card in Home Assistant.

https://github.com/fwestenberg/reolink_dev/issues/496#issuecomment-1122717949

craggyh commented 2 years ago

Ah, I've never actually thought of dropping the stream quality back a notch in the camera settings. Just did this and now I can use all my 820A's in Homeassistant on my PC. Thank you. :-)

beepboop1234 commented 2 years ago

@GewoonRoy - Does that change mean that the camera will only be recording in 2k and not 4k in the NVR? I assume so but figured you might know for sure. Thanks either way!

GewoonRoy commented 2 years ago

@beepboop1234 Yes, the main stream will go in 2k. I don't use an NVR, but because you set the camera to a lower resolution itself, the NVR will pick up on this. (bummer)

mbuck200 commented 2 years ago

Could ffmpeg resolve this?

RaptorPR443 commented 2 years ago

i have the RLC-811A streaming perfectly on my HA instance with the latest integration version 0.54, even have the spotlight and siren switches working perfectly. i have it connected to a poe switch and HA conected to its ip rather than the nvr channel.

forgot to mention, with 4k resolution.

jwelvaert commented 1 year ago

i have the RLC-811A streaming perfectly on my HA instance with the latest integration version 0.54, even have the spotlight and siren switches working perfectly. i have it connected to a poe switch and HA conected to its ip rather than the nvr channel.

forgot to mention, with 4k resolution.

How are you doing this? I was able to stream my RLC-820A in HA when it was connected through my NVR but now that I have it connected directly to my POE switch (like you) I can no longer stream it and none of the motion things work. It is connected to HTTP not HTTPS. My older RLC-420-5MP's stream fine and motion now works - never used to via the NVR.

rainbowbreeze commented 1 year ago

@RaptorPR443 I'm interested too in knowing how you made the magic. So far, I was able to stream in HA only setting a < 4K resolution (2K or 5MP) for the main (Clean) stream. My setup is similar to your, with 4 cameras connected directly via PoE eth to the network (and not via a NVR).