Skip to content

Experimental WHIP support - #107

Open
vpalmisano wants to merge 5 commits into
versatica:v3from
vpalmisano:feat/server/Experimental-WHIP-support
Open

Experimental WHIP support#107
vpalmisano wants to merge 5 commits into
versatica:v3from
vpalmisano:feat/server/Experimental-WHIP-support

Conversation

@vpalmisano

Copy link
Copy Markdown
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

ibc commented Nov 10, 2021

Copy link
Copy Markdown
Member

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

@mpisat

mpisat commented Feb 5, 2023

Copy link
Copy Markdown

is this going to be added?

@namnm

namnm commented Mar 6, 2023

Copy link
Copy Markdown
Contributor

bump

@mpisat

mpisat commented Mar 7, 2023

Copy link
Copy Markdown

@ArmorDarks

Copy link
Copy Markdown

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