Help Center> Video On Demand> Best Practices> Processing Media Files Stored in OBS
Updated on 2022-10-24 GMT+08:00

Processing Media Files Stored in OBS

Scenario Description

VOD provides different media upload methods, such as and Pull from URLs on the VOD console. If you have a large number of media files stored in OBS but want to use VOD to transcode and capture snapshots from these files, you can replicate these files from OBS to VOD. However, in this method, OBS and VOD both have the media files, causing extra storage fees. Also, if new media files are added to the OBS bucket, you need to manually replicate new files again.

To address these issues, VOD provides audio and video hosting. 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.

The following is an example:

A lot of media files have been stored in an OBS bucket in the CN North-Beijing4 region. Synchronize the existing media files to VOD. If new media files are added, they will be automatically synchronized to VOD. Output files will be stored in another OBS bucket in the CN North-Beijing4 region. Their storage directory is named the same as the storage directory of input files.

Process Flow

  1. Authorize VOD to access the OBS bucket that stores input files and the OBS bucket that will store output files.
  2. Configure inventory hosting to synchronize existing media files to VOD.
  3. Create an incremental hosting configuration to make sure that any new files in the OBS bucket will be automatically synchronized to VOD.

Procedure

  1. Authorize access to OBS.

    1. Log in to the VOD console and check whether the region is CN North-Beijing4 in the upper left corner. If it is not, change the region.
    2. In the navigation pane, choose Audio and Video Hosting > Bucket Authorization.
    3. In the row of the target OBS bucket, click Authorize.

  2. Create an inventory hosting task.

    1. In the navigation pane, choose Audio and Video Hosting > Inventory Hosting.
    2. Click Create Task. On the displayed page, configure related parameters.

      • Input Bucket: Select the OBS bucket to be hosted.
      • Range indicates the range to be hosted. You can have VOD to host all files in the bucket, some types of media files, media files under a directory, or just a single media file.
      • Template/Workflow: Select a template or workflow to process hosted files.
      • Storage Location means where output files will be stored. There are three options: VOD, OBS bucket, and OBS bucket (same as the input files). If you select OBS bucket (same as the input files), select an output bucket. The storage directory is named the same as the storage directory of input files.
    3. Click OK.

      Then you can view hosted media files on the Audio and Video Management page.

  3. Create an incremental hosting configuration.

    1. In the navigation pane, choose Audio and Video Hosting > Incremental Hosting.
    2. Click Create Hosting Configuration. On the displayed page, configure related parameters.

      The configuration parameters of incremental hosting are similar to those of inventory hosting. However, incremental hosting applies to the entire bucket. After you select the type of files to be hosted, if new media files of the corresponding type are added to the OBS bucket, the files will be automatically synchronized to VOD.

    3. Click OK.

      The configuration takes effect immediately after being created. You can upload a media file to the OBS bucket to verify whether the configuration has taken effect.