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

Simulcast with ffmpeg #63

Open
nums opened this issue Jul 20, 2022 · 3 comments
Open

Simulcast with ffmpeg #63

nums opened this issue Jul 20, 2022 · 3 comments

Comments

@nums
Copy link

nums commented Jul 20, 2022

is it possible to publish a stream from ffmpeg with multiple bitrates and have simulcast available on this stream ?

@davidzhao
Copy link
Member

yeah it should be possible. the CLI will just need a few param changes to make it accept multiple streams. any suggestions what would be a good syntax to pass in?

If you are interested in creating a PR for it, I'd take it!

@nums
Copy link
Author

nums commented Jul 29, 2022

Thanks for your feedback.

I'm going to work on a PR, to orient myself, from what I've seen, it would be necessary to add the management of the resolutions at the level of the script /cmd/livekit-cli/join.go.
It would be necessary to add a parameter of resolution with the publishSocket function and interprete "resolution" parameter from the cli (a bit like it was done here: /pkg/loadtester/loadtester.go at the PublishVideoTrack level)

We would therefore have the possibility of managing the resolution in this way:

$ livekit-cli join-room --room yourroom --identity bot \
  --publish --resolution high unix:/tmp/myvideo_high.h264.sock \
  --publish --resolution medium unix:/tmp/myvideo_medium.h264.sock \
  --publish --resolution low unix:/tmp/myvideo_low.h264.sock \
  --publish unix:/tmp/myvideo.opus.sock

@davidzhao
Copy link
Member

sounds good! feel free to find me in our slack community's #dev channel if you'd like to discuss in real time.

I think --publish should be used to identify unique tracks. It would be great to do something like this instead:

--publish-simulcast 1280x720=h264:///tmp/myvideo_high.sock,640x360=h264:///tmp/myvideo_medium.sock,320x180=h264:///tmp/myvideo_low.sock

here we would pass in multiple parameters of the track separated with comma. it'd be possible to also set track name this way, i.e. name=var

#67 adds the ability to use TCP sockets too, and there is a proposed improvement to the syntax, which I've adopted here

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

2 participants