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

Rtmp/hls video to do a broadcast. #361

Open
dragossido opened this issue Sep 5, 2022 · 3 comments
Open

Rtmp/hls video to do a broadcast. #361

dragossido opened this issue Sep 5, 2022 · 3 comments

Comments

@dragossido
Copy link

I have developed a server nginx with rtmp and hls.
with this is possible to broadcast a show live.
now I want to put the video that is streaming inside the network frame

to achieve something like that
https://glitch.com/~djtotygee

the only closer to what I want to do is this https://github.com/networked-aframe/networked-aframe/blob/master/examples/basic-video.html
but this activate the cam of everybody I think... instead I want that they watch the live and they can talk each oters

@vincentfretin
Copy link
Member

The basic-video.html example is indeed basic, it asks for your webcam right away when you load the page. The audio-with-camera.html example for the janus adapter is a little bit better, you can chose after connecting if you want to enable the webcam or streaming the scene.
We don't currently have a component to achieve what you're looking for, it's been a long overdue, see the comments in #320
I'll work on a new component or making changes to networked-video-source to support a shared plane (not attached to an avatar) with a video coming from a RTCPeerConnection soon for a new project I'm working on. I'll keep in mind your hls use case when developing the component. But I won't necessary fix all the issues with the easyrtc adapter I linked in the issue, I'm using the janus adapter.

@vincentfretin
Copy link
Member

You can look at the hls integration in hubs for some pointers.
The video track and audio track are handled separately. The video track is attached to a muted video tag and used as a video texture on a plane to avoid issue with video not autoplaying, the audio track is attached to the THREE.AudioContext and some resume logic are implemented to enable playing the audio from all sources.

This is very similar to the combination of the networked-video-source component and the networked-audio-source component. The resume handling of THREE.AudioContext is currently not done in naf core, it would be interesting to have that in the core, maybe in the networked-scene component.

Relevant parts in the hubs code:
https://github.com/mozilla/hubs/blob/82ccf973ef555870ef4959395f5d1ffdc05d3518/src/components/media-loader.js#L415-L455

https://github.com/mozilla/hubs/blob/82ccf973ef555870ef4959395f5d1ffdc05d3518/src/components/media-video.js#L410-L455

https://github.com/mozilla/hubs/blob/ec265eaf33113abd3f070e7fb6dcdc7dccc1fea6/src/systems/audio-system.js#L259-L277

@dragossido
Copy link
Author

The basic-video.html example is indeed basic, it asks for your webcam right away when you load the page. The audio-with-camera.html example for the janus adapter is a little bit better, you can chose after connecting if you want to enable the webcam or streaming the scene. We don't currently have a component to achieve what you're looking for, it's been a long overdue, see the comments in #320 I'll work on a new component or making changes to networked-video-source to support a shared plane (not attached to an avatar) with a video coming from a RTCPeerConnection soon for a new project I'm working on. I'll keep in mind your hls use case when developing the component. But I won't necessary fix all the issues with the easyrtc adapter I linked in the issue, I'm using the janus adapter.

thank you very much. i think we meet on slack.

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