LVB encapsulating refers to the process where the original stream pushed from the live broadcast site (which is generally pushed to the cloud using the RTMP protocol) is converted to different containers in the cloud before pushed to viewers. In addition, it supports pure audio or pure video output and a variety of DRM schemes to meet the requirements of digital copyrights protection.
LVB transcoding (including both video transcoding and audio transcoding) refers to the process where the original stream pushed from the live broadcast site is transcoded to streams of different encoding formats, resolutions, and bitrates in the cloud before pushed to viewers. This helps meet the playback needs in different network environments on different devices.
Video encoding format, including:
Video profile, including:
Video encoding bitrate
Video encoding frame rate
Video GOP length
Video bitrate control method, including:
For video rotation, the original video can be rotated clockwise by 3 angles:
Audio encoding format, including
Audio sample rate, including the following (48000 and 44100 are commonly used):
Audio encoding bitrate
Supported bitrate range: 20-192 Kbps; commonly used bitrates include:
Number of audio channels, including:
|Template Name||Video Resolution||Video Bitrate||Video Frame Rate||Video Encoding Format|
|Smooth||550||Scaled proportionally * 540||550 Kpbs||23||H264|
|SD||900||Scaled proportionally * 720||900 Kpbs||25||H264|
|HD||2000||Scaled proportionally * 1080||2000 Kpbs||25||H264|
|UHD||3000||Scaled proportionally *1080||3000 Kpbs||30||H264|
LVB watermarking feature lets you add a preset logo image to an original video stream for copyright marking and marketing purposes.
Description to the watermark parameter calculation method field type
The type field represents the calculation method of the four parameters: x_position, y_position, width, and height.
type = 0: The position, width, and height are calculated in pixels.
This method specifies the absolute value of the watermark size and the absolute position of the watermark relative to the left and top edges of the video.
type = 1: Calculation is made based on the percentage of the width or height of the output video, i.e.,
x_position and width are calculated by a percentage of the output video width.
y_position and height are calculated by a percentage of the output video height.
If only width is specified but no height is specified, the height is calculated according to the aspect ratio of the watermark.
If only height is specified but no width is specified, the width is calculated according to the aspect ratio of the watermark.
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, we recommend using the percentage calculation method, so that the relative position and size of the watermark can remain the same under different bitrates.
The output video is 1920x1080, the watermark size is 320x240, the percentage calculation method is used (i.e., type = 0), x_position = 5, y_position = 5, and width = 10.
The absolute position and size of the watermark are calculated according to the resolution of the output video as shown below:
x_position_pixel = 1920 * 5% = 96 y_position_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.
You can set transcoding parameters in the console or through server APIs. The settings mainly involve watermarking templates, transcoding templates, and transcoding rules.
Define the following watermarking template:
|Watermarking Template ID||type||x_position||y_position||width||height||Other Watermark Parameters|
Define the following transcoding templates:
|Transcoding Template ID||Transcoding Template Name||Video Frame Rate||Video Bitrate||Other Transcoding Parameters||Watermarking Template ID|
Define the following transcoding rules:
|Playback Domain Name||Playback Path||Stream ID||Transcoding Template ID|
For a push with stream ID 1234_test, streams of different bitrates can be played back at the following three addresses:
Manage transcoding templates in the console
The console supports querying, adding, modifying, and deleting transcoding templates.
Manage transcoding templates through APIs