Uploading a Media File to VOD
Scenarios
With the popularization of video services, a large number of media files need to be processed and distributed on a platform. Huawei Cloud Video on Demand (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.
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: MP4, TS, MOV, MXF, FLV, MPG, WMV, AVI, M4V, F4V, MPEG, 3GP, ASF, MKV, WEBM, RMVB, VOB, RM, MTS, DV, DAT, QT, M2T, SWF and M3U8. M3U8 files can be uploaded only by URL pull.
- Audio: MP3, OGG, WAV, WMA, APE, FLAC, AAC, AC3, MMF, AMR, M4A, M4R, WV, MP2, RA, and CAF
Local upload from the console
- Log in to the VOD console.
- In the navigation pane, choose Audio and Video Uploads > Local Upload.
- Click Upload File. The Upload File dialog box is displayed.
- Click Add File to add a local media file, or directly drag a file to the file area, as shown in Figure 1.
- (Optional) Select a transcoding template or workflow using the button. After the media file is uploaded, the system automatically processes the uploaded file.
- 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, it can be uploaded directly. For details, see Uploading a Media File Less Than 20 MB.
- If the media file to be uploaded is greater than 20 MB, it will be split into parts of less than 20 MB before being uploaded. 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.
- You can only replicate data from OBS to VOD by calling the API for Dumping Media Files from OBS.
- If the API parameter storage_mode is set to 0, the media files in the OBS bucket are replicated to VOD. If the media files in the OBS bucket are not deleted, both OBS and VOD will incur storage fees.
- If the API parameter storage_mode is set to 1, the media files are still stored in the OBS bucket but have been authorized to be used by VOD. OBS generates storage fees, but VOD does not generate extra storage fees.
In this scenario, deleting the media files from VOD will not delete those in the OBS bucket.
- 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 VOD in CN North-Beijing4.
- The following video file formats are supported: MP4, TS, MOV, MXF, FLV, MPG, WMV, AVI, M4V, F4V, MPEG, 3GP, ASF, MKV, WEBM, RMVB, VOB, RM, MTS, DV, DAT, QT, M2T, SWF, and M3U8.
- If the API parameter storage_mode is set to 0, media files in the M3U8 format cannot be replicated.
- If the API parameter storage_mode is set to 1, files in M3U8 format can be replicated. However, you need to ensure the integrity of all slice files.
- The following audio file formats are supported: MP3, OGG, WAV, WMA, APE, FLAC, AAC, AC3, MMF, AMR, M4A, M4R, WV, MP2, RA, and CAF.
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: MP4, TS, MOV, MXF, FLV, MPG, WMV, AVI, M4V, F4V, MPEG, 3GP, ASF, MKV, WEBM, RMVB, VOB, RM, MTS, DV, DAT, QT, M2T, SWF and M3U8. M3U8 files can be uploaded only by URL pull.
- Audio: MP3, OGG, WAV, WMA, APE, FLAC, AAC, AC3, MMF, AMR, M4A, M4R, WV, MP2, RA, and CAF
- Currently, only HTTPS and HTTP are supported. HTTP has security risks. HTTPS is recommended.
- 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.
File pull and upload on the console
- Log in to the VOD console.
- In the navigation pane, choose Audio and Video Uploads > Pull from URLs.
- Click Pull from URLs. The Pull from URLs page is displayed, as shown in Figure 2.
- Click Confirm. 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.
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot

