xannor / ha_reolink_rest

ReoLink REST/Web Camera Integration for Home Assistant
24 stars 3 forks source link

Main Stream doesnt work if H265 stream #12

Closed kingy444 closed 2 years ago

kingy444 commented 2 years ago

the Reolink 822A main stream is h265 not h264 so the main stream doesnt work currently

Error from stream worker: Error opening stream (HTTP_NOT_FOUND, Server returned 404 Not Found) rtsp://****:****@10.1.0.147/h264Preview_01_main

if i manually try rtsp://:@10.1.0.147/h265Preview_01_main in VLC this works fine

xannor commented 2 years ago

I probably typoed the url builder, though the camera should support the rtspurl command which is what I try first. I will add this to the list.

xannor commented 2 years ago

I finally got a new version up, though this is "very" alpha, please give it a go and see if you still get this issue. If you get a different one, please close this and open a new issue.

kingy444 commented 2 years ago

I see some 'skipping' in the logs - not sure if that is the fix you meant. Not sure what the skipping is doing but the UI looks the same (sub streams still hidden)

That being said something i hadnt tested was the current main stream (h265) does appear to work in the ios and android apps - looking here it appears that h265 in general may be restricted for desktop streaming https://community.home-assistant.io/t/add-support-for-h-265-in-stream-component/205661/45

Hopefully this is resolved in a future release (of chrome, not HA) - but as the main stream is working fine on the mobile app the question becomes do you keep h265, and if present just set the sub to visible ?

Could probably even just get away with a note on the plugin doco that h265 streams arent supported on desktop

xannor commented 2 years ago

I have a new, better tested, version (v0.6.6), let me know if this works better.

H265 do work, but HA requires an RTSP2WebTC addon/proxy installed as they pulled the H265 support the had (some browsers do not handle it correctly) I have not had much luck with the proxy running it off of a rpi, sometimes it works sometimes it doesnt.

xannor commented 2 years ago

No follow up after a few days, assuming fixed, create a new issue if you still have problems.

kingy444 commented 2 years ago

Sorry thought I updated here that same day, that’s why there was no follow up- same issue on 0.6.6 - I updated to 0.6.7 aswell and have same issue on my 265 streams Happy to raise a new issue if you need - could probably setup remote access to a test camera if that could help you (I have a couple I haven’t installed yet)

kingy444 commented 2 years ago

Note this is only an issue on my desktops, iPad and iPhone stream Fine in x265

xannor commented 2 years ago

H265 is a limitation, due to limited browser support. RTSP is the only method to open an H265 stream, but HA has very limited RTSP support, and most of the RTSP to WebRTC proxies do not support H265. H265 is not an issue for mobile as it is supported there, and on OSX. I have two cameras with an H265 profile and I will post a solution, possibly a code update, depending on what I find as an answer. for the meantime, use the sub and ext streams.