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

RTMP termination connection too soon #888

Open
dmorn opened this issue Oct 4, 2024 · 1 comment
Open

RTMP termination connection too soon #888

dmorn opened this issue Oct 4, 2024 · 1 comment
Assignees

Comments

@dmorn
Copy link

dmorn commented Oct 4, 2024

RTMP client handler is closing the RTMP connection when no demand is done within a deadline, see https://github.com/membraneframework/membrane_rtmp_plugin/blob/49cf4a09ec80dd62478acd60b1822dcd2063fb8b/lib/membrane_rtmp_plugin/rtmp_server/client_handler.ex#L125.

The default deadline when using a standalone server is 5 seconds (https://github.com/membraneframework/membrane_rtmp_plugin/blob/49cf4a09ec80dd62478acd60b1822dcd2063fb8b/lib/membrane_rtmp_plugin/rtmp_server.ex#L14), whereas if you use the Source providing a url (hence using the embedded server), the deadline becomes 100ms, see https://github.com/membraneframework/membrane_rtmp_plugin/blob/49cf4a09ec80dd62478acd60b1822dcd2063fb8b/lib/membrane_rtmp_plugin/rtmp/source/source.ex#L97.

It is by mistake? For us, it is too low. We would suggest to either add an option to let the user configure that or use the 5s there as well.

@varsill
Copy link
Contributor

varsill commented Oct 9, 2024

Hello! Sure, I believe that for the our scenarios where builtin server was used100ms were enough - could you describe how does your RTMP client behaves, that it requires longer client timeout?
As of the solution, I think that both making client_timeout a source option and setting it to 5s by default at the same time is the way to go there.
As a workaround, you can surely start standalone RTMP server with desired client_timeout.

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

No branches or pull requests

2 participants