Stream component : unable to display rtsp stream

I am trying to use Reolink cameras to stream to cast devices. The streams seem to load in home assistant as I am able to see the component on the state tab however when I use camera.play_stream on a device it just appears to load and shows a blank screen. Not sure if there something else I can try. On the front end it seems to work but loses connection often.

I got 0.90.1 installed. I managed to get my cameras to stream properly now since 0.90.1 release. It wasnā€™t working with 0.90. If i watch a camera on my chromecast and at the same time decide to go to the pane in lovelace where i keep my cameras, itā€™s enough to just view the preview, the frontend for homeassistant crashes. A reboot fixes it though.

I manged to solve the above by putting all my cameras in homeassistant on Generic. Now I can pretty much do everything without it crashing.

Just thought iā€™d give my two cents. :slight_smile:

1 Like

So I have a few different instances of HA and only one of which experienced this issue (windows 10 linux subsystem). After following your suggestion I noticed it was working properly. I think you are correct that there may be another underlying issue here. There is a bug report on the frontend repo where myself and another user had the same issue and configuring the frontend to always show latest fixed it for us.

https://github.com/home-assistant/home-assistant-polymer/issues/2987

2 Likes

This is working with my Dahua cameras on 0.91.0, but with some of the issues below

  1. Does not work with H.265, but this is probably a browser/hw limitation.
  2. Will not load playlist.m3u8 the first time I click the stream, but will load it on the subsequent requests. This seems like a server side issue, because I can open it the first time on one device, then it works immediately on another device.

Error when doing #2
https://192.168.1.4:8123/lovelace/4:0:0 ResizeObserver loop limit exceeded

2 Likes

Ditto.
Have a current model Foscam and an older Edimax. Stream component canā€™t handle either as yet and has the demux errors.
The Edimax supports only mjpeg and H264 streaming.
I can use either via VLC with same URLā€™s.
Early days for this component and itā€™s camera support so it will take time to tune up I expectā€¦

Same problem here with D-Link cameras.
Iā€™ve a lot of different models of D-Link cameras and no one is workingā€¦ The stream is good with VLC but no luck with HASS.
My log is the following:

2019-04-07 19:05:28 ERROR (stream_worker) [libav.rtsp] method DESCRIBE failed: 401 Unauthorized
2019-04-07 19:05:28 ERROR (stream_worker) [libav.tcp] Connection to tcp://192.168.1.48:554?timeout=0 failed: Connection refused

You need to put the credentials in the rtsp URL

rtsp://user:pass@

2 Likes

Thanks! now it works!

dafang is working but its too slow and laggy on my chromecast. do you experience the same?

This fixes the issue for me as well. I also use Unifi G3 cameras, but presumably itā€™s not isolated to the camera, more this javascript issue?

When I first added the camera it did work fine for a while, then one day I noticed that clicking on the card just opened a blank/black card that was stuck trying to load. Appending ?latest to the URL fixed it immediately (Iā€™m on 91.1).

How to set it to display on my tv (Samsung TV).
Please guide

Problem with Dafang. Hassio gets real sluggish, even on a Intel NUC i7 with 32GB internal memory. Error in log file:

2019-04-08 08:51:51 ERROR (stream_worker) [libav.mp3float] Header missing

Look also at issue: Cant stream generic camera ā€œHeader Missingā€ #22591

1 Like

Hello
I have setup hikvision cameras and stream component.
I am able to ā€œcamera.play_stremā€ on a google screen cromecase device without issue
But on Hassio front end, after i click on the camera, my player always have a black screen and spinning circle. I do not get any errors in my log file (just ā€œstarted stream messageā€)

I have verified the urlā€™s with iSPi and streaming directly on cromecast through ā€œcamera.play_stremā€

Why I can not see the stream with hassio?
K

    - platform: generic
      name: Front House
      still_image_url: 
      http://xxx:[email protected]:80/PSIA/Streaming/channels/102/picture
      stream_source: rtsp://xxx:[email protected]:8554/Streaming/Unicast/channels/102

Youā€™re my hero with this ?latest hack. I lost several hours with dozens of configs and it was enough to add that crap at the end of the url :wink:

Try

frontend:
  javascript_version: latest

https://github.com/home-assistant/home-assistant-polymer/issues/2987

1 Like

Thank youā€¦ that solved my problem . The player now correctly displays the strem

I was having heaps of issues with the new streaming options as well with also heaps of errors but it is now fixed. I cleared my the cookies on my browser of my Home Assistant URL and it streams perfectly. I have no idea why or how this has anything to do with it but it works.

This workaround works for my yoosee cam.

https://github.com/home-assistant/home-assistant/issues/23094

1 Like

would you please guide me to use rtsp for my hikvision NVR ?
Iā€™m not able to stream on my home assistant

can you see the cameras in HA? as the problem you might have is, you are using the poe switch in the NVR? which then creates internal IP addresses. I use a separate pow switch so they are physically on my lan and get a static ip from my router.