Issue Membrane Upgrade to 1.1 (from 0.12.9)
I'm trying to go from Membrane 0.12.9 to 1.1 and hitting a wall. I followed the upgrade guide[1], and everything compiles successfully. Though I'm getting the following error in my pipeline:
I looked at the code in
lib/membrane/rtp/header_generator.ex:71
and it seems to assume that buffer.pts won't be nil. Though you can see in the last message it's definitely nil, which I think it what's causing the error to throw.
More details in thread.
Any advice would be appreciated.
[1] https://hexdocs.pm/membrane_core/1.1.0/v1-0-0.html10 Replies
Part of this upgrade involved going from Ratio 2.0 to 3.0, and that required changing this code:
to this code:
Which we then use here:
I've also got this error related to the LiveAudioMixer
This one has me stumped as well.
What version of
:membrane_audio_mix_plugin
and :membrane_rtp_plugin
do you use?I think I’m on latest for everything but the file plugin. I don’t explicitly pull in :membrane_rtp_plugin
Membrane
{:membrane_audio_mix_plugin, "~> 0.16.1"},
{:membrane_fake_plugin, "~> 0.11"},
{:membrane_ffmpeg_swresample_plugin, "~> 0.20.2"},
{:membrane_file_plugin, "~> 0.16"},
{:membrane_mp3_mad_plugin, "~> 0.18.3"},
{:membrane_mp4_plugin, "~> 0.34.0"},
{:membrane_opus_plugin, "~> 0.20.2"},
{:membrane_raw_audio_format, "~> 0.12.0"},
{:membrane_rtc_engine, "~> 0.22.0"},
{:membrane_rtc_engine_webrtc, "~> 0.8.0"},
{:membrane_tee_plugin, "~> 0.12"},
membrane_rtp_plugin ~> 0.24.1, which is a child dependency of membrane_rtc_engine ~> 0.22.0 and of membrane_rtc_engine_webrtc ~> 0.8.0
19:50:34.069 [error] <0.4709.0>/{:endpoint, "recorder"}/:mixer Error occured in Membrane Element:
<- does this log come from your custom endpoint? Maybe you lack some parser before mixer 🤔
Parser added before mixer may solve your problem, as it will set timestamps in the streamThis is my setup:
Would you add a parser after the opus decoder in the handle_pad_added callback?
put
|> child(:audio_parser, %Membrane.RawAudioParser{overwrite_pts?: true})
between opus decoder and audio mixer
And add {:membrane_raw_audio_parser_plugin, "~> 0.4.0"}
to deps
Let me know if it changed anything
I added the new element as part of the spec defined in handle_pad_added. However, I get the error above.
Change
|> child(:audio_parser, %Membrane.RawAudioParser{overwrite_pts?: true})
on |> child({:audio_parser, track_id}, %Membrane.RawAudioParser{overwrite_pts?: true})
Thank you. That got us past that error, but now I see a new one:
Change
... |> via_in(:input) |> get_child(:mixer)
in spec on ... |> via_in(Pad.ref(:input, track_id)) |> get_child(:mixer)
or eventually ... |> via_in(Pad.ref(:input, inspect(track_id))) |> get_child(:mixer)