CSS remuxing refers to the process where the original stream pushed out of the live streaming site (generally to the cloud over the RTMP protocol) is converted to different container formats in the cloud before being pushed to viewers. In addition, it supports pure audio or pure video output and a variety of DRM schemes to meet the needs of digital copyrights protection.
CSS transcoding (including both video transcoding and audio transcoding) refers to the process where the original stream pushed out of the live streaming site is transcoded to streams of different codecs, resolutions, and bitrates in the cloud before being pushed to viewers. This helps meet the playback needs in different network environments on different devices.
|Video codec||Supported video codecs:
|Video profile||Supported video profiles:
|Video encoding bitrate||
|Video encoding frame rate||
|Video GOP length||Supported video GOP length range: 1–10 seconds; recommended range: 2–4 seconds.|
|Video bitrate control method||Supported video bitrate control methods:
|Video image rotation||The original video can be rotated clockwise by 3 angles:
|Audio codec||Supported codec:
|Audio sample rate||Supported sample rates (48,000 and 44,100 are commonly used):
|Audio encoding bitrate||Supported audio bitrate range: 20–192 Kbps. Commonly used bitrates include:
|Sound channel||Supported sound channel modes:
|Definition||Template Name||Video Resolution||Video Bitrate||Video Frame Rate||Video Codec|
|LD||550||Scaled proportionally * 540||500 Kbps||23||H.264|
|SD||900||Scaled proportionally * 720||1,000 Kbps||25||H.264|
|HD||2000||Scaled proportionally * 1080||2,000 Kbps||25||H.264|
Based on the technologies such as audio/video encoding, intelligent scenario recognition, dynamic encoding, and three-level (CTU/line/frame) precise bitrate control model accumulated by Tencent Video Cloud over the years, the top speed codec transcoding feature enables video businesses such as CSS and VOD to provide higher-definition streaming services at lower bitrates (reduced by over 30% on average).
If the CSS 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.
In CSS, a standard live stream encoded in H.264 is pushed to 200 users at 3 Mbps bitrate and 1080p resolution for 4 hours. If top speed codec transcoding is not used, the incurred bandwidth fees as calculated by the CSS price calculator will be 372 CNY.
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 CSS transcoding parameters. For more information, please see Video transcoding parameters.
CSS watermark refers to adding a preset logo image to an original video stream for copyright marking and marketing purposes.
The main parameters of a watermark include watermark location and watermark size, which are determined by the
Height parameters as detailed below:
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.
The output video is 1920x1080, the watermark size is 320x240, the percentage calculation method is used, XPosition = 5, YPosition = 5, and Width = 10.
The absolute position and size of the watermark are calculated based on the resolution of the output video as shown below:
XPosition_pixel = 1920 * 5% = 96 YPosition_pixel = 1080 * 5% = 54 Width_pixel = 1920 * 10% = 192 Height_pixel = 192 * 240 / 320 = 144
Therefore, the watermark position is at 96 pixels away from the left edge of the output video and 54 pixels away from the top edge of the output video, and the watermark size is 192 * 144 pixels.
WatermarkId(returned in step 1). Use the same
AppNamein push and playback addresses, which is
Using the watermark feature will incur standard transcoding fees.
You can set transcoding parameters in the CSS Console or through server APIs. No matter which method is used, the settings mainly involve watermark templates, transcoding templates, and transcoding rules.
Call the CreateLiveTranscodeTemplate API to create a transcoding template by setting the transcoding type and parameters.
Call CreateLiveTranscodeRule to create a transcoding rule. Set the pull domain name (
TemplateId (returned in step 1) parameters. Enter an empty string in
StreamName to indicate all streams pulled under the domain name. You can associate the transcoding template with different stream names so as to enable transcoding for specified 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.
The operations related to transcoding rule are mainly used to control the enablement of a specified transcoding template for a specified domain name or stream. A playback domain name can pull a transcoding template only after the corresponding transcoding rule is created. If no transcoding rule has been created, the pull address directly spliced by using the transcoding template name will be invalid.
Playback address = playback domain name + playback path + stream ID_transcoding template name + authentication string
For a push with stream ID
1234_test, streams of different bitrates can be played back at the following three addresses:
To play back a watermarked stream, you need to bind the corresponding push domain name to the created watermark template.