datarhei / restreamer

The Restreamer is a complete streaming server solution for self-hosting. It has a visually appealing user interface and no ongoing license costs. Upload your live stream to YouTube, Twitch, Facebook, Vimeo, or other streaming solutions like Wowza. Receive video data from OBS and publish it with the RTMP and SRT server.
https://docs.datarhei.com/restreamer/
Apache License 2.0
3.79k stars 438 forks source link

Stream stops and restarts after a few seconds #514

Open behappiness opened 1 year ago

behappiness commented 1 year ago

Describe the bug After streaming for more than 4 hours, one of our output streams (Twitch) stopped for a few seconds and then restarted. We were pushing 15000Mbit/s to the server, the outputs: Youtube - passthrough, Twitch - 6500Mbit/s (medium preset). The cpu was at 50% pretty much all the time.

To Reproduce We were having these kind of issues from time to time, the stream stops for a few seconds after streaming for long hours and then restarts, not sure how we can reproduce the problem.

Expected behavior The stream shouldn't stop because this way we lose a fair amount of viewers on every disconnect.

Log Full log ts=2023-02-20T20:37:44Z level=INFO component="Process" msg="Scheduling restart in 1m0s" id="restreamer-ui:ingest:585a2a36-4db0-4a80-9d7f-4d51e026c2d3_snapshot" ts=2023-02-20T20:38:44Z level=INFO component="Process" msg="Starting" id="restreamer-ui:ingest:585a2a36-4db0-4a80-9d7f-4d51e026c2d3_snapshot" ts=2023-02-20T20:38:44Z level=INFO component="Process" msg="Started" id="restreamer-ui:ingest:585a2a36-4db0-4a80-9d7f-4d51e026c2d3_snapshot" ts=2023-02-20T20:38:45Z level=INFO component="Process" msg="Stopped" id="restreamer-ui:ingest:585a2a36-4db0-4a80-9d7f-4d51e026c2d3_snapshot" ts=2023-02-20T20:38:45Z level=INFO component="Process" msg="Scheduling restart in 1m0s" id="restreamer-ui:ingest:585a2a36-4db0-4a80-9d7f-4d51e026c2d3_snapshot" ts=2023-02-20T20:39:45Z level=INFO component="Process" msg="Starting" id="restreamer-ui:ingest:585a2a36-4db0-4a80-9d7f-4d51e026c2d3_snapshot" ts=2023-02-20T20:39:45Z level=INFO component="Process" msg="Started" id="restreamer-ui:ingest:585a2a36-4db0-4a80-9d7f-4d51e026c2d3_snapshot" ts=2023-02-20T20:39:45Z level=INFO component="Process" msg="Stopped" id="restreamer-ui:ingest:585a2a36-4db0-4a80-9d7f-4d51e026c2d3_snapshot" ts=2023-02-20T20:39:45Z level=INFO component="Process" msg="Scheduling restart in 1m0s" id="restreamer-ui:ingest:585a2a36-4db0-4a80-9d7f-4d51e026c2d3_snapshot" ts=2023-02-20T20:40:37Z level=INFO component="Process" msg="Stopped" id="restreamer-ui:egress:twitch:ff4de271-a162-4d89-9d45-e1d4601be49f" ts=2023-02-20T20:40:37Z level=INFO component="Process" msg="Scheduling restart in 15s" id="restreamer-ui:egress:twitch:ff4de271-a162-4d89-9d45-e1d4601be49f" ts=2023-02-20T20:40:38Z level=INFO component="RTMP/S" action="STOP" address=":1935" client="127.0.0.1:44104" path="/585a2a36-4db0-4a80-9d7f-4d51e026c2d3.stream" who="PLAY" ts=2023-02-20T20:40:45Z level=INFO component="Process" msg="Starting" id="restreamer-ui:ingest:585a2a36-4db0-4a80-9d7f-4d51e026c2d3_snapshot" ts=2023-02-20T20:40:45Z level=INFO component="Process" msg="Started" id="restreamer-ui:ingest:585a2a36-4db0-4a80-9d7f-4d51e026c2d3_snapshot" ts=2023-02-20T20:40:45Z level=INFO component="Process" msg="Stopped" id="restreamer-ui:ingest:585a2a36-4db0-4a80-9d7f-4d51e026c2d3_snapshot" ts=2023-02-20T20:40:45Z level=INFO component="Process" msg="Scheduling restart in 1m0s" id="restreamer-ui:ingest:585a2a36-4db0-4a80-9d7f-4d51e026c2d3_snapshot" ts=2023-02-20T20:40:52Z level=INFO component="Process" msg="Starting" id="restreamer-ui:egress:twitch:ff4de271-a162-4d89-9d45-e1d4601be49f" ts=2023-02-20T20:40:52Z level=INFO component="Process" msg="Started" id="restreamer-ui:egress:twitch:ff4de271-a162-4d89-9d45-e1d4601be49f" ts=2023-02-20T20:40:53Z level=INFO component="RTMP/S" action="START" address=":1935" client="127.0.0.1:34238" path="/585a2a36-4db0-4a80-9d7f-4d51e026c2d3.stream" who="PLAY" ts=2023-02-20T20:41:45Z level=INFO component="Process" msg="Starting" id="restreamer-ui:ingest:585a2a36-4db0-4a80-9d7f-4d51e026c2d3_snapshot" ts=2023-02-20T20:41:45Z level=INFO component="Process" msg="Started" id="restreamer-ui:ingest:585a2a36-4db0-4a80-9d7f-4d51e026c2d3_snapshot" ts=2023-02-20T20:41:45Z level=INFO component="Process" msg="Stopped" id="restreamer-ui:ingest:585a2a36-4db0-4a80-9d7f-4d51e026c2d3_snapshot" ts=2023-02-20T20:41:45Z level=INFO component="Process" msg="Scheduling restart in 1m0s" id="restreamer-ui:ingest:585a2a36-4db0-4a80-9d7f-4d51e026c2d3_snapshot" ts=2023-02-20T20:42:19Z level=INFO component="Session" msg="Closed" extra="[10.20.1.0] Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36" id="RyfnFbt9S4K3trAgn5ZwpC" location="/memfs/585a2a36-4db0-4a80-9d7f-4d51e026c2d3_output_0.m3u8" peer="10.20.1.31" reference="585a2a36-4db0-4a80-9d7f-4d51e026c2d3_output_0" rx_bitrate_kbit=0 rx_bytes=0 rx_maxbitrate_kbit=0 tx_bitrate_kbit=0 tx_bytes=316182386 tx_maxbitrate_kbit=41038.453125 type="hls" ts=2023-02-20T20:42:45Z level=INFO component="Process" msg="Starting" id="restreamer-ui:ingest:585a2a36-4db0-4a80-9d7f-4d51e026c2d3_snapshot" ts=2023-02-20T20:42:45Z level=INFO component="Process" msg="Started" id="restreamer-ui:ingest:585a2a36-4db0-4a80-9d7f-4d51e026c2d3_snapshot" ts=2023-02-20T20:42:45Z level=INFO component="Process" msg="Stopped" id="restreamer-ui:ingest:585a2a36-4db0-4a80-9d7f-4d51e026c2d3_snapshot" ts=2023-02-20T20:42:45Z level=INFO component="Process" msg="Scheduling restart in 1m0s" id="restreamer-ui:ingest:585a2a36-4db0-4a80-9d7f-4d51e026c2d3_snapshot" ts=2023-02-20T20:43:35Z level=INFO component="Session" msg="Active" extra="[10.20.1.0] Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36" id="eCyTbHPYXZSrpRVmBmPya6" location="/memfs/585a2a36-4db0-4a80-9d7f-4d51e026c2d3_output_0.m3u8" peer="10.20.1.31" reference="585a2a36-4db0-4a80-9d7f-4d51e026c2d3_output_0" type="hls" ts=2023-02-20T20:43:45Z level=INFO component="Process" msg="Starting" id="restreamer-ui:ingest:585a2a36-4db0-4a80-9d7f-4d51e026c2d3_snapshot" ts=2023-02-20T20:43:45Z level=INFO component="Process" msg="Started" id="restreamer-ui:ingest:585a2a36-4db0-4a80-9d7f-4d51e026c2d3_snapshot" ts=2023-02-20T20:43:46Z level=INFO component="Process" msg="Stopped" id="restreamer-ui:ingest:585a2a36-4db0-4a80-9d7f-4d51e026c2d3_snapshot"

Desktop:

Business inquiries

We would like this issue resolved as we use this software in e-sports live streams. We will get in touch in a few days to discuss some improvements and bug fixes.

jstabenow commented 1 year ago

Hey @behappiness Please attach the required process reports. After that, we will take a closer look.

Many thanks.

behappiness commented 1 year ago

Hi,

Here's the file: report.txt

Thank you for the fast response.

jstabenow commented 1 year ago

I need a report from a running process to see more about the stream properties. Then we will do a load test.

behappiness commented 1 year ago

We've put it up for an hour or so. 1hr_streaming_report.txt

I appreciate your help with this.

jstabenow commented 1 year ago

Perfect, thanks. I'll test it this weekend.

jstabenow commented 1 year ago

Hey @behappiness I have not found any bugs so far. My streams have been running stable at 16 Mbit for weeks.

Has the bug reappeared? If so, we need a demo stream to analyze.

behappiness commented 1 year ago

Hi, Sorry for the late reply. Yes we encountered the problem again, our twitch channel was offline for 10-15 seconds, here are the logs that you asked for. This is was downloaded right after the problem. (The settings stayed the same as before.)

The first half of the stopped stream: https://www.twitch.tv/videos/1769772438?filter=archives&sort=time The second half: https://www.twitch.tv/videos/1770030594?filter=archives&sort=time

2023_03_19_log_core.log 2023_03_19_report.txt

behappiness commented 1 year ago

Hi, We had another issue, this time the stream stopped 6 times, in just a few minutes.

Here are the files: image report_0327.txt core_0327.log docker-compose.txt