-
Notifications
You must be signed in to change notification settings - Fork 531
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WebRTC stream suddenly stops working from time to time #1461
Comments
So many childs is a big problem. Don't know yet why this can happen. |
I can provide some more details:
I can also send you the HomeAssistant card configuration in case it helps, but I believe it's pretty straightforward type: custom:webrtc-camera
url: doorbell-sub
mode: webrtc
media: video,audio |
Its related to self referencing streams i think which should be fixed in v1.9.7. After closing the stream, the rtsp consumer from ffmpeg is still present. And if there is an issue with ffmpeg, the childs are not cleaned up |
I can try upgrading to v1.9.7 and check if it happens again. I'll let you know in a few days |
@AlexxIT @seydx I've upgrade to v1.9.7 and the same thing happened again {
"producers":[
{
"id":2,
"format_name":"rtsp",
"protocol":"rtsp+tcp",
"remote_addr":"192.168.2.102:554",
"url":"rtsp://user:[email protected]:554/h264Preview_01_sub",
"sdp":"v=0\r\no=- 1731922670403090 1 IN IP4 192.168.0.3\r\ns=Session streamed by \"preview\"\r\nt=0 0\r\na=tool:BC Streaming Media v202210012022.10.01\r\na=type:broadcast\r\na=control:*\r\na=range:npt=now-\r\na=x-qt-text-nam:Session streamed by \"preview\"\r\nm=video 0 RTP/AVP 96\r\nc=IN IP4 0.0.0.0\r\nb=AS:8192\r\na=rtpmap:96 H264/90000\r\na=fmtp:96 packetization-mode=1;profile-level-id=640033;sprop-parameter-sets=Z2QAM6wVFKCgPZA=,aO48sA==\r\na=recvonly\r\na=control:track1\r\nm=audio 0 RTP/AVP 97\r\nc=IN IP4 0.0.0.0\r\nb=AS:8192\r\na=rtpmap:97 MPEG4-GENERIC/16000\r\na=fmtp:97 streamtype=5;profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3;config=1408;\r\na=recvonly\r\na=control:track2\r\nm=audio 0 RTP/AVP 8\r\na=control:track3\r\na=rtpmap:8 PCMA/8000\r\na=sendonly",
"user_agent":"go2rtc/1.9.7",
"medias":[
"video, recvonly, H264",
"audio, recvonly, MPEG4-GENERIC/16000",
"audio, sendonly, PCMA/8000"
],
"receivers":[
{
"id":3,
"codec":{
"codec_name":"h264",
"codec_type":"video",
"level":51,
"profile":"High"
},
"childs":[
21,
23,
25,
27,
29,
31,
33,
37,
41,
45,
47,
49,
51,
53,
55,
57,
59,
61,
63,
65,
67,
71,
76,
77,
81,
83,
85,
88,
91
],
"bytes":2206397467,
"packets":1960259
},
{
"id":6,
"codec":{
"codec_name":"aac",
"codec_type":"audio",
"sample_rate":16000
},
"childs":[
89
],
"bytes":361735092,
"packets":701037
}
],
"senders":[
{
"id":14,
"codec":{
"codec_name":"pcm_alaw",
"codec_type":"audio",
"sample_rate":8000
},
"parent":13,
"bytes":100000,
"packets":625
},
{
"id":35,
"codec":{
"codec_name":"pcm_alaw",
"codec_type":"audio",
"sample_rate":8000
},
"parent":34
},
{
"id":40,
"codec":{
"codec_name":"pcm_alaw",
"codec_type":"audio",
"sample_rate":8000
},
"parent":38
},
{
"id":43,
"codec":{
"codec_name":"pcm_alaw",
"codec_type":"audio",
"sample_rate":8000
},
"parent":42
},
{
"id":69,
"codec":{
"codec_name":"pcm_alaw",
"codec_type":"audio",
"sample_rate":8000
},
"parent":68
},
{
"id":75,
"codec":{
"codec_name":"pcm_alaw",
"codec_type":"audio",
"sample_rate":8000
},
"parent":72
},
{
"id":79,
"codec":{
"codec_name":"pcm_alaw",
"codec_type":"audio",
"sample_rate":8000
},
"parent":78
}
],
"bytes_recv":2601180131,
"bytes_send":100880
},
{
"id":8,
"format_name":"rtsp",
"protocol":"rtsp+tcp",
"remote_addr":"127.0.0.1:48772 forwarded 127.0.0.1:8554",
"source":"exec: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-sub?audio&source=ffmpeg:doorbell-sub%23audio%3Dopus%23audio%3Dvolume -map 0:a:0? -c:a:0 libopus -application:a:0 lowdelay -min_comp 0 -af \"volume=10\" -vn -user_agent ffmpeg/go2rtc -rtsp_transport tcp -f rtsp rtsp://127.0.0.1:8554/08ad235e02668038fe4c37b715dfb357",
"url":"rtsp://127.0.0.1:8554/doorbell-sub?audio&source=ffmpeg:doorbell-sub%23audio%3Dopus%23audio%3Dvolume",
"sdp":"v=0\r\no=- 0 0 IN IP4 127.0.0.1\r\ns=go2rtc/1.9.7\r\nc=IN IP4 127.0.0.1\r\nt=0 0\r\na=tool:libavformat 60.16.100\r\nm=audio 0 RTP/AVP 96\r\nb=AS:64\r\na=rtpmap:96 opus/48000/2\r\na=control:streamid=0\r\n",
"user_agent":"ffmpeg/go2rtc",
"medias":[
"audio, recvonly, OPUS/48000/2"
],
"receivers":[
{
"id":9,
"codec":{
"channels":2,
"codec_name":"opus",
"codec_type":"audio",
"sample_rate":48000
},
"bytes":69736,
"packets":358
}
],
"bytes_recv":74088
}
],
"consumers":[
{
"id":16,
"format_name":"rtsp",
"protocol":"rtsp+tcp",
"remote_addr":"127.0.0.1:55860",
"source":"ffmpeg:doorbell-sub#audio=opus#audio=volume",
"sdp":"v=0\r\no=- 1 1 IN IP4 0.0.0.0\r\ns=go2rtc/1.9.7\r\nc=IN IP4 0.0.0.0\r\nt=0 0\r\nm=audio 0 RTP/AVP 96\r\na=rtpmap:96 MPEG4-GENERIC/16000\r\na=fmtp:96 streamtype=5;profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3;config=1408;\r\na=control:trackID=0\r\n",
"user_agent":"go2rtc/ffmpeg",
"medias":[
"audio, sendonly, ANY"
],
"senders":[
{
"id":17,
"codec":{
"codec_name":"aac",
"codec_type":"audio",
"sample_rate":16000
},
"parent":6,
"bytes":1910748,
"packets":3703
}
],
"bytes_send":1969996
}
]
} |
can you try this one: https://github.com/seydx/go2rtc/actions/runs/11920040811 |
Sure. It took like 3 days to crash last time, so I'll let you know in a couple of days. |
Hello, I'm using go2rtc to get the stream of a Reolink Doorbell camera, and then I consume that from HomeAssistant. It works for about a week, and then it usually crashes and stops working, so I have to restart the server manually.
This is the config:
And then this is what I'm seeing in the info page of that stream:
We can probably remove HomeAssistant from the formula, because although that's what I'm using to consume the stream, if I go to the go2rtc panel, and click on
stream
it also fails to load, it keeps loading forever.It looks like the websocket connection is not responding, maybe ?
The text was updated successfully, but these errors were encountered: