-
Notifications
You must be signed in to change notification settings - Fork 69
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
Start RTMP forwarding when RTMP source arrives #129
base: main
Are you sure you want to change the base?
Conversation
Very nice! I ran into an issue where some pipeline components crashed while the pipeline itself remained running. In this scenario, attempting to reconnect leads to |
It seems like starting RTMP forwarding in the same group as the source has messed up reconnecting... I am getting this error now: [error] GenServer #PID<0.2169.0> terminating
** (MatchError) no match of right hand side value: %{input: [{Membrane.Pad, :input, #Reference<0.740859990.2745171970.64194>}]}
(membrane_mp4_plugin 0.35.2) lib/membrane_mp4/muxer/cmaf.ex:227: Membrane.MP4.Muxer.CMAF.handle_playing/2
(membrane_core 1.0.1) lib/membrane/core/callback_handler.ex:139: Membrane.Core.CallbackHandler.exec_callback/4
(membrane_core 1.0.1) lib/membrane/core/callback_handler.ex:69: Membrane.Core.CallbackHandler.exec_and_handle_callback/5
(membrane_core 1.0.1) lib/membrane/core/element/lifecycle_controller.ex:84: Membrane.Core.Element.LifecycleController.handle_playing/1
(membrane_core 1.0.1) lib/membrane/core/element.ex:249: Membrane.Core.Element.handle_info/2
(stdlib 6.1) gen_server.erl:2345: :gen_server.try_handle_info/3
(stdlib 6.1) gen_server.erl:2433: :gen_server.handle_msg/6
(stdlib 6.1) proc_lib.erl:329: :proc_lib.init_p_do_apply/3
Last message: {Membrane.Core.Message, :play, [], []} |
I don't think that's related to forwarding - been having this issue before this PR, even without any forwarding. Seems to be caused by a timeout when sending link messages between CMAF muxers and the sink. See #131 |
This fixes a ~1 second delay in audio when multistreaming starve rtmp connection if already playing allow passing stream key as app cleanup unused handle_init initialize rtmp connection before aborting
99e6157
to
f686069
Compare
I've rebased this against |
This fixes a ~1 second delay in audio when multi-streaming, tested on Twitch.
It is possible that calling
:multicast_algora
may still result in a de-sync of audio and video while forwarding. Adding a field/flag to the user/channel would allow multicasting to "Algora" when the RTMP source arrives, instead of ad-hoc like it is now.