Streams hang when using ffmpeg
Hello,
I have experienced hangs in the streams when using ffmpeg. Once the hang has occurred, it is not possible to view the output stream anymore until go2rtc is restarted.
I think the problem occurs when the client disconnects, because in the stream info of the hanged stream the producers still have data even though that there are no clients. There's no error in the logs, but I have noticed that the "[streams] stop reconnect url=..." log doesn't appear for the stream that hangs when the user disconnects.
I have been testing this with a grid of cameras. This doesn't happen in version 1.9.2. The problem occurs in version 1.9.3 and above.
I ran into the same problem when running ffmpeg v5 on the lastest version of go2rtc. Upgrading to v7 has mostly fixed it. I had the issue happen once since but stable for almost a week now.
I think this is a known issue and there are similar issues to it.
Not sure if related, but running on hasOS, latest go2rtp I see this when doing HomeKit proxying after e.g. 8 seconds: