Error using stt.cloud_say on a webrtc stream
Since HA 2025.8 i can no longer send a text-to-speech to webrtc media player. i get the following error log. This has previously worked without any problems.
I have tried this on WebRTC v3.6.1 and v3.6.0 (in case it was the recent version which broke it). Same error in both
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 28, in _handle_async_response
await func(hass, connection, msg)
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 931, in handle_execute_script
script_result = await script_obj.async_run(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
msg.get("variables"), context=context
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1836, in async_run
return await asyncio.shield(create_eager_task(run.async_run()))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 460, in async_run
await self._async_step(log_exceptions=False)
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 526, in _async_step
self._handle_exception(
~~~~~~~~~~~~~~~~~~~~~~^
ex, continue_on_error, self._log_exceptions or log_exceptions
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 556, in _handle_exception
raise exception
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 524, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1012, in _async_step_call_service
response_data = await self._async_run_long_action(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<9 lines>...
)
^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 624, in _async_run_long_action
return await long_task
^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2835, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2878, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/tts/legacy.py", line 155, in async_say_handle
await hass.services.async_call(
...<17 lines>...
)
File "/usr/src/homeassistant/homeassistant/core.py", line 2835, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2878, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 850, in entity_service_call
single_response = await _handle_entity_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^
hass, entity, func, data, call.context
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 922, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/config/custom_components/webrtc/media_player.py", line 74, in async_play_media
assert r.ok
^^^^
AssertionError
It's not a fact that it was the update that broke it. Maybe it's just a cumulative error in your camera. Maybe the go2rtc update affected the error.
There is no reason for the error in the log above. Just the fact that it exists.
It needs a detailed description of all your configs. Information about the camera. Logs. And stream info/probe from go2rtc WebUI.
Apologies AlexxIT, i should know better than that. Yes the error in HA system logs did seem pretty useless. In fact, I think this might have started after the recent frigate update so perhaps the go2rtc binary update as part of 0.16.0.
I have an Amcrest AD420 doorbell, configured through frigate below. i use a few custom:webrtc-camera components in the dashboard. One as a preview, and one fullscreen with 2way communication. These are still working fine, even 2way comms.
So, the only thing that stopped working is the TTS convenience buttons for "please leave the parcel" etc.
I can't seem to access the go2rtc ui on port 1984 at the moment. I'll have another look at that when i get home, but i've included the go2rtc logs below. What shouts at me is the RTSP/1.0 401 Unauthorized response which immediately follows the TTS POST request (log: 2025-08-27 15:38:40.205723103)
webrtc config
- platform: webrtc
name: Doorbell
stream: doorbell_2way
audio: pcmu/8000
frigate config
# yaml-language-server: $schema=http://ccab4aaf-frigate:5000/api/config/schema.json
version: 0.16-0
mqtt:
host: core-mosquitto
port: 1883
user: mqtt
topic_prefix: frigate
database:
path: /config/frigate.db
detectors:
coral:
type: edgetpu
device: usb
semantic_search:
enabled: true
reindex: false
birdseye:
enabled: false
detect:
enabled: true
snapshots:
enabled: true
retain:
default: 7
face_recognition:
enabled: true
go2rtc:
log:
level: "trace"
streams:
doorbell_detect:
- rtsp://username:[email protected]:554/cam/realmonitor?channel=1&subtype=1#backchannel=0
doorbell_full:
- ffmpeg:rtsp://username:[email protected]:554/cam/realmonitor?channel=1&subtype=0#backchannel=0
doorbell_2way:
- rtsp://username:[email protected]:554/cam/realmonitor?channel=1&subtype=0#backchannel=1
- ffmpeg:doorbell_2way#audio=pcma
ffmpeg:
input_args: preset-rtsp-restream-low-latency
output_args:
record: preset-record-generic-audio-aac
hwaccel_args: preset-intel-qsv-h264
cameras:
doorbell:
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/doorbell_detect
roles:
- detect
- path: rtsp://127.0.0.1:8554/doorbell_full?video&audio
roles:
- record
best_image_timeout: 10
motion:
threshold: 40
detect:
width: 2560
height: 1920
snapshots:
enabled: true
retain:
default: 7
required_zones:
- driveway
record:
enabled: true
expire_interval: 60
retain:
days: 7
mode: all
alerts:
retain:
days: 7
pre_capture: 1
post_capture: 1
detections:
retain:
days: 7
zones:
driveway:
coordinates: 0,0.512,0.601,0.503,0.602,0.739,0.86,0.666,1,0.591,1,1,0,1
inertia: 3
loitering_time: 0
mqtt:
enabled: true
bounding_box: false
timestamp: false
crop: true
height: 1000
quality: 100
required_zones:
- driveway
review:
alerts:
required_zones:
- driveway
detections:
required_zones:
- driveway
Relevant slice of logs from go2rtc
2025-08-27 15:38:19.412376122 16:38:19.412 TRC [rtsp] server request:
2025-08-27 15:38:19.412380415 OPTIONS rtsp://127.0.0.1:8554/doorbell_detect RTSP/1.0
2025-08-27 15:38:19.412382202 Cseq: 63
2025-08-27 15:38:19.412384397 User-Agent: FFmpeg Frigate/0.16.0-c2f8de9
2025-08-27 15:38:19.412385612 Session: 89406035
2025-08-27 15:38:19.412386778
2025-08-27 15:38:19.412388076
2025-08-27 15:38:19.412389855 16:38:19.412 TRC [rtsp] server response:
2025-08-27 15:38:19.412391134 RTSP/1.0 200 OK
2025-08-27 15:38:19.412392399 Cseq: 63
2025-08-27 15:38:19.412393653 Session: 89406035
2025-08-27 15:38:19.412394751
2025-08-27 15:38:19.412395962
2025-08-27 15:38:19.867679000 16:38:19.867 TRC [rtsp] server request:
2025-08-27 15:38:19.867716663 OPTIONS rtsp://127.0.0.1:8554/doorbell_full?video&audio RTSP/1.0
2025-08-27 15:38:19.867721717 Cseq: 64
2025-08-27 15:38:19.867727633 User-Agent: FFmpeg Frigate/0.16.0-c2f8de9
2025-08-27 15:38:19.867732709 Session: 24288796
2025-08-27 15:38:19.867737278
2025-08-27 15:38:19.867741607
2025-08-27 15:38:19.867746770 16:38:19.867 TRC [rtsp] server response:
2025-08-27 15:38:19.867751572 RTSP/1.0 200 OK
2025-08-27 15:38:19.867754675 Cseq: 64
2025-08-27 15:38:19.867758041 Session: 56639432
2025-08-27 15:38:19.867761041
2025-08-27 15:38:19.867764025
2025-08-27 15:38:23.447177083 16:38:23.447 TRC [api] GET /api/streams 127.0.0.1:36894
2025-08-27 15:38:24.826876078 16:38:24.826 TRC [api] GET /api/streams?src=doorbell_2way 172.30.32.1:34368
2025-08-27 15:38:40.205723103 16:38:40.205 TRC [api] POST /api/streams?dst=doorbell_2way&src=ffmpeg:http://192.168.0.101:8123/api/tts_proxy/GA7tVW_wsR-crYhuuuXKGw.mp3%23audio%3Dpcmu/8000%23input%3Dfile 172.30.32.1:48656
2025-08-27 15:38:40.227097371 16:38:40.226 TRC [rtsp] client request:
2025-08-27 15:38:40.227101609 DESCRIBE rtsp://192.168.0.105:554/cam/realmonitor?channel=1&subtype=0 RTSP/1.0
2025-08-27 15:38:40.227103118 CSeq: 1
2025-08-27 15:38:40.227104559 Accept: application/sdp
2025-08-27 15:38:40.227106209 Require: www.onvif.org/ver20/backchannel
2025-08-27 15:38:40.227107595 User-Agent: go2rtc/1.9.9
2025-08-27 15:38:40.227109055
2025-08-27 15:38:40.227110562
2025-08-27 15:38:40.235383427 16:38:40.235 TRC [rtsp] client response:
2025-08-27 15:38:40.235387940 RTSP/1.0 401 Unauthorized
2025-08-27 15:38:40.235389221 Cseq: 1
2025-08-27 15:38:40.235391262 Www-Authenticate: Digest realm="Login to Z17454CF93BE3", nonce="a4fd9e8beed93659bcbde662e82df30c"
2025-08-27 15:38:40.235392467
2025-08-27 15:38:40.235393545
2025-08-27 15:38:40.235535132 16:38:40.235 TRC [rtsp] client request:
2025-08-27 15:38:40.235537541 DESCRIBE rtsp://192.168.0.105:554/cam/realmonitor?channel=1&subtype=0 RTSP/1.0
2025-08-27 15:38:40.235538808 Accept: application/sdp
2025-08-27 15:38:40.235540266 Require: www.onvif.org/ver20/backchannel
2025-08-27 15:38:40.235541516 User-Agent: go2rtc/1.9.9
2025-08-27 15:38:40.235542661 CSeq: 2
2025-08-27 15:38:40.235545634 Authorization: Digest username="admin", realm="Login to Z17454CF93BE3", nonce="a4fd9e8beed93659bcbde662e82df30c", uri="rtsp://192.168.0.105:554/cam/realmonitor?channel=1&subtype=0", response="500c94414344b81f27669f5f95734851"
2025-08-27 15:38:40.235546705
2025-08-27 15:38:40.235547757
2025-08-27 15:38:40.268719100 16:38:40.268 TRC [rtsp] client response:
2025-08-27 15:38:40.268723355 RTSP/1.0 200 OK
2025-08-27 15:38:40.268725043 X-Accept-Dynamic-Rate: 1
2025-08-27 15:38:40.268727045 Content-Base: rtsp://192.168.0.105:554/cam/realmonitor?channel=1&subtype=0/
2025-08-27 15:38:40.268728637 Cache-Control: must-revalidate
2025-08-27 15:38:40.268730143 Content-Length: 606
2025-08-27 15:38:40.268731723 Content-Type: application/sdp
2025-08-27 15:38:40.268733025 Cseq: 2
2025-08-27 15:38:40.268734313
2025-08-27 15:38:40.268735538 v=0
2025-08-27 15:38:40.268737172 o=- 2260263390 2260263390 IN IP4 0.0.0.0
2025-08-27 15:38:40.268738603 s=Media Server
2025-08-27 15:38:40.268739950 c=IN IP4 0.0.0.0
2025-08-27 15:38:40.268741212 t=0 0
2025-08-27 15:38:40.268742562 a=control:*
2025-08-27 15:38:40.268744059 a=packetization-supported:DH
2025-08-27 15:38:40.268745515 a=rtppayload-supported:DH
2025-08-27 15:38:40.268746931 a=range:npt=now-
2025-08-27 15:38:40.268748475 a=x-packetization-supported:IV
2025-08-27 15:38:40.268749958 a=x-rtppayload-supported:IV
2025-08-27 15:38:40.268751356 m=video 0 RTP/AVP 96
2025-08-27 15:38:40.268752793 a=control:trackID=0
2025-08-27 15:38:40.268754257 a=framerate:15.000000
2025-08-27 15:38:40.268755722 a=rtpmap:96 H264/90000
2025-08-27 15:38:40.268758067 a=fmtp:96 packetization-mode=1;profile-level-id=4D0032;sprop-parameter-sets=Z00AMukAUAHjQgAAB9IAAOqcCAA=,aOqPIAA=
2025-08-27 15:38:40.268759270 a=recvonly
2025-08-27 15:38:40.268760629 m=audio 0 RTP/AVP 8
2025-08-27 15:38:40.268762073 a=control:trackID=1
2025-08-27 15:38:40.268763511 a=rtpmap:8 PCMA/8000
2025-08-27 15:38:40.268764678 a=recvonly
2025-08-27 15:38:40.268765917 m=audio 0 RTP/AVP 8
2025-08-27 15:38:40.268767265 a=control:trackID=5
2025-08-27 15:38:40.268768610 a=rtpmap:8 PCMA/8000
2025-08-27 15:38:40.268769904 a=sendonly
2025-08-27 15:38:40.268771040
2025-08-27 15:38:40.269014438 16:38:40.268 DBG [exec] run pipe args=["/usr/lib/ffmpeg/7.0/bin/ffmpeg","-hide_banner","-v","error","-readrate_initial_burst","0.001","-re","-i","http://192.168.0.101:8123/api/tts_proxy/GA7tVW_wsR-crYhuuuXKGw.mp3","-c:a","pcm_mulaw","-ar:a","8000","-ac:a","1","-vn","-f","wav","-"]
2025-08-27 15:38:40.539253774 16:38:40.538 DBG [exec] run pipe launch=269.842713ms
2025-08-27 15:38:40.539257748 16:38:40.538 TRC [rtsp] client request:
2025-08-27 15:38:40.539260263 TEARDOWN rtsp://192.168.0.105:554/cam/realmonitor?channel=1&subtype=0/ RTSP/1.0
2025-08-27 15:38:40.539261642 CSeq: 3
2025-08-27 15:38:40.539265491 Authorization: Digest username="admin", realm="Login to Z17454CF93BE3", nonce="a4fd9e8beed93659bcbde662e82df30c", uri="rtsp://192.168.0.105:554/cam/realmonitor?channel=1&subtype=0/", response="ce7803074c04cdc7ca9aa21d93e87a15"
2025-08-27 15:38:40.539266860
2025-08-27 15:38:40.539268180
2025-08-27 15:38:40.539273632 16:38:40.539 DBG [exec] run pipe args=["/usr/lib/ffmpeg/7.0/bin/ffmpeg","-hide_banner","-v","error","-fflags","nobuffer","-flags","low_delay","-timeout","5000000","-user_agent","go2rtc/ffmpeg","-rtsp_flags","prefer_tcp","-i","rtsp://127.0.0.1:8554/doorbell_2way?audio&source=ffmpeg:doorbell_2way%23audio%3Dpcma","-c:a","pcm_alaw","-ar:a","8000","-ac:a","1","-vn","-f","wav","-"]
2025-08-27 15:38:40.550140724 16:38:40.550 TRC [rtsp] server request:
2025-08-27 15:38:40.550145649 OPTIONS rtsp://127.0.0.1:8554/doorbell_2way?audio&source=ffmpeg:doorbell_2way%23audio%3Dpcma RTSP/1.0
2025-08-27 15:38:40.550147417 Cseq: 1
2025-08-27 15:38:40.550149447 User-Agent: go2rtc/ffmpeg
2025-08-27 15:38:40.550150693
2025-08-27 15:38:40.550151909
2025-08-27 15:38:40.550622821 16:38:40.550 TRC [rtsp] server response:
2025-08-27 15:38:40.550625728 RTSP/1.0 200 OK
2025-08-27 15:38:40.550627906 Public: OPTIONS, SETUP, TEARDOWN, DESCRIBE, PLAY, PAUSE, ANNOUNCE, RECORD
2025-08-27 15:38:40.550629400 Cseq: 1
2025-08-27 15:38:40.550630808
2025-08-27 15:38:40.550632096
2025-08-27 15:38:40.550633715 16:38:40.550 TRC [rtsp] server request:
2025-08-27 15:38:40.550636144 DESCRIBE rtsp://127.0.0.1:8554/doorbell_2way?audio&source=ffmpeg:doorbell_2way%23audio%3Dpcma RTSP/1.0
2025-08-27 15:38:40.550637704 Accept: application/sdp
2025-08-27 15:38:40.550639012 Cseq: 2
2025-08-27 15:38:40.550640584 User-Agent: go2rtc/ffmpeg
2025-08-27 15:38:40.550642124
2025-08-27 15:38:40.550643363
2025-08-27 15:38:40.550645347 16:38:40.550 DBG [rtsp] new consumer stream=doorbell_2way
2025-08-27 15:38:40.550647360 16:38:40.550 TRC [streams] check cons=0 media=audio, sendonly, ANY
2025-08-27 15:38:40.557493309 16:38:40.557 TRC [rtsp] client request:
2025-08-27 15:38:40.557496485 DESCRIBE rtsp://192.168.0.105:554/cam/realmonitor?channel=1&subtype=0 RTSP/1.0
2025-08-27 15:38:40.557497805 Require: www.onvif.org/ver20/backchannel
2025-08-27 15:38:40.557499251 User-Agent: go2rtc/1.9.9
2025-08-27 15:38:40.557500661 CSeq: 1
2025-08-27 15:38:40.557502189 Accept: application/sdp
2025-08-27 15:38:40.557503443
2025-08-27 15:38:40.557504645
2025-08-27 15:38:40.566020627 16:38:40.565 TRC [rtsp] client response:
2025-08-27 15:38:40.566024777 RTSP/1.0 401 Unauthorized
2025-08-27 15:38:40.566026233 Cseq: 1
2025-08-27 15:38:40.566029048 Www-Authenticate: Digest realm="Login to Z17454CF93BE3", nonce="2f6eeba5aff6a681fe27266734fd57e7"
2025-08-27 15:38:40.566030308
2025-08-27 15:38:40.566031236
2025-08-27 15:38:40.566032428 16:38:40.565 TRC [rtsp] client request:
2025-08-27 15:38:40.566033852 DESCRIBE rtsp://192.168.0.105:554/cam/realmonitor?channel=1&subtype=0 RTSP/1.0
2025-08-27 15:38:40.566034916 User-Agent: go2rtc/1.9.9
2025-08-27 15:38:40.566035857 CSeq: 2
2025-08-27 15:38:40.566038276 Authorization: Digest username="admin", realm="Login to Z17454CF93BE3", nonce="2f6eeba5aff6a681fe27266734fd57e7", uri="rtsp://192.168.0.105:554/cam/realmonitor?channel=1&subtype=0", response="e33478ec90d9020c4fc849c16a5b6f22"
2025-08-27 15:38:40.566039297 Accept: application/sdp
2025-08-27 15:38:40.566040437 Require: www.onvif.org/ver20/backchannel
2025-08-27 15:38:40.566041322
2025-08-27 15:38:40.566042204
2025-08-27 15:38:40.616203692 16:38:40.615 TRC [rtsp] client response:
2025-08-27 15:38:40.616207341 RTSP/1.0 200 OK
2025-08-27 15:38:40.616208607 Cseq: 2
2025-08-27 15:38:40.616210361 X-Accept-Dynamic-Rate: 1
2025-08-27 15:38:40.616212611 Content-Base: rtsp://192.168.0.105:554/cam/realmonitor?channel=1&subtype=0/
2025-08-27 15:38:40.616214240 Cache-Control: must-revalidate
2025-08-27 15:38:40.616215674 Content-Length: 606
2025-08-27 15:38:40.616217266 Content-Type: application/sdp
2025-08-27 15:38:40.616225068
2025-08-27 15:38:40.616226458 v=0
2025-08-27 15:38:40.616227925 o=- 2260263390 2260263390 IN IP4 0.0.0.0
2025-08-27 15:38:40.616229266 s=Media Server
2025-08-27 15:38:40.616230536 c=IN IP4 0.0.0.0
2025-08-27 15:38:40.616231683 t=0 0
2025-08-27 15:38:40.616233067 a=control:*
2025-08-27 15:38:40.616234601 a=packetization-supported:DH
2025-08-27 15:38:40.616236009 a=rtppayload-supported:DH
2025-08-27 15:38:40.616237321 a=range:npt=now-
2025-08-27 15:38:40.616238667 a=x-packetization-supported:IV
2025-08-27 15:38:40.616240083 a=x-rtppayload-supported:IV
2025-08-27 15:38:40.616241375 m=video 0 RTP/AVP 96
2025-08-27 15:38:40.616242780 a=control:trackID=0
2025-08-27 15:38:40.616244026 a=framerate:15.000000
2025-08-27 15:38:40.616245448 a=rtpmap:96 H264/90000
2025-08-27 15:38:40.616248132 a=fmtp:96 packetization-mode=1;profile-level-id=4D0032;sprop-parameter-sets=Z00AMukAUAHjQgAAB9IAAOqcCAA=,aOqPIAA=
2025-08-27 15:38:40.616249468 a=recvonly
2025-08-27 15:38:40.616250867 m=audio 0 RTP/AVP 8
2025-08-27 15:38:40.616252323 a=control:trackID=1
2025-08-27 15:38:40.616253800 a=rtpmap:8 PCMA/8000
2025-08-27 15:38:40.616255009 a=recvonly
2025-08-27 15:38:40.616256392 m=audio 0 RTP/AVP 8
2025-08-27 15:38:40.616257706 a=control:trackID=5
2025-08-27 15:38:40.616259142 a=rtpmap:8 PCMA/8000
2025-08-27 15:38:40.616260355 a=sendonly
2025-08-27 15:38:40.616261472
2025-08-27 15:38:40.616263385 16:38:40.615 TRC [streams] check cons=0 prod=0 media=video, recvonly, H264
2025-08-27 15:38:40.616265165 16:38:40.615 TRC [streams] check cons=0 prod=0 media=audio, recvonly, PCMA/8000
2025-08-27 15:38:40.616266818 16:38:40.615 TRC [streams] match cons=0 <= prod=0
2025-08-27 15:38:40.616268293 16:38:40.615 TRC [rtsp] client request:
2025-08-27 15:38:40.616270483 SETUP rtsp://192.168.0.105:554/cam/realmonitor?channel=1&subtype=0/trackID=1 RTSP/1.0
2025-08-27 15:38:40.616272113 Transport: RTP/AVP/TCP;unicast;interleaved=2-3
2025-08-27 15:38:40.616273358 CSeq: 3
2025-08-27 15:38:40.616277019 Authorization: Digest username="admin", realm="Login to Z17454CF93BE3", nonce="2f6eeba5aff6a681fe27266734fd57e7", uri="rtsp://192.168.0.105:554/cam/realmonitor?channel=1&subtype=0/trackID=1", response="4f0af3586b90bad0802b942de99507bc"
2025-08-27 15:38:40.616278480
2025-08-27 15:38:40.616279662
2025-08-27 15:38:40.650782412 16:38:40.650 TRC [rtsp] client response:
2025-08-27 15:38:40.650786076 RTSP/1.0 200 OK
2025-08-27 15:38:40.650787489 Cseq: 3
2025-08-27 15:38:40.650789286 Session: 8327012494412;timeout=60
2025-08-27 15:38:40.650791496 Transport: RTP/AVP/TCP;unicast;interleaved=2-3;ssrc=1D20AED4
2025-08-27 15:38:40.650793286 X-Dynamic-Rate: 1
2025-08-27 15:38:40.650794703
2025-08-27 15:38:40.650796076
2025-08-27 15:38:40.650817486 16:38:40.650 TRC [streams] skip stop none producer
2025-08-27 15:38:40.650828460 16:38:40.650 DBG [streams] start producer url=rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=0#backchannel=1
2025-08-27 15:38:40.651076950 16:38:40.650 TRC [rtsp] server response:
2025-08-27 15:38:40.651079811 RTSP/1.0 200 OK
2025-08-27 15:38:40.651081242 Cseq: 2
2025-08-27 15:38:40.651082771 Content-Length: 148
2025-08-27 15:38:40.651084052 Content-Type: application/sdp
2025-08-27 15:38:40.651085255
2025-08-27 15:38:40.651086577 v=0
2025-08-27 15:38:40.651087964 o=- 1 1 IN IP4 0.0.0.0
2025-08-27 15:38:40.651089313 s=go2rtc/1.9.9
2025-08-27 15:38:40.651090626 c=IN IP4 0.0.0.0
2025-08-27 15:38:40.651092052 t=0 0
2025-08-27 15:38:40.651093834 m=audio 0 RTP/AVP 96
2025-08-27 15:38:40.651095135 a=rtpmap:96 PCMA/8000
2025-08-27 15:38:40.651096432 a=recvonly
2025-08-27 15:38:40.651097904 a=control:trackID=0
2025-08-27 15:38:40.651099186
2025-08-27 15:38:40.651100876 16:38:40.650 TRC [rtsp] client request:
2025-08-27 15:38:40.651103002 PLAY rtsp://192.168.0.105:554/cam/realmonitor?channel=1&subtype=0/ RTSP/1.0
2025-08-27 15:38:40.651104367 CSeq: 4
2025-08-27 15:38:40.651108055 Authorization: Digest username="admin", realm="Login to Z17454CF93BE3", nonce="2f6eeba5aff6a681fe27266734fd57e7", uri="rtsp://192.168.0.105:554/cam/realmonitor?channel=1&subtype=0/", response="4affd99113f95adda4441836525c2345"
2025-08-27 15:38:40.651109620 Session: 8327012494412
2025-08-27 15:38:40.651110934
2025-08-27 15:38:40.651112200
2025-08-27 15:38:40.651520220 16:38:40.651 TRC [rtsp] server request:
2025-08-27 15:38:40.651524415 SETUP rtsp://127.0.0.1:8554/doorbell_2way?audio&source=ffmpeg:doorbell_2way%23audio%3Dpcma/trackID=0 RTSP/1.0
2025-08-27 15:38:40.651526430 Transport: RTP/AVP/TCP;unicast;interleaved=0-1
2025-08-27 15:38:40.651528038 Cseq: 3
2025-08-27 15:38:40.651529879 User-Agent: go2rtc/ffmpeg
2025-08-27 15:38:40.651531288
2025-08-27 15:38:40.651532762
2025-08-27 15:38:40.651549692 16:38:40.651 TRC [rtsp] server response:
2025-08-27 15:38:40.651551401 RTSP/1.0 200 OK
2025-08-27 15:38:40.651553300 Transport: RTP/AVP/TCP;unicast;interleaved=0-1
2025-08-27 15:38:40.651554719 Cseq: 3
2025-08-27 15:38:40.651556426 Session: 90510585;timeout=60
2025-08-27 15:38:40.651557741
2025-08-27 15:38:40.651559271
2025-08-27 15:38:40.651917839 16:38:40.651 TRC [rtsp] server request:
2025-08-27 15:38:40.651922458 PLAY rtsp://127.0.0.1:8554/doorbell_2way?audio&source=ffmpeg:doorbell_2way%23audio%3Dpcma RTSP/1.0
2025-08-27 15:38:40.651924393 Session: 90510585
2025-08-27 15:38:40.651925952 Range: npt=0.000-
2025-08-27 15:38:40.651927276 Cseq: 4
2025-08-27 15:38:40.651928721 User-Agent: go2rtc/ffmpeg
2025-08-27 15:38:40.651930060
2025-08-27 15:38:40.651931518
2025-08-27 15:38:40.651948515 16:38:40.651 TRC [rtsp] server response:
2025-08-27 15:38:40.651950147 RTSP/1.0 200 OK
2025-08-27 15:38:40.651951475 Cseq: 4
2025-08-27 15:38:40.651952936 Session: 90510585
2025-08-27 15:38:40.651954253
2025-08-27 15:38:40.651955536
2025-08-27 15:38:40.666842080 16:38:40.666 TRC [rtsp] client response:
2025-08-27 15:38:40.666846344 RTSP/1.0 200 OK
2025-08-27 15:38:40.666848017 Cseq: 4
2025-08-27 15:38:40.666849733 Session: 8327012494412
2025-08-27 15:38:40.666851534 Rtp-Info: url=trackID=1;seq=40196;rtptime=133236364
2025-08-27 15:38:40.666852734
2025-08-27 15:38:40.666853867
2025-08-27 15:38:40.738493358 16:38:40.738 DBG [exec] run pipe launch=199.251872ms
2025-08-27 15:38:40.739642472 16:38:40.739 DBG [rtsp] handle error=EOF
2025-08-27 15:38:40.739876025 16:38:40.739 DBG [streams] stop producer url=rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=0#backchannel=1
2025-08-27 15:38:40.739878939 16:38:40.739 TRC [rtsp] client request:
2025-08-27 15:38:40.739881015 TEARDOWN rtsp://192.168.0.105:554/cam/realmonitor?channel=1&subtype=0/ RTSP/1.0
2025-08-27 15:38:40.739882583 CSeq: 5
2025-08-27 15:38:40.739885853 Authorization: Digest username="admin", realm="Login to Z17454CF93BE3", nonce="2f6eeba5aff6a681fe27266734fd57e7", uri="rtsp://192.168.0.105:554/cam/realmonitor?channel=1&subtype=0/", response="34017e36d090d7a568204ba38ac24adc"
2025-08-27 15:38:40.739887314 Session: 8327012494412
2025-08-27 15:38:40.739888444
2025-08-27 15:38:40.739889486
2025-08-27 15:38:40.739891091 16:38:40.739 TRC [streams] skip stop none producer
2025-08-27 15:38:40.741213452 16:38:40.739 TRC [streams] stop reconnect url=rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=0#backchannel=1
2025-08-27 15:38:40.741217138 16:38:40.739 DBG [rtsp] disconnect stream=doorbell_2way
2025-08-27 15:38:49.422190454 16:38:49.422 TRC [rtsp] server request:
2025-08-27 15:38:49.422200193 OPTIONS rtsp://127.0.0.1:8554/doorbell_detect RTSP/1.0
2025-08-27 15:38:49.422205003 Cseq: 64
2025-08-27 15:38:49.422209650 User-Agent: FFmpeg Frigate/0.16.0-c2f8de9
2025-08-27 15:38:49.422213496 Session: 89406035
2025-08-27 15:38:49.422217139
2025-08-27 15:38:49.422220371
2025-08-27 15:38:49.422782788 16:38:49.422 TRC [rtsp] server response:
2025-08-27 15:38:49.422788109 RTSP/1.0 200 OK
2025-08-27 15:38:49.422791271 Cseq: 64
2025-08-27 15:38:49.422794424 Session: 89406035
2025-08-27 15:38:49.422797670
2025-08-27 15:38:49.422800724
2025-08-27 15:38:49.872944770 16:38:49.871 TRC [rtsp] server request:
2025-08-27 15:38:49.872954133 OPTIONS rtsp://127.0.0.1:8554/doorbell_full?video&audio RTSP/1.0
2025-08-27 15:38:49.872958706 Cseq: 65
2025-08-27 15:38:49.872963339 User-Agent: FFmpeg Frigate/0.16.0-c2f8de9
2025-08-27 15:38:49.872967288 Session: 24288796
2025-08-27 15:38:49.872970759
2025-08-27 15:38:49.872974047
2025-08-27 15:38:49.872978949 16:38:49.872 TRC [rtsp] server response:
2025-08-27 15:38:49.872983359 RTSP/1.0 200 OK
2025-08-27 15:38:49.872986614 Cseq: 65
2025-08-27 15:38:49.872990456 Session: 56639432
2025-08-27 15:38:49.872994118
2025-08-27 15:38:49.872997743
2025-08-27 15:38:53.468094156 16:38:53.467 TRC [api] GET /api/streams 127.0.0.1:36040
I don't like this part:
2025-08-27 15:38:40.269014438 16:38:40.268 DBG [exec] run pipe args=["/usr/lib/ffmpeg/7.0/bin/ffmpeg","-hide_banner","-v","error","-readrate_initial_burst","0.001","-re","-i","http://192.168.0.101:8123/api/tts_proxy/GA7tVW_wsR-crYhuuuXKGw.mp3","-c:a","pcm_mulaw","-ar:a","8000","-ac:a","1","-vn","-f","wav","-"]
2025-08-27 15:38:40.539253774 16:38:40.538 DBG [exec] run pipe launch=269.842713ms
2025-08-27 15:38:40.539257748 16:38:40.538 TRC [rtsp] client request:
2025-08-27 15:38:40.539260263 TEARDOWN rtsp://192.168.0.105:554/cam/realmonitor?channel=1&subtype=0/ RTSP/1.0
2025-08-27 15:38:40.539261642 CSeq: 3
2025-08-27 15:38:40.539265491 Authorization: Digest username="admin", realm="Login to Z17454CF93BE3", nonce="a4fd9e8beed93659bcbde662e82df30c", uri="rtsp://192.168.0.105:554/cam/realmonitor?channel=1&subtype=0/", response="ce7803074c04cdc7ca9aa21d93e87a15"
Looks like go2rtc run ffmpeg for transcoding MP3 from HA to PCMA. And immediately closes the connection to the camera. It doesn't like something.
- You can add separate stream with only rtsp link to your camera (remove ffmpeg for audio transcoding). So logs will be cleaner.
- You can increase log level to trace for all modules. Maybe there will be something useful.
Thank you, i really appreciate your help with this. I know very little about streaming video/audio.
I added custom_components.webrtc: debug along with changes below and ran another test with the direct rtsp stream as suggested. Same problem, but i'm unable to find the debug webrtc component logs. Have included go2rtc logs below.
Looking at it, it still seems to be setting the source to ffmpeg. Please let me know if there is more information I can collect from somewhere
go2rtc config (in frigate)
note: other streams in previous post still exist, this is in addition
go2rtc:
log:
level: "trace"
streams:
doorbell_talk:
- rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=0#backchannel=1
webrtc entity
media_player:
- platform: webrtc
name: Doorbell Talk
stream: doorbell_talk
audio: pcmu/8000
logs
2025-08-29 09:16:26.711267762 10:16:26.711 TRC [rtsp] server request:
2025-08-29 09:16:26.711272341 OPTIONS rtsp://127.0.0.1:8554/doorbell_detect RTSP/1.0
2025-08-29 09:16:26.711273843 Cseq: 2040
2025-08-29 09:16:26.711275734 User-Agent: FFmpeg Frigate/0.16.0-c2f8de9
2025-08-29 09:16:26.711277256 Session: 06805816
2025-08-29 09:16:26.711278549
2025-08-29 09:16:26.711280042
2025-08-29 09:16:26.711338679 10:16:26.711 TRC [rtsp] server response:
2025-08-29 09:16:26.711340839 RTSP/1.0 200 OK
2025-08-29 09:16:26.711341920 Cseq: 2040
2025-08-29 09:16:26.711343321 Session: 06805816
2025-08-29 09:16:26.711344525
2025-08-29 09:16:26.711345710
2025-08-29 09:16:28.272977016 10:16:28.272 TRC [api] GET /api/streams?src=doorbell_talk 172.30.32.1:36316
2025-08-29 09:16:28.273566790 10:16:28.273 TRC [api] GET /api/streams?src=doorbell_2way 172.30.32.1:36328
2025-08-29 09:16:34.946326818 10:16:34.946 TRC [rtsp] server request:
2025-08-29 09:16:34.946340262 OPTIONS rtsp://127.0.0.1:8554/doorbell_full?video&audio RTSP/1.0
2025-08-29 09:16:34.946345190 Cseq: 2043
2025-08-29 09:16:34.946352127 User-Agent: FFmpeg Frigate/0.16.0-c2f8de9
2025-08-29 09:16:34.946357338 Session: 19945550
2025-08-29 09:16:34.946385637
2025-08-29 09:16:34.946390314
2025-08-29 09:16:34.946481247 10:16:34.946 TRC [rtsp] server response:
2025-08-29 09:16:34.946487188 RTSP/1.0 200 OK
2025-08-29 09:16:34.946491869 Cseq: 2043
2025-08-29 09:16:34.946495927 Session: 83113994
2025-08-29 09:16:34.946500890
2025-08-29 09:16:34.946505157
2025-08-29 09:16:36.971270160 10:16:36.971 TRC [api] GET /api/streams 127.0.0.1:50932
2025-08-29 09:16:43.700177258 10:16:43.699 TRC [api] POST /api/streams?dst=doorbell_talk&src=ffmpeg:http://192.168.0.101:8123/api/tts_proxy/a1xuLYlWg7UXaCUkLoel0w.mp3%23audio%3Dpcmu/8000%23input%3Dfile 172.30.32.1:43646
2025-08-29 09:16:43.710989262 10:16:43.710 TRC [rtsp] client request:
2025-08-29 09:16:43.711000678 DESCRIBE rtsp://192.168.0.105:554/cam/realmonitor?channel=1&subtype=0 RTSP/1.0
2025-08-29 09:16:43.711005071 CSeq: 1
2025-08-29 09:16:43.711010074 Accept: application/sdp
2025-08-29 09:16:43.711015262 Require: www.onvif.org/ver20/backchannel
2025-08-29 09:16:43.711019933 User-Agent: go2rtc/1.9.9
2025-08-29 09:16:43.711023588
2025-08-29 09:16:43.711027229
2025-08-29 09:16:43.718128588 10:16:43.718 TRC [rtsp] client response:
2025-08-29 09:16:43.718137709 RTSP/1.0 401 Unauthorized
2025-08-29 09:16:43.718144723 Www-Authenticate: Digest realm="Login to Z17454CF93BE3", nonce="4648a9dc44fc07f2e126cfea95d5e67a"
2025-08-29 09:16:43.718148677 Cseq: 1
2025-08-29 09:16:43.718152382
2025-08-29 09:16:43.718156011
2025-08-29 09:16:43.718216178 10:16:43.718 TRC [rtsp] client request:
2025-08-29 09:16:43.718223062 DESCRIBE rtsp://192.168.0.105:554/cam/realmonitor?channel=1&subtype=0 RTSP/1.0
2025-08-29 09:16:43.718234729 Authorization: Digest username="admin", realm="Login to Z17454CF93BE3", nonce="4648a9dc44fc07f2e126cfea95d5e67a", uri="rtsp://192.168.0.105:554/cam/realmonitor?channel=1&subtype=0", response="8776c6713d12c5b7cd1e687d74f5baee"
2025-08-29 09:16:43.718239694 Accept: application/sdp
2025-08-29 09:16:43.718244757 Require: www.onvif.org/ver20/backchannel
2025-08-29 09:16:43.718249364 User-Agent: go2rtc/1.9.9
2025-08-29 09:16:43.718253536 CSeq: 2
2025-08-29 09:16:43.718257354
2025-08-29 09:16:43.718261222
2025-08-29 09:16:43.807300083 10:16:43.807 TRC [rtsp] client response:
2025-08-29 09:16:43.807307311 RTSP/1.0 200 OK
2025-08-29 09:16:43.807311769 X-Accept-Dynamic-Rate: 1
2025-08-29 09:16:43.807317255 Content-Base: rtsp://192.168.0.105:554/cam/realmonitor?channel=1&subtype=0/
2025-08-29 09:16:43.807320917 Cache-Control: must-revalidate
2025-08-29 09:16:43.807324409 Content-Length: 606
2025-08-29 09:16:43.807328330 Content-Type: application/sdp
2025-08-29 09:16:43.807331435 Cseq: 2
2025-08-29 09:16:43.807334302
2025-08-29 09:16:43.807337413 v=0
2025-08-29 09:16:43.807341333 o=- 2260353899 2260353899 IN IP4 0.0.0.0
2025-08-29 09:16:43.807344714 s=Media Server
2025-08-29 09:16:43.807347951 c=IN IP4 0.0.0.0
2025-08-29 09:16:43.807351023 t=0 0
2025-08-29 09:16:43.807354474 a=control:*
2025-08-29 09:16:43.807358352 a=packetization-supported:DH
2025-08-29 09:16:43.807361717 a=rtppayload-supported:DH
2025-08-29 09:16:43.807365461 a=range:npt=now-
2025-08-29 09:16:43.807369586 a=x-packetization-supported:IV
2025-08-29 09:16:43.807373563 a=x-rtppayload-supported:IV
2025-08-29 09:16:43.807377118 m=video 0 RTP/AVP 96
2025-08-29 09:16:43.807380973 a=control:trackID=0
2025-08-29 09:16:43.807385401 a=framerate:15.000000
2025-08-29 09:16:43.807389733 a=rtpmap:96 H264/90000
2025-08-29 09:16:43.807396719 a=fmtp:96 packetization-mode=1;profile-level-id=4D0032;sprop-parameter-sets=Z00AMukAUAHjQgAAB9IAAOqcCAA=,aOqPIAA=
2025-08-29 09:16:43.807399648 a=recvonly
2025-08-29 09:16:43.807404563 m=audio 0 RTP/AVP 8
2025-08-29 09:16:43.807409063 a=control:trackID=1
2025-08-29 09:16:43.807412185 a=rtpmap:8 PCMA/8000
2025-08-29 09:16:43.807415038 a=recvonly
2025-08-29 09:16:43.807418195 m=audio 0 RTP/AVP 8
2025-08-29 09:16:43.807421195 a=control:trackID=5
2025-08-29 09:16:43.807424381 a=rtpmap:8 PCMA/8000
2025-08-29 09:16:43.807427614 a=sendonly
2025-08-29 09:16:43.807430182
2025-08-29 09:16:43.807673796 10:16:43.807 DBG [exec] run pipe args=["/usr/lib/ffmpeg/7.0/bin/ffmpeg","-hide_banner","-v","error","-readrate_initial_burst","0.001","-re","-i","http://192.168.0.101:8123/api/tts_proxy/a1xuLYlWg7UXaCUkLoel0w.mp3","-c:a","pcm_mulaw","-ar:a","8000","-ac:a","1","-vn","-f","wav","-"]
2025-08-29 09:16:43.973882356 10:16:43.973 DBG [exec] run pipe launch=166.271251ms
2025-08-29 09:16:43.974557382 10:16:43.973 TRC [rtsp] client request:
2025-08-29 09:16:43.974561719 TEARDOWN rtsp://192.168.0.105:554/cam/realmonitor?channel=1&subtype=0/ RTSP/1.0
2025-08-29 09:16:43.974563568 CSeq: 3
2025-08-29 09:16:43.974568005 Authorization: Digest username="admin", realm="Login to Z17454CF93BE3", nonce="4648a9dc44fc07f2e126cfea95d5e67a", uri="rtsp://192.168.0.105:554/cam/realmonitor?channel=1&subtype=0/", response="0aad8dd5274afcaf6939202a2b8cd47a"
2025-08-29 09:16:43.974569539
2025-08-29 09:16:43.974571046
I have similar assertion issue for a long time. It looks like WebRTC is not fully initialized after HASS restart. The WebRTC telegram services do not work and produce the same assertion, and media player entities are not available. When I open the HASS page with WebRTC card and let it play the video stream, then all media players are initialized and error is gone. Tried to fix this by calling webrtc.reload service after startup but it did not help