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

Pass stream to application in custom virtual host #1623

Closed
Nikita-Goncharov opened this issue May 22, 2024 Discussed in #1622 · 2 comments
Closed

Pass stream to application in custom virtual host #1623

Nikita-Goncharov opened this issue May 22, 2024 Discussed in #1622 · 2 comments

Comments

@Nikita-Goncharov
Copy link

Discussed in #1622

Originally posted by Nikita-Goncharov May 22, 2024
Hello, I have a problem with sharing stream on custom virtualhost.
I created virtual host using API, there is data:

[
    {
        "name": "vhost",
        "host": {
            "names": [
                "*"
            ]
        },

        "signedPolicy": {
            "enables": {
                "providers": "rtmp,webrtc,srt",
                "publishers": "webrtc,llhls"
            },
            "policyQueryKeyName": "policy",
            "secretKey": "aKq#1kj",
            "signatureQueryKeyName": "signature"
        },
        "origins": {
            "origin": [
                {
                    "location": "/custom_app/stream",
                    "pass": {
                        "scheme": "rtsp",
                        "urls": {
                            "url": [
                                "rtsp.server:8554/ca-01"
                            ]
                        }
                    }
                }
            ]
        }
    }
]

Then I create app on this host(in url i add "vhost", not "default"):

[
    {
        "name": "custom_app",
        "type": "live",
        "outputProfiles": {
            "outputProfile": [
                {
                    "name": "stream",
                    "outputStreamName": "stream",
                    "encodes": {
                        "audios": [
                            {
                                "name": "opus",
                                "codec": "opus",
                                "samplerate": 48000,
                                "bitrate": 128000,
                                "channel": 2,
                                "bypassIfMatch": {
                                    "codec": "eq"
                                }
                            },
                            {
                                "name": "aac",
                                "codec": "aac",
                                "samplerate": 48000,
                                "bitrate": 128000,
                                "channel": 2,
                                "bypassIfMatch": {
                                    "codec": "eq"
                                }
                            }
                        ],
                        "videos": [
                            {
                                "name": "bypass_video",
                                "bypass": true
                            }
                        ]
                    }
                }
            ]
        },
        "providers": {
            "ovt": {},
            "rtmp": {},
            "rtspPull": {},
            "srt": {},
            "webrtc": {}
        },
        "publishers": {
            "llhls": {},
            "ovt": {},
            "webrtc": {}
        }
    }
]

For testing i use OBS studio and when i try pass stream:
rtmp://192.168.0.106:1935/custom_app
secret key: stream

In docker container i receive that log:
2024-05-20 13:14:56 [2024-05-20 10:14:56.486] E [SPRTMP-t1935:28] RTMPProvider | rtmp_stream.cpp:442 | Could not find application: #default#custom_app
2024-05-20 13:14:56 [2024-05-20 10:14:56.486] E [SPRTMP-t1935:28] RTMPProvider | rtmp_stream.cpp:341 | SendAmfCreateStreamResult Fail

I understand that the server is trying to find custom_app on the default vhost, but I don't know what to do, maybe I have set the wrong configuration for vhost/app?
Please, help me.

@getroot
Copy link
Member

getroot commented May 22, 2024

Please stop posting repeatedly. Everyone is very busy, so they are unable to respond right now. Someone will answer when they have time. This is a violation of the community rules.

@getroot getroot closed this as completed May 22, 2024
@getroot
Copy link
Member

getroot commented May 22, 2024

The issues board is where known bugs are posted.

Please refer to the notice below.
#1071

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants