Live remuxing is the process of converting the original stream pushed from the live streaming site (commonly using the RTMP protocol) into different container formats in the cloud before pushing to viewers.
Live transcoding (including both video transcoding and audio transcoding) is the process of transcoding the original stream pushed from the live streaming site to streams of different codecs, resolutions, and bitrates in the cloud before pushing to viewers. This helps meet the playback needs in different network environments and on different devices.
Parameter Type | Description |
---|---|
Video codec | Supported video codecs:
|
Video profile | Supported video profiles:
|
Video encoding bitrate |
|
Video encoding frame rate |
|
Video resolution |
|
Video GOP length | Supported video GOP length range: 1-10s; recommended range: 2-4s. |
Video bitrate control method | Supported video bitrate control methods:
|
Video image rotation | The original video can be rotated clockwise by:
|
Parameter Type | Description |
---|---|
Audio codec | Supported codecs:
|
Audio sample rate | Supported sample rates (48000 and 44100 are commonly used):
|
Audio encoding bitrate | Supported bitrate range: 20-192 Kbps; commonly used bitrates include:
|
Sound channel | Supported sound channel modes:
|
Video Definition | Template Name | Video Resolution | Video Bitrate | Video Frame Rate | Video Codec |
---|---|---|---|---|---|
Smooth | 550 | Image short side (proportionally scaled) x long side (540) | 500 Kbps | 23 | H.264 |
SD | 900 | Image short side (proportionally scaled) x long side (720) | 1000 Kbps | 25 | H.264 |
HD | 2000 | Image short side (proportionally scaled) x long side (1080) | 2000 Kbps | 25 | H.264 |
Based on years of experience in audio/video encoding, intelligent scenario recognition, dynamic encoding, and three-level (CTU/line/frame) precise bitrate control model among other technologies, Tencent Video Cloud provides higher-definition streaming services at lower bitrates (30% less on average) for live streaming, on-demand content, etc.
If the live push bitrate is high and the image is complex, you can use the intelligent dynamic encoding technology and precise bitrate control model to keep a high definition at a low bitrate, ensuring that the quality of the video image watched by the viewer is the same as the original quality.
As users of various video platforms have an ever-increasing requirement for high video source definition and smooth watch experience, in the current live streaming industry, 1080p resolution and 3-10 Mbps bitrate have gradually become the mainstream configuration, and the bandwidth costs are taking a large part in the total video platform costs. In this case, the reduction of the video bitrate can effectively reduce the bandwidth costs.
Example:
Suppose you held a live session at 3 Mbps for 4 hours with 200 viewers. The codec is H.264 and top speed codec transcoding is not used. The peak bandwidth is 600 Mbps. The bandwidth cost for this live session is 600 x 0.2118 = 127.08 USD.
Therefore, top speed codec transcoding can effectively reduce the platform bandwidth costs while delivering a better watch experience.
The parameters of top speed codec transcoding are configured basically in the same way as standard live transcoding parameters. For more information, please see Video transcoding parameters.
You can use live watermarking to add a preset logo image to an original video stream for copyright and marketing purposes.
The main parameters of a watermark include watermark location and watermark size, which are determined by the XPosition
, YPosition
, Width
and Height
parameters as detailed below:
Note:If you enable multi-bitrate transcoding for a stream (i.e., one source stream is transcoded into streams of different resolutions) and want to add a watermark, you can set its percentage position on the X and Y axes in the CSS console or through the corresponding API, and the watermark position will be automatically determined by the system.
Suppose the resolution of the output image is 1920 x 1080, the watermark resolution is 320 x 240, XPosition = 5, YPosition = 5, and Width = 10 (unit: percent).
The absolute position and size of the watermark on the output video are as shown below:
XPosition_pixel = 1920 x 5% = 96
YPosition_pixel = 1080 x 5% = 54
Width_pixel = 1920 x 10% = 192
Height_pixel = 192 x 240/320 = 144
The watermark is at 96 pixels away from the left edge of the output video image and 54 pixels away from the top edge of the image. The watermark size is 192 x 144.
You can add a watermark in the CSS console or through a server API based on your business needs.
DomainName
(push domain name) and WatermarkId
(returned in step 1). Use the same AppName
as the AppName
in push and playback addresses, which is live
by default.Note: Using the watermark feature will incur standard transcoding fees.
You can set transcoding parameters via the CSS console or server APIs. Either way, you will mainly use watermark templates, transcoding templates, and transcoding rules for the configuration.
Call the CreateLiveTranscodeTemplate API to set the transcoding type parameters.
Call the CreateLiveTranscodeRule API to set the DomainName
(pull domain name) and TemplateId
(returned in step 1) parameters. Enter an empty string in AppName
and StreamName
as a wildcard for matching all streams under the domain name. You can also bind the transcoding template with different stream names to enable transcoding for these live streams.
Each transcoding template has a unique transcoding template name which is used as the unique ID for playing back the output stream. You can place the transcoding template name after the stream ID in the playback address to pull the output stream corresponding to the transcoding template.
Note:The transcoding rule is used to set whether to enable a specified transcoding template for a specified domain name or stream. A playback domain name can be used to pull a transcoding template only after the corresponding transcoding rule is created. If no transcoding rule has been created, a pull address spliced using the transcoding template name is invalid.
**Playback address = Playback domain name + Playback path + Stream ID_transcoding template name + Authentication string**
For a push with stream ID of 1234_test
, the original stream and watermarked streams of different bitrates can be played back via the following addresses:
http://liveplay.tcloud.com/live/1234_test.flv?authentication string
http://liveplay.tcloud.com/live/1234_test_sd.flv?authentication string
http://liveplay.tcloud.com/live/1234_test_hd.flv?authentication string
Note:To play back a watermarked stream, you need to bind the corresponding push domain name to the created watermark template.
Was this page helpful?