-
Notifications
You must be signed in to change notification settings - Fork 401
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
RTMP push from OpenIPC web camera doesn't work (while RTSP pull with the same audio/video settings works) #1354
Comments
|
@AlexxIT, do you mean that the problem is on the camera side? |
I don't know. RTMP awful legacy protocol. I need to check what inside this message. |
This message is encoded in AMF0 format and represents the following data: "connect"
1.0
{
"app": "",
"type": "nonprivate",
"supportsGoAway": true,
"swfUrl": "rtmp://192.168.0.2",
"tcUrl": "rtmp://192.168.0.2"
} Decoding details
|
@AlexxIT, the error is being raised in https://github.com/AlexxIT/go2rtc/blob/master/pkg/rtmp/server.go:120 if c.App == "" {
return fmt.Errorf("rtmp: read command %x", b)
} The Later in https://github.com/AlexxIT/go2rtc/blob/master/internal/rtmp/rtmp.go:80 you use the app name as a stream name: stream := streams.Get(rtmpConn.App)
if stream == nil {
return errors.New("stream not found: " + rtmpConn.App)
} I tried to push the video to |
"stream not found" - because you haven't created it manually in config: |
My go2rtc.yaml is: streams:
mystream
rtmp:
listen: ":1935"
log:
level: trace
api: trace
exec: trace
ngrok: trace
rtsp: trace
streams: trace
webrtc: trace I stream to I get an error:
What am I doing wrong? |
By the way, how do you create a log file, not only display the log information on the screen? |
You need ":" after stream name. YAML rules |
Thank you! Now I can see the stream in the go2rtc console. Please note, that even without It seems that the correct URL to push RTMP to is Unfortunately, the stream shows up, but does not play in the go2rtc console. The built-in player shows Please see the attached go2rtc.log. |
Try to get stream info for active stream. I can't see any codecs information for your stream in logs. |
{
"producers": [
{
"id": 16,
"format_name": "rtmp",
"protocol": "rtmp",
"remote_addr": "192.168.0.188:57012",
"bytes_recv": 22970920
}
],
"consumers": null
} |
I am using go2rtc version 1.9.4 on Debian Bookworm arm64.
Issue description
I push an RTMP stream from my camera (102.168.0.188, running OpenIPC) to go2rtc (192.168.0.2).
However, http://192.168.0.2:1984/stream.html?src=mystream shows black video player with
webrtc/offer: stream not found
message.If I stop the video pushing from the camera and configure go2rtc to pull the video from the camera via RTSP protocol, the player shows video normally.
How to replicate the issue
Files
go2rtc.yaml
go2rtc.log
The text was updated successfully, but these errors were encountered: