AgoraIO-Community / Agora-RTC-React

A react wrapper for Agora RTC NG SDK
MIT License
92 stars 48 forks source link

How to share the group call directly to Youtube Stream? #17

Closed kamal-hossain closed 3 years ago

kamal-hossain commented 3 years ago

I have tried to follow this example. But sadly it is telling nothing about exact instruction for Youtube stream.

I also tried to implement some of this methods on client but getting error. Not working at all.

Can anyone give me any straight forward exmple to pass the group call stream directly to Youtube stream?

EkaanshArora commented 3 years ago

@kamal-hossain you can follow these steps:

let LiveTranscoding = {} // you need to create the transcoding config
client.setLiveTranscoding(LiveTranscoding); // set the config
client.startLiveStreaming("rtmp://a.rtmp.youtube.com/livexxxxxxxxxxxxxxxx", true) // add your rtmp url for YouTube
// your stream should appear on youtube in a couple seconds if your config is correct 

// when you want to update the transcoding config
client.setLiveTranscoding(newConfig);
// when you want to stop
client.stopLiveStreaming("your RTMP URL")

For an example config you can view the doc. Make sure your remote UIDs are correct.

If you need more help, please join our community slack.