Overview
Video transcoding can change the original video's encoding format, resolution, bitrate, and other parameters to adapt to different terminals and network environments. It is one of the most common video processing methods.
Traditional offline transcoding is an asynchronous processing mode that requires pre-decoding and encoding of the entire audio and video, with processing time often being 30% to 50% of the original video duration, resulting in long waiting times for users.
EdgeOne's Video Instant Processing allows audio and video files stored in Cloud Video on Demand (VOD) and Cloud Object Storage (COS) to be distributed and transcoded immediately after upload, without waiting. Regardless of the video's length, second-level broadcasting can be achieved, providing users with a new Media Processing Experience (MPS). Note:
The Video Instant Processing feature is currently only available to Enterprise Package Users.
Billing description
This feature is a paid feature and will be billed based on the video processing duration. For details, see Billing description. Features
|
Ease of Use | No need to integrate APIs or SDKs to initiate process tasks or receive offline transcoding task completion callbacks. Real-time transcoding processing allows instant playback of transcoded videos by appending parameters to the original video URL. |
Very short time consumption | Using offline transcoding requires asynchronous waiting for the transcoding task to complete. With real-time transcoding, regardless of the original video's duration, the transcoded video can be played almost instantly, with virtually no wait time. |
Reduce storage cost | The traditional offline transcoding feature requires storage for processed output files, but instant transcoding does not need to store processed videos. It supports caching only at the EdgeOne edge nodes, thereby reducing origin server storage costs by multiples. |
Applicable Scenario
|
UGC Users Upload Video | The time consumption for instant transcoding processing is much less than offline processing, almost completing in sync with distribution. In UGC user scenarios, it allows immediate distribution and playback after uploading, greatly enhancing the UGC user experience and increasing user stickiness. |
Online Education Long Videos | Online course long video files are usually large, and encoding them causes storage costs to grow multiplicatively. For example, traditionally transcoding an original MP4 video would require separate transcoding to 720p, 1080p, and 2k resolutions and packaging into HLS format, thus needing to store 4 video files. However, with real-time transcoding, only one original file needs to be stored, significantly saving storage costs. |
TV Stations and OTT | Some video content requires continuous modifications. Video creators can save the video in MP4 format for easy editing. When there is a terminal playback request, the latest version of the video content will be processed through real-time transcoding to a resolution and encapsulation format suitable for playback and immediately distributed, greatly improving efficiency. |
Preparations
Note:
If your current domain name has Token Authentication enabled and the authentication method used is not TypeV Authentication, we recommend you change the authentication method to TypeV when using instant transcoding processing to avoid failure in authentication after the video is transcoded to HLS. Use Method
You can directly implement video processing by adding instant processing-related parameters to the client request URL. Refer to the following steps to learn how to use it.
1. Login to the TencentCloud EdgeOne Console, in the left menu bar, click on Site List, in the site list click on the site to be configured. 2. On the site details page, click Multimedia Services > Audio and Video Processing, and find the Video Instant Processing card.
3. click Switch for Video Just-in-Time processing to enable this capability.
4. Once enabled, you just need to add /.edgeone-video
and other relevant parameters to the client request URL to pass video processing requirements. EdgeOne will automatically complete video processing based on the video processing parameters in the client request URL. For parameter concatenation instructions, refer to: How to Concatenate Real-time Transcoding URL. How to Concatenate Real-time Transcoding URL
You can distribute transcoded videos by spelling the file address of the real-time transcoded file according to the following rules, or directly use the Transcoding Address Generation Tool to retrieve the transcoding file URL. The detailed rules are as follows: https://www.example.com/video.mp4/.edgeone-video/template={templateName}/media.{ext}
It consists of the following four parts:
1. Original Video URL: The complete URL of the original video, for example: https://www.example.com/video.mp4
.
2. Fixed Parameters for Video Processing: Fill in /.edgeone-video
directory, indicating the use of EdgeOne's video processing feature.
3. Real-time Transcoding Template: Specify a template for real-time transcoding, {templateName}
is the template name. Refer to Real-time Transcoding Templates for supported templates. 4. Filename After Transcoding: This parameter is fixed as media
concatenated with a suffix {ext}
. Currently, the supported suffixes are m3u8 and mp4, representing HLS and MP4 formats respectively. The encapsulation format supported is determined by Real-time Transcoding Templates. Real-time Transcoding Templates
EdgeOne provides you with 5 real-time transcoding templates. You can choose any of the following transcoding templates based on the desired output resolution.
Note:
Please note the corresponding audio and video output packaging format when using transcoding templates.
|
SystemPresetAvcAac540p | Video Resolution: 540P, Video Encoding Format: H.264, Video Frame Rate: 25fps, Audio Encoding Format: AAC, Stereo | Supports HLS |
SystemPresetAvcAac720p | Video Resolution: 720P, Video Encoding Format: H.264, Video Frame Rate: 25fps, Audio Encoding Format: AAC, Stereo | Supports HLS |
SystemPresetAvcAac1080p | Video Resolution: 1080P, Video Encoding Format: H.264, Video Frame Rate: 25fps, Audio Encoding Format: AAC, Stereo | Supports HLS |
SystemPresetAvcAacSourceResolution | Video Resolution: Same as the original video, Video Encoding Format: H.264, Video Frame Rate: 25fps, Audio Encoding Format: AAC, Stereo | Supports HLS |
SystemPresetRemux | Transmuxing only, meaning video resolution, video encoding format, audio encoding format, number of channels, etc., are all consistent with the original video | Supports HLS and MP4 |
If the above transcoding templates do not meet your transcoding needs, please contact us. spelling example
Assume your video playback URL is: https://www.example.com/video.mp4
If you want real-time transcoding HLS output, choose the SystemPresetAvcAacSourceResolution template. The concatenated real-time transcoding URL is: https://www.example.com/video.mp4/.edgeone-video/template=SystemPresetAvcAacSameSource/media.m3u8
If you want the video transcoded to 1080P resolution HLS format output, you can choose the SystemPresetAvcAac1080p template. The spelled URL is: https://www.example.com/video.mp4/.edgeone-video/template=SystemPresetAvcAac1080p/media.m3u8
If you want the video transcoded to 1080P resolution MP4 format output, you can choose the SystemPresetAvcAac1080p template, and the file suffix in the URL needs to be changed to mp4. The spelled URL is: https://www.example.com/video.mp4/.edgeone-video/template=SystemPresetAvcAac1080p/media.mp4
Using the Transcoding Address Generation Tool
To facilitate users in quickly obtaining the transcoded URL after parameter splicing, the EdgeOne console provides a Transcoding Address Generation Tool. By filling in the required transcoding parameters, you can retrieve the transcoded file URL.
1. Log in into the TencentCloud EdgeOne console, click on Site List in the left sidebar. Subsequently, within the Site List, select the site you wish to configure. 2. On the Site Details page, click Multimedia Services > Audio and Video Processing, and find the Video Just-in-Time processing card.
3. Click the Video Just-in-Time processing switch. After enabling this capability, click Generate transcoding address tool.
4. Please select an acceleration domain name within the site, where the origin server is VOD (VOD) or COS (COS). Fill in the video path prepared for transcoding and select the target transcoding configuration. Click Preview to check if the original video and transcoded video play normally. Click Copy link to get the transcoded video playback address for accelerated distribution. Network protocol: Supports HTTP and HTTPS. Note that HTTP protocol cannot be used to preview transcoded videos in the console due to browser limitations; please preview them externally.
Domain name: Please select an acceleration domain name that is already bound to a VOD (VOD) or COS (COS) origin server. If you need to create an origin server, please refer to the VOD origin server guide. Video path: Fill in the access path for audio and video files in the VOD (VOD) or COS (COS) origin server, e.g., video/test.mp4
.
Just-in-time transcoding template: Select a pre-made real-time transcoding template. The applicable output video packaging formats for each template can be found in the Transcoding Template. Packaging format: For video playback, it is recommended to choose the HLS format. The MP4 format is recommended only for video download scenarios.
Preview Original Video: If the original video plays normally, it indicates that the original video path is valid. Otherwise, please check if the video path is correct.
Preview Transcoded Video: If the preview of the transcoded video plays normally, it indicates that the Instant Transcoding feature has been successfully triggered. If it is an MP4 file, it will be directly downloaded from the console and preview is not supported.
Use Limits
Original Video Limitations
Must be stored in Tencent Cloud VOD or COS storage.
The original video duration should not exceed 10 hours, size should not exceed 50 GB, resolution supports up to 2K, video bitrate should not exceed 10 Mbps, and frame rate should not exceed 60 fps.
When using SystemPresetRemux for trans muxing, the input video must be encoded in H.264 and the audio must be encoded in AAC.
The original video supports the following formats but requires the package to contain video and audio index.
Video: .mov, .mpeg, .mp4, .avi, .ts, .mkv, .m3u8, .m4v, etc.
Audio: MP3, M4A, WAV, AAC, etc.
Transcoded Video Limitations
For HLS format output, shards only support MPEG-TS.
For HLS format output, if the domain name enables Token authentication, it only supports playback under TypeV authentication. For MP4 format output, MOOV is at the tail (some players may not be compatible with this type of MP4 playback) and only supports using the SystemPresetRemux template.
Was this page helpful?