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

Experimental WHIP support #107

Open
wants to merge 3 commits into
base: v3
Choose a base branch
from

Conversation

vpalmisano
Copy link
Contributor

This PR implements a basic WebRTC-HTTP ingestion protocol (WHIP) support for mediasoup demo.
Tested using https://github.com/lminiero/simple-whip-client:

  1. Visit https://127.0.0.1:3000/?info=true&roomId=test&produce=false
  2. Start the whip client:
./whip-client -u https://127.0.0.1:4443/whip/test/broadcasterId \
    -V "videotestsrc is-live=true pattern=ball ! videoconvert ! queue ! vp8enc deadline=1 ! rtpvp8pay pt=96 ssrc=2 picture-id-mode=2 ! queue ! application/x-rtp,media=video,encoding-name=VP8,payload=96" \
    -A "audiotestsrc is-live=true wave=red-noise ! audioconvert ! audioresample ! queue ! opusenc ! rtpopuspay pt=100 ssrc=1 ! queue ! application/x-rtp,media=audio,encoding-name=OPUS,payload=100"
  1. Stop the broadcaster:
curl -k -X DELETE https://127.0.0.1:4443/whip/test/broadcasterId

@ibc
Copy link
Member

ibc commented Nov 10, 2021

Thanks. I'll review this in a few days.

@mpisat
Copy link

mpisat commented Feb 5, 2023

is this going to be added?

@namnm
Copy link
Contributor

namnm commented Mar 6, 2023

bump

@mpisat
Copy link

mpisat commented Mar 7, 2023

@ArmorDarks
Copy link

Just a note, WHIP spec requires a Location header, which should point to the endpoint the client could use for PATCH and DELETE requests, and it's mandatory in OBS 30+ for WHIP integration to work. Otherwise, it will fail to start the stream.

Something like this

    res.setHeader(
      'Location',
      `https://${config.domain}:${config.https.listenPort}/whip/${req.params.roomId}/${req.params.broadcasterId}`,
    )

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

Successfully merging this pull request may close these issues.

5 participants