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

Creating and Viewing Live stream #6

Closed
alsiPanda opened this issue Oct 2, 2020 · 4 comments
Closed

Creating and Viewing Live stream #6

alsiPanda opened this issue Oct 2, 2020 · 4 comments

Comments

@alsiPanda
Copy link

Hi @shivanshtalwar0 , this isn't an issue with the repository itself. Need some help with setting up a live stream. I have tried using your video room example and modified it to create a live stream on one end and view it on another, so two files. Sadly on the viewing end, for some reason the stream isn't getting listed. So I tried using the pre existing Janus Id 1 stream. Still didn't work, no video received.
I think this might be due to my lack of understanding on streaming using webrtc and Janus. Can you please give me a rough idea on how to proceed. Any help would be much appreciated. Thank you.

@shivanshtalwar0
Copy link
Collaborator

So as far as i understand from your comment you are trying to setup live streaming using video room this is definitely possible but for this to work you need to rtp forward your publisher's video stream to a pre created streaming endpoint on specific open port and then on recieving end you need to attach streaming plugin list down stream and start viewing stream, this approach is highly scalable but requires some effort from your side on application itself

Other way of doing the same thing (not scalable) , can be using video room alone instead of attaching viewing end with publisher role you only need to attach user with subscriber role with some random username from your side and when all webrtc related stuff is complete you will start receiving video
But know this i haven't tested either of those functionality with janus client yet and i am planning full streaming support in next release until then i encourage you to play with as you see fit

@shivanshtalwar0
Copy link
Collaborator

You should consider reading streaming documentation in full https://janus.conf.meetecho.com/docs/streaming.html

@alsiPanda
Copy link
Author

@shivanshtalwar0 by using video room, I meant the example code in your repository. I have switched out the videoroom plugin for streaming plugin. And the various messages being sent via plugin have been changed to the streaming related messages. I have made two copies of the videoroom.dart file. One for broadcasting and other for viewing the stream. Is such an approach viable ?

@shivanshtalwar0
Copy link
Collaborator

Unfortunately janus streaming plugin in itself cannot stream video without supplying streaming source like ondemand,live (video file stream sent to streaming plugin using gstreamer or ffmpeg)
In your case you need to attach video room plugin then join as publisher then using video room rtp forward feature forward your stream to pre created streaming mountpoint set up to accept rtp stream at pre configured port for both video and audio then on recieving end you need to attach streaming plugin list down streams send watch request along with jsep answer negotiated by jsep offer sent by janus server when you first sent watch request only then video published on video room will be visible to streaming plugin viewer and as of now that's the only way to achieve what you are trying

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