Media Push is a service provided by Agora for audio or video live streaming. You can use this service to subscribe to the media stream in a channel, transcode the media stream, and then push it to the CDN through standard protocols (such as RTMP) in order to enrich the distribution channels of live streaming.
You can push a media stream to the CDN in the following ways:
Agora Media Push provides different push methods according to the live streaming scenarios:
Applicable scenarios | Media Push methods |
---|---|
Single host | Media push without transcoding. The Media Push service pushes a media stream to the CDN without transcoding. |
Multiple hosts | Media push with transcoding. The Media Push service combines multiple media streams into one stream and pushes it to the CDN to ensure the synchronization of the live streaming of multiple hosts seen by audience members. |
You can use Media Push RESTful APIs to push media streams of multiple hosts to CDN with transcoding through standard protocols (RTMP, RTMPS).
The transcoding process is essentially a codec process, which is used to synthesize multiple media streams into one stream. You can customize the following fields when use Media Push with transcoding:
Custom configuration | RESTful API field | SDK API filed |
---|---|---|
Sample rate for audio | transcodeOptions.audioOptions.sampleRate | LiveTranscoding.audioSampleRate |
Bitrate for audio | transcodeOptions.audioOptions.bitrate | LiveTranscoding.audioBitrate |
Codec for audio | transcodeOptions.audioOptions.codecProfile | LiveTranscoding.audioCodecProfile |
Number of audio channels | transcodeOptions.audioOptions.audioChannels | LiveTranscoding.audioChannels |
Bitrate for video | transcodeOptions.videoOptions.bitrate | LiveTranscoding.videoBitrate |
Frame rate for video | transcodeOptions.videoOptions.frameRate | LiveTranscoding.videoFramerate |
GOP (Group of Pictures) for video | transcodeOptions.videoOptions.gop | LiveTranscoding.videoGop |
Codec for video | transcodeOptions.videoOptions.codec | LiveTranscoding.videoCodecType |
Encoding scheme for video | transcodeOptions.videoOptions.codecProfile | LiveTranscoding.videoCodecProfile |
SEI information carried in the output video. Used to send user-defined SEI information to CDN. | transcodeOptions.videoOptions.seiOptions | LiveTranscoding.metadata |
Video screen size and background color of each host | transcodeOptions.videoOptions.canvas | |
Video screen layout for multiple hosts | transcodeOptions.videoOptions.layout | LiveTranscoding.transcodingUsers |
Watermark for video | transcodeOptions.videoOptions.layout.ImageView element | LiveTranscoding.watermark |
You can use Media Push RESTful APIs to push a media stream of single host to CDN without transcoding through standard protocols (RTMP, RTMPS).