AlexxIT / go2rtc

Ultimate camera streaming application with support RTSP, RTMP, HTTP-FLV, WebRTC, MSE, HLS, MP4, MJPEG, HomeKit, FFmpeg, etc.
https://github.com/AlexxIT/Blog
MIT License
5.12k stars 409 forks source link

RTMP Stream Failure Post go2rtc Upgrade from 1.7.1 to 1.8.0+ #947

Closed VoidNullNil closed 5 months ago

VoidNullNil commented 8 months ago

After updating the go2rtc version from 1.7.1 to 1.8.0 or later, the RTMP stream, sourced from datarhei Restreamer, has ceased functioning. Prior to the upgrade, the configuration for the stream was working as expected. Post-upgrade, the stream no longer initiates successfully.

Current Configuration:

streams:
  corner:
  - rtmp://192.168.1.20/stream/2b3ef742-e0af-4248-8ba5-949ac7666ef0.stream

To workaround this issue, I modified the stream configuration to use ffmpeg, which allowed the stream to start. However, this adjustment led to a significant increase in CPU usage, indicating it's not a viable long-term solution.

Modified Configuration (With High CPU Usage):

streams:
  corner:
  - ffmpeg:rtmp://192.168.1.20/stream/2b3ef742-e0af-4248-8ba5-949ac7666ef0.stream

I am seeking assistance to resolve the RTMP stream failure post-upgrade and to find a solution that does not adversely affect the system's CPU performance.

Dreamoffice commented 6 months ago

Hi @VoidNullNil how is your setup of the RTMP in Restreamer? just activate the rtmp server? i m struggling with it. can t find the rtmp ip

AlexxIT commented 6 months ago

It's very strange that you got a CPU rise when using FFmpeg. You're not using transcoding. That should take a few percent of the CPU.

I almost never use the RTMP protocol. It's a decade out of date.

I'll take a look at the issue if I have some free time.

Dreamoffice commented 6 months ago

@AlexxIT you mentioned RTMP is outdated. what is the better way to get the stream from Restreamer to go2rtc? i have the advantage in Restreamer that i can get the Netatmo video very stable. but now i want to forward it to go2rtc but i don t know how??

AlexxIT commented 6 months ago

I'm not familiar with Restreamer. After a quick reading of the documentation I found nothing except RTMP. I don't mind fixing this protocol. But it's a low priority.

Dreamoffice commented 6 months ago

@AlexxIT do you have another option to get the stream from netatmo presence into go2rtc. homekit is not working good. and the kamera stream is an m3u8 stream

AlexxIT commented 6 months ago

Go2rtc support HLS source natively. But not very well.

And you always can use ffmpeg source with any supported protocol. Including HLS.

Dreamoffice commented 6 months ago

Go2rtc support HLS source natively. But not very well.

And you always can use ffmpeg source with any supported protocol. Including HLS.

hm. when i add the stream link to go2rtc http://192.168.1.220/adb9045c5d44c94ab5437636b4f1b164/live/index.m3u8 it is very laggy. ffmpeg i don t understand how to handle sorry.

AlexxIT commented 6 months ago

Answer in first message

AlexxIT commented 5 months ago

@VoidNullNil I found the problem. The implementation is different from what is in the Reolink cameras. It will be fixed in the next release.

AlexxIT commented 5 months ago

https://github.com/AlexxIT/go2rtc/releases/tag/v1.9.3