edit-icon download-icon

Live transcoding

Last Updated: Apr 11, 2018

A common problem during live streaming is that the push stream bit rate is set fairly high with high resolution, but the audience who have a bad connection cannot watch it. We can use the live transcoding function to convert live streams into many different bit rates to satisfy different needs under different Internet conditions.

Process

2

Configuration rules

The design logic of Alibaba Cloud live transcoding is similar to live recording, that is, to set the domain name, and any live stream of which the streaming address matches the rule is transcoded.

Transcoding template

Each transcoding template has an id. The content is a set of transcoding parameters which defines the output bit rate, resolution, and other parameters.

Alibaba Cloud provides high-quality transcoding template, which has four different resolution/bit rate combinations.

  • High-quality template: ld、sd、hd、ud

Configuration rules

The users’ streaming address is as follows:

rtmp://video-center.alivecdn.com/AppName/StreamName?vhost=a.com

Three parts of this streaming address are managed by the user: domain name (a.com), AppName, and StreamName. The user can configure certain domain name + AppName to use multiple transcoding templates. After configuration, when the user is pushing the stream, the streams that matchs this domain name and AppName are transcoded.

Example

Configure domain name as a.com, AppName as live for recording and the following streams are transcoded.

rtmp://video-center.alivecdn.com/live/StreamName?vhost=a.com

rtmp://video-center.alivecdn.com/live/xyz?vhost=a.com

The user can perform live transcoding configuration on the ApsaraVideo Live console, see live transcoding.

Transcoded stream playback address: the transcoded stream playback address is composed of the original address +_+ transcoding ID. For example, we configure transcoding templates as ld and sd ubder the domain namea.comand the AppNamelive. The corresponding streaming and playback address is:

  • Streaming address: rtmp://video-center.alivecdn.com/live/abc?vhost=a.com

  • Original playback address:

    • rtmp: rtmp://a.com/live/abc

    • httpflv: http://a.com/live/abc.flv

    • hls: http://a.com/live/abc.m3u8

  • Transcoded stream ld playback address:

    • rtmp: rtmp://a.com/live/abc_ld

    • httpflv: http://a.com/live/abc_ld.flv

    • hls: http://a.com/live/abc_ld.m3u8

  • Transcoded stream sd playback address:

    • rtmp: rtmp://a.com/live/abc_sd

    • httpflv: http://a.com/live/abc_sd.flv

    • hls: http://a.com/live/abc_sd.m3u8

For more information, see Transcoding address.

Thank you! We've received your feedback.