No luck with the stream component. Thousands of Errors in LOG

Hi,
I have no luck with the stream component. I think I tried nearly everything. I have many different types of camera (reolink, sonoff, ZiLnk, Defang, Hikam, espcam etc…), connected via Onvif, RSTP, ffmpg, generic etc… But non of them is running smoothly and constantly in HA. Sometime the picture did not load in HA UI for one or all cameras. Sometimes the live stream did not run when clicking on the camera.
All of the cameras running fine on my Synology Diskstation. So I added all of my cameras with the new Synology Camera Integration (added in 0.116.0). But also this works not great.
After restarting HA, the cameras reacts fast and correct in HA. But after a while the issues came back.
Disabling the stream component fixes all the problems. But I its not the same as streaming :frowning:

I’m running HA on an Intel i3 NUC with Ubuntu. I have a very solid all Unifi Network. And as I said. Cameras running pretty fine on the Synology Diskstation.

What can cause this issues? Please help.
I have so many stream errors in the log, I’m not sure what to post.

method DESCRIBE failed: 401 Unauthorized
19:32:18 – components/stream/worker.py (ERROR) - Die Nachricht ist zum ersten Mal um 12:58:17 aufgetreten und erscheint 61 mal
Stream connection failed: rtsp://syno:[email protected]:554/Sms=3.unicast
19:32:17 – Stream (ERROR) - Die Nachricht ist zum ersten Mal um 12:40:57 aufgetreten und erscheint 1854 mal
method DESCRIBE failed: 401 Unauthorized
19:32:17 – components/stream/worker.py (ERROR) - Die Nachricht ist zum ersten Mal um 12:40:57 aufgetreten und erscheint 1644 mal
method DESCRIBE failed: 401 Unauthorized (repeated 2 more times)
19:31:38 – components/stream/worker.py (ERROR) - Die Nachricht ist zum ersten Mal um 12:40:57 aufgetreten und erscheint 121 mal

2020-10-09 19:32:57 ERROR (stream_worker) [homeassistant.components.stream.worker] Stream connection failed: rtsp://syno:[email protected]:554/Sms=3.unicast
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/stream/worker.py", line 48, in stream_worker
    _stream_worker_internal(hass, stream, quit_event)
  File "/usr/src/homeassistant/homeassistant/components/stream/worker.py", line 65, in _stream_worker_internal
    container = av.open(stream.source, options=stream.options)
  File "av/container/core.pyx", line 354, in av.container.core.open
  File "av/container/core.pyx", line 225, in av.container.core.Container.__cinit__
  File "av/container/core.pyx", line 257, in av.container.core.Container.err_check
  File "av/error.pyx", line 336, in av.error.err_check
av.error.HTTPUnauthorizedError: [Errno 825242872] Server returned 401 Unauthorized (authorization failed): 'rtsp://syno:[email protected]:554/Sms=3.unicast'; last error log: [rtsp] method DESCRIBE failed: 401 Unauthorized
2020-10-09 19:32:57 ERROR (stream_worker) [homeassistant.components.stream.worker] Stream connection failed: rtsp://syno:[email protected]:554/Sms=3.unicast
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/stream/worker.py", line 48, in stream_worker
    _stream_worker_internal(hass, stream, quit_event)
  File "/usr/src/homeassistant/homeassistant/components/stream/worker.py", line 65, in _stream_worker_internal
    container = av.open(stream.source, options=stream.options)
  File "av/container/core.pyx", line 354, in av.container.core.open
  File "av/container/core.pyx", line 225, in av.container.core.Container.__cinit__
  File "av/container/core.pyx", line 257, in av.container.core.Container.err_check
  File "av/error.pyx", line 336, in av.error.err_check
av.error.HTTPUnauthorizedError: [Errno 825242872] Server returned 401 Unauthorized (authorization failed): 'rtsp://syno:[email protected]:554/Sms=3.unicast'; last error log: [rtsp] method DESCRIBE failed: 401 Unauthorized
2020-10-09 19:32:58 ERROR (stream_worker) [libav.rtsp] method DESCRIBE failed: 401 Unauthorized

No solution for this? having exact the same errors in my log

Sorry no solution.
I disabled the stream component for now…

The log entry indicates the camera rejected your username and/or password.

This issue is also discussed in this thread but unfortunately no solution still: [Synology DSM] Camera stream not working

While the log message suggests it’s related to username and password, it isn’t: the login works fine when logging in directly into Synology Surveillance Station OR when you restart the Synology integration (as suggested in the thread above: [Synology DSM] Camera stream not working) .

There’s a solution (well, workaround really) mentioned here.

TL;DR: the default stream path/URL has an expiry of 1 hour. You can change this to “forever” by right-clicking on the camera in Surveillance Station and choosing “Share stream path”.

There’s a proper solution in the works.

1 Like

thanks a lot. This fixed most of my issues!