-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
OME allows multiple incoming RTMP streams for the same stream key #1749
Comments
There is a setting just for this scenario. VirtualHost -> Application -> Providers -> RTMP -> BlockDuplicateStreamName = true
Or you could use AdmissionWebhooks and check if the stream exists before allowing it. |
It looks like BlockDuplicateStreamName defaults to true already - so perhaps it isn't working? https://airensoft.gitbook.io/ovenmediaengine/live-source/rtmp#rtmp-live-stream |
That would be a regression. Haven't tested for that in a bit... Got logs? |
What logs specifically? I can grab them
…On Fri, Dec 13, 2024 at 23:10 bchah ***@***.***> wrote:
That would be a regression. Haven't tested for that in a bit... Got logs?
—
Reply to this email directly, view it on GitHub
<#1749 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABV4BWPZN7SPZC47UDQ3XC32FOVTHAVCNFSM6AAAAABTRCS6JGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNBSG43TQMRVGQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
This might be an issue that occurs when streams with the same name are attempted to be created almost simultaneously. |
Yes. We've temporarily added a check in our admission webhook, to reject an rtmp connection if it's already live, which has solved the flickering the player sees and flickering between offline and online states, but now we see that OME triggers the "offline" webhook after the "publish" rtmp webhook is rejected, even though the stream is live, so our player shows a "stream is offline" message even though OBS will remain connected, hope that was clear, it's a bit hard to describe this issue, please let me know if it isn't clear or if you need more details! |
I think I know what the problem's cause is. |
There’s one policy we need to discuss.
Currently, a closing event is sent even if the control server rejects the stream. A closing event is also triggered if the stream name is duplicated or if other errors occur (e.g., an encoder-related error). Regarding your recent report — "OME triggers 'offline' when the control server rejects it" — this is likely because a closing event was sent for a stream with the same name. So the question is:
I recall someone mentioning that the number of opening and closing events must always match. |
I noticed that behavior, I'm not sure if it makes sense to call the "close" event if the "open" was rejected, but if that's a behavior that must be kept to keep the number of "open" and "close" events equal, I think a new field in the "close" webhook payload could be added, to indicate the reason it's closing (for example: "client disconnected" or "admissionwebhook rejected") |
I believe that what is never opened cannot be closed. However as suggested, a close with a status like "AdmissionWebhook Rejected" would be OK. It would nice to see responses as an enum rather than matching strings, but that's more of a feature request than a bug discussion 🥸 |
We will improve this so that close is not sent for rejected streams. |
Describe the bug
The streaming server allows multiple incoming RTMP streams for the same stream key, leading to unexpected playback behavior. This manifests as:
To Reproduce
Set Server.xml as follows:
https://gist.github.com/hernanrz/872ed292c5281293bcdf9d0c46129559
Use two separate instances of OBS (I tested with separate machines on the same network) to simultaneously stream to the server using the same stream key.
See error:
Expected behavior
Logs
These logs are from our live instance of OME, we believe network issues on users' end cause OBS to reconnect, or attempt to reconnect, while the stream is already live in OME.
Server
The text was updated successfully, but these errors were encountered: