Uploading a Media File to VOD
Scenario Description
With the popularization of video services, a large number of media files need to be processed and distributed on a platform. Huawei Cloud VOD is a one-stop media service that implements video upload, automatic transcoding, media file management, and distribution acceleration. Before using the media file processing functions of VOD, you need to upload media files to VOD. Huawei Cloud VOD provides diverse upload methods for source files of different storage modes.
Upload Methods
Table 1 describes the media file upload methods supported by VOD.
Upload Method |
Application Scenario |
---|---|
This method is used to migrate media files stored on local disks to VOD. |
|
This method is used to replicate media file copies from OBS buckets to VOD. |
|
This method is applicable when media files only need to be processed and distributed but the source files and processed files are still stored in OBS buckets. |
|
This method is used to pull and store online media files to VOD. |
Local Upload
Media files can be uploaded in batches to VOD. You can log in to the console on a browser to upload media files.
- Due to security policies, the logout from the console will result in the failure of large file upload that takes a long time. When uploading a large number of files, you need to perform operations on the console to prevent automatic logout.
- The following formats are supported:
- Video files: MP4, TS, MOV, MXF, MPG, FLV, WMV, AVI, M4V, F4V, MPEG, 3GP, ASF, and MKV
- Audio files: MP3, OGG, WAV, WMA, APE, FLAC, AAC, AC3, MMF, AMR, M4A, M4R, WV, and MP2
- Log in to the VOD console.
- In the navigation pane, choose Audio and Video Uploads > Upload File.
- Click Add File to add media files stored on the local host.
You can select a transcoding template or workflow in
. After the media files are uploaded, the system automatically processes the uploaded files. - Click Upload.
How long the upload takes depends on the file size and network conditions.
- If the media file to be uploaded is less than 20 MB, you do not need to segment the file before uploading it. For details, see Uploading a Media File Less Than 20 MB.
- If the media file to be uploaded is greater than 20 MB, you need to segment the file. The size of each part must be less than 20 MB. Then, upload each part. For details, see Uploading a Media File Greater Than 20 MB.
Replicating Media Files from OBS to VOD
If you have stored a large number of media files in an OBS bucket before subscribing to VOD and want to use the transcoding and snapshot capturing functions of VOD to process the media files, you can use this function to replicate the media file copies from the OBS bucket to VOD and then use the functions of VOD.
- Cross-region data replication is not supported. For example, media files stored in an OBS bucket of CN North-Beijing4 can only be replicated to the VOD in CN North-Beijing4.
- When you use data replication, media files in an OBS bucket are copied to VOD. If the media files in the OBS bucket are not deleted, you will be billed for the storage in both OBS and VOD.
- The following formats are supported:
- Video files: MP4, TS, MOV, MXF, MPG, FLV, WMV, AVI, M4V, F4V, MPEG, 3GP, ASF, and MKV
- Audio files: MP3, OGG, WAV, WMA, APE, FLAC, AAC, AC3, MMF, AMR, M4A, M4R, WV, and MP2
You can only replicate data from OBS to VOD by calling the API for Replicating Media Files from OBS to VOD.
OBS Hosting
If you want to use the transcoding and snapshot capturing functions of VOD to process a large number of media files stored in an OBS bucket, you can use the method of replicating media files from OBS to VOD. However, you will be billed for the storage in both OBS and VOD. If new media files are added to the OBS bucket, you need to manually replicate these files again using tools. To address these issues, VOD provides the OBS hosting function. Input files are still stored in an OBS bucket. After VOD is authorized to access the OBS bucket, you can directly process these files on the VOD console and store output files in VOD or your own OBS bucket.
- Cross-region hosting is not supported. For example, media files stored in an OBS bucket of CN North-Beijing4 can only be replicated to the VOD in CN North-Beijing4.
- OBS hosting is not available for IAM users.
- The following formats are supported:
- Video files: MP4, FLV, TS, MOV, MXF, MPEG, WMV, AVI, M4V, F4V and MPG
- Audio files: MP3, OGG, WAV, WMA, APE, FLAC, AAC, AC3, MMF, AMR, M4A, M4R, WV, and MP2
OBS hosting on the console
You can use inventory hosting and incremental hosting on the VOD console. For details, see Processing Media Files Stored in OBS.
- Obtain the user token for API calling. For details, see Constructing a Request.
- Call the API for .
- Call the API for and configure parameters related to inventory hosting in the request parameters.
VOD APIs provide only the inventory hosting function. If you need OBS to automatically synchronize new media files to VOD, you need to configure incremental hosting on the VOD console.
- Call the API for querying media files to view the hosting result.
After the hosting is successful, you can use VOD to process the hosted media files.
Pull from URLs
- A maximum of 100 media files can be pulled at a time on the console, and a maximum of 16 media files can be pulled at a time using APIs.
- The URL to be pulled must directly point to media files and cannot be a page URL of a website. The following URL suffixes are supported:
- Video files: MP4, TS, MOV, MXF, MPG, FLV, WMV, AVI, M4V, F4V, MPEG, 3GP, ASF, and MKV
- Audio files: MP3, OGG, WAV, WMA, APE, FLAC, AAC, AC3, MMF, AMR, M4A, M4R, WV, and MP2
- The URL to be pulled can only use HTTP and HTTPS.
- A new media file ID is generated for the media file obtained from other cloud service providers. The original media file ID cannot be inherited.
- Log in to the VOD console.
- In the navigation pane, choose Audio and Video Uploads > Pull from URLs.
- Click Pull from URLs and enter media file URLs.
You can select a transcoding template or workflow in
. After the media file has been pulled, the system automatically processes the file. - Click OK. You can view the task status in the URL pull list.
- Obtain the user token for API calling. For details, see Constructing a Request.
- Call the API for Pulling Media Files from URLs and configure the parameters for batch pulling media files from URLs and media file processing in the request parameters.
- Call the API for querying media files to view the pull result.
Wait for one or two minutes (depending on the size of the video file) and then query the pull result.
Feedback
Was this page helpful?
Provide feedbackFor any further questions, feel free to contact us through the chatbot.
Chatbot