Skip to content
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

Possible incompatibility with rtmpsink/gstreamer with additional parameters #1177

Closed
1 of 13 tasks
Sharrnah opened this issue Oct 5, 2022 · 3 comments · Fixed by #1405
Closed
1 of 13 tasks

Possible incompatibility with rtmpsink/gstreamer with additional parameters #1177

Sharrnah opened this issue Oct 5, 2022 · 3 comments · Fixed by #1405
Labels
bug Something isn't working rtmp

Comments

@Sharrnah
Copy link

Sharrnah commented Oct 5, 2022

Which version are you using?

v0.20.0

Which operating system are you using?

  • Linux amd64 standard
  • Linux amd64 Docker
  • Linux arm64 standard
  • Linux arm64 Docker
  • Linux arm7 standard
  • Linux arm7 Docker
  • Linux arm6 standard
  • Linux arm6 Docker
  • Windows amd64 standard
  • Windows amd64 Docker (WSL backend)
  • macOS amd64 standard
  • macOS amd64 Docker
  • Other (please describe)

Describe the issue

I tried streaming to rtsp-simple-server using neko (https://github.com/m1k1o/neko/) which results in the following error in log:

2022/10/05 00:06:29 INF [RTMP] [conn 10.42.3.1:32451] opened
2022/10/05 00:06:29 INF [RTMP] [conn 10.42.3.1:32451] closed (parse "'rtmp://<ip>:21935/neko?user=publish&pass=abcdef": first path segment in URL cannot contain colon)

neko uses this kind of parameter to rtmpsink rtmpsink location='rtmp://xyz-server live=1'

so it appears that it somehow receives the ' character at the start of the string. Not sure about the parameter live=1 but apparently it is needed for other rtmp servers like youtube. So it can't easily be removed.

streaming from neko to an nginx rtmp server works without error.

So there is some kind of incompatibility. I am just not sure where exactly.
But maybe rtsp-simple-server can be made more hardened against these issues since NGINX does not have any issue like that?

see also the issue i opened at neko:
m1k1o/neko#205

Describe how to replicate the issue

  1. start the server
  2. run a neko room
  3. publish with neko (https://github.com/m1k1o/neko/)
  4. see the mentioned error in log of rtsp-simple-server

Did you attach the server logs?

yes

Did you attach a network dump?

no

@aler9 aler9 added bug Something isn't working rtmp labels Jan 8, 2023
@aler9
Copy link
Member

aler9 commented Jan 22, 2023

Hello, this is obviously a bug hidden inside Neko or GStreamer, since tcURL has a leading apex, visible from network dumps:

    RTMP Header
        00.. .... = Format: 0
        ..00 0011 = Chunk Stream ID: 3
        Timestamp: 0
        Body size: 91
        Type ID: AMF0 Command (0x14)
        Stream ID: 0
    RTMP Body
        String 'connect'
            AMF0 type: String (0x02)
            String length: 7
            String: connect
        Number 1
            AMF0 type: Number (0x00)
            Number: 1
        Object (3 items)
            AMF0 type: Object (0x03)
            Property 'app' String 'my'
                Name: app
                    String length: 3
                    String: app
                String 'my'
                    AMF0 type: String (0x02)
                    String length: 2
                    String: my
            Property 'type' String 'nonprivate'
                Name: type
                    String length: 4
                    String: type
                String 'nonprivate'
                    AMF0 type: String (0x02)
                    String length: 10
                    String: nonprivate
            Property 'tcUrl' String ''rtmp://192.168.3.218:1935/my'
                Name: tcUrl
                    String length: 5
                    String: tcUrl
                String ''rtmp://192.168.3.218:1935/my'
                    AMF0 type: String (0x02)
                    String length: 29
                    String: 'rtmp://192.168.3.218:1935/my
            End Of Object Marker

Nonetheless since neither Neko developers nor GStreamer developers want to address the issue, and the Neko pipeline works with nginx-rtmp and other RTMP servers, it's probably better to edit the server in order to fix the issue from server side.

@aler9
Copy link
Member

aler9 commented Jan 26, 2023

added in v0.21.2

@github-actions
Copy link
Contributor

This issue is being locked automatically because it has been closed for more than 6 months.
Please open a new issue in case you encounter a similar problem.

@github-actions github-actions bot locked and limited conversation to collaborators Jul 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working rtmp
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants