binbat / live777

A very simple, high performance, edge WebRTC SFU
https://live777.pages.dev
Mozilla Public License 2.0
191 stars 22 forks source link

how to test this project with the broswer? #14

Closed snow2flying closed 11 months ago

snow2flying commented 1 year ago

I got the server run with: cargo run --release and client with: gst-launch-1.0 videotestsrc ! videoconvert ! vp9enc ! rtpvp9pay ! whipsink whip-endpoint="http://localhost:3000/whip/777" Both the server and client work pretty well. But when I open the browser I do not know what should I fill in the blank form in the following picture: image

a-wing commented 1 year ago

Fill id: 777 after, click WebRTC Start WHEP

The API is /whip/:id and /whep/:id, input form need :id

snow2flying commented 1 year ago

Thanks, it works well. Is there any plan for desktop native clients? or is it possible I can test it with gstreamer ?

a-wing commented 1 year ago

Is there any plan for desktop native clients?

No, But maybe in the future, we will make some cli tools: rtp-to-whip and whep-to-rtp

In the future, Your can use:

ffmpeg -> rtp-to-whip -> live777 -> whep-to-rtp -> ffplay

or is it possible I can test it with gstreamer ?

Yes, Your can gstreamer test. But, need gstreamer plugin: webrtchttp on gst-plugins-rs

snow2flying commented 1 year ago

Yes, Your can gstreamer test. But, need gstreamer plugin: webrtchttp on gst-plugins-rs

I do have gst-plugins-rs on my laptop.

This is my producer: gst-launch-1.0 videotestsrc ! videoconvert ! x264enc ! rtph264pay ! whipsink whip-endpoint="http://localhost:3000/whip/777"

This is my consumer: gst-launch-1.0 -v whepsrc whep-endpoint="http://localhost:3000/whep/777" video-caps = "application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)33" audio-caps = "application/x-rtp, media=(string)audio, encoding-name=(string)AAC, payload=(int)96" ! rtpmp2tdepay ! decodebin name=d d. ! queue ! autovideosink sync=false d. ! queue ! audioconvert ! autoaudiosink sync=false

This consumer works but it can not play the video or audio. Do you have your own gstreamer command that works? if you have can you share it with me? Thanks

a-wing commented 1 year ago

I try use whepsrc plugin on gst-plugins-rs

But, This plugin isn't working. I don't recv any messages

I think this is a problem at gst-plugins-rs#414

snow2flying commented 12 months ago

Thanks for your update. If you get it work later, please update it here. Thanks for you guys' hard work. This project is really awesome.

a-wing commented 12 months ago

Hey, We already add cli tools rtp2whip and whep2rtp

Welcome to try use canary version

snow2flying commented 11 months ago

any update about whep with gstreamer?

a-wing commented 11 months ago

Yes, I test this example, It's work

https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/414#note_2091819

I rename rtp2whip and whep2rtp #21

We're releasesed new version, I think whipinto and whepfrom already stable

https://github.com/binbat/live777/releases/tag/v0.2.0

Also update readme 87972c4f975c73988ca92fd470bdeebb752759ab