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

membrane_webrtc_plugin crashes due to dtls handshake error #895

Open
dre1080 opened this issue Oct 19, 2024 · 3 comments
Open

membrane_webrtc_plugin crashes due to dtls handshake error #895

dre1080 opened this issue Oct 19, 2024 · 3 comments

Comments

@dre1080
Copy link

dre1080 commented Oct 19, 2024

I'm trying to run a pipeline on a Nerves device and it keeps crashing with reason: {:shutdown, :handshake_error}

Pipeline:

defmodule MyApp.Pipeline do
  @moduledoc false

  use Membrane.Pipeline

  def start_link(options) do
    Membrane.Pipeline.start_link(__MODULE__, options, name: __MODULE__)
  end

  @impl true
  def handle_init(_ctx, _opts) do
    spec = [
      child(:source, %Membrane.Rpicam.Source{width: 960, height: 540, camera_open_delay: Membrane.Time.milliseconds(1000)})
      |> child(:realtimer, Membrane.Realtimer)
      |> child(:nalu_parser, %Membrane.H264.Parser{output_stream_structure: :annexb, output_alignment: :nalu})
      |> via_in(:input, options: [kind: :video])
      |> child(:webrtc, %Membrane.WebRTC.Sink{
        signaling: {:websocket, ip: :any, port: 8081},
        tracks: [:video],
        video_codec: :h264,
        ice_servers: []
      })
    ]

    {[spec: spec], %{}}
  end

  @impl true
  def handle_element_end_of_stream(:webrtc, _pad, _ctx, state) do
    {[terminate: :normal], state}
  end

  @impl true
  def handle_element_end_of_stream(_child, _pad, _ctx, state) do
    {[], state}
  end
end

Logs:
1000036858

@mat-hek
Copy link
Member

mat-hek commented Oct 21, 2024

Hi there, we haven't been able to run the WebRTC plugin on Nerves yet and unfortunately had to postpone that for now - we plan to get back to it next month. I suspect this may be a problem with elixir_webrtc - can you try running one of their demos?

cc @mickel8

@dre1080
Copy link
Author

dre1080 commented Oct 22, 2024

It's weird. My pipeline and demos work with one device (pi4) and not on the other (cm4). It gives a handshake error.

@mickel8
Copy link
Member

mickel8 commented Oct 22, 2024

Hi @dre1080, sorry but I won't be able to take a look at this this week. Maybe that can be related to elixir-webrtc/ex_dtls#31

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

3 participants