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 through the RESTful API or through the API provided by the Agora RTC SDK.
Agora Media Push provides different push methods according to the live streaming scenarios:
|Applicable scenarios Media Push methods||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:
|transcodeOptions.audioOptions.sampleRate||Sample rate for audio.|
|transcodeOptions.audioOptions.bitrate||Bitrate for audio.|
|transcodeOptions.audioOptions.codecProfile||Codec for audio.|
|transcodeOptions.audioOptions.audioChannels||Number of audio channels.|
|transcodeOptions.videoOptions.bitrate||Bitrate for video.|
|transcodeOptions.videoOptions.frameRate||Frame rate for video.|
|transcodeOptions.videoOptions.gop||GOP (Group of Pictures) for video.|
|transcodeOptions.videoOptions.codec||Codec for video.|
|transcodeOptions.videoOptions.codecProfile||Encoding scheme for video.|
|transcodeOptions.videoOptions.seiOptions||SEI information carried in the output video. Used to send user-defined SEI information to CDN.|
|transcodeOptions.videoOptions.canvas||Video screen size and background color of each host.|
|transcodeOptions.videoOptions.layout||Video screen layout for multiple hosts.|
|transcodeOptions.videoOptions.layout.ImageView element||Watermark for video.|
You can choose to push the media streams without transcoding in a single-host scenario.
You can use Media Push RESTful APIs to push a media stream of single host to CDN without transcoding through standard protocols (RTMP, RTMPS).