Abstract:

1. An overview of the

Video upload the video on demand (VOD), and after the success of the transcoding can play, can be in video on demand video management console page to preview video playback, can also be integrated VOD player SDK, or pass to capture video broadcast address to his players (native or open source or the research) system to play the video. This article is written by Xiao 巶, senior development engineer of Aliyun Video cloud, mainly introduces the preconditions of voD and the problems that users often encounter in the process of using, so as to facilitate users to quickly locate and solve the problems related to playback. Before officially using the voD service, ensure that the following procedures are correctly configured and processed:

  • The service
  • Video processing
  • Security configuration
  • The network environment

2. Service opening

2.1 Opening of voD service

  • Click “Open now” on aliyun voD product page.
  • If you do not have an Aliyun account, please register first. If the real-name authentication is not complete, see Real-name Authentication.
  • The vod account is not overdue. Please refer to the notes on overdue fees.

2.2 Domain Name Configuration

For details about how to add a registered domain name to the VOd console, see Initialization.

  • Obtain a domain name: To register, transfer, or purchase a domain name, go to Wanwang domain management page and select the required domain name.
  • Domain name configuration: After obtaining a domain name, CNAME binding is required to complete access. For details, see Domain name Access of 10000 networks. Domain names of Sinnet and DNSPod are also supported.
  • Domain name detection: On the Linux CLI, Terminal, or Windows CLI, enter nslookup -type=cname [User vod domain name].

In Linux (such as CentOS), if command not found is displayed, run the yum install bind-utils -y command

The configuration is successful if the canonical name value displayed is the same as the CNAME value displayed on the vod console.

The results of reference: help.aliyun.com/knowledge_d… Help.aliyun.com/knowledge_d… CDN IP test page: cdn.console.aliyun.com/home#/Tool/…

3. Video processing

Video files are uploaded to the voD account and can be played only after the video processing process. Based on service requirements, users can select two processing modes: normal transcoding and direct distribution after upload. The source file uploaded by the user must be a multimedia file that meets the requirements of the specific file format and encoding.

3.1 Validity of file

Source file and output file format and encoding limit reference documentation help.aliyun.com/knowledge_d… If the user chooses the processing mode of direct distribution and acceleration after uploading, voD needs to process screenshots of the video and accelerate CDN distribution. In order to ensure that the source files can be played by default after distribution, the video source files can only be uploaded in MP4 and FLV formats.

If the uploaded source file does not meet the requirements for video processing, file transcoding fails. Currently, most of the reasons for the transcoding failure are caused by missing video streams or Meta problems in the uploaded source file. Therefore, users need to check whether the source file can be played locally before uploading the file.

3.2 Transcoding Configuration

If you select a transcoding template group in transcoding Settings, distribution without transcoding and system template groups are added by default when the VOD service is enabled. For details, see Transcoding Configuration. When entering the transcoding process, files in the corresponding format and clarity are transferred to play according to the transcoding configuration. If the template group is distributed without transcoding, the source file can be played after being uploaded.

3.3 Video Status

Only the video in Normal state can be played after the video is processed successfully. To quickly obtain playable videos, users can determine whether the current video can be played through status polling and event notification. The status polling mode is unpredictable in time. You are advised to set event notification based on the video processing mode:

  • Common transcoding, as long as there is a clear transcoding completion can play, can be configured: a single clear transcoding completion event

Complete transcoding event

  • Distribute the video without transcoding, and play the video after uploading. You can set the following event: Video uploading is complete

Configure the corresponding event notification in the callback Settings of the On-demand console, and configure the reference event notification.

4. The security configuration is correct

Aliyun voD provides a sound content security protection mechanism, which can meet the security requirements of different business scenarios. However, improper security configuration may cause user videos cannot be played.

4.1 Checking Configurations

The review process can be configured in the review Settings. Only the videos that pass the review can be played. For configuration, refer to the review Settings.

  • A video with Checking status will appear only when Checking first is turned on in Checking Settings
  • Click “Block” in “Video on Demand console – Video Review – Details of Review” or call the review interface to block the video, the video in Blocked state will appear

Videos in the Checking and Blocked states can only be played in the vod console or from requests in the audit IP whitelist.

4.2 Access Restrictions

In the anti-theft chain, the Referer black and white lists (mutually exclusive) are configured to limit the access of video resources. If the rules are met, the video data can be successfully requested. If the rules are not met, the request is rejected and 403 response code is returned. For details, see Anti-theft chain Settings.

4.3 authentication URL

If the broadcast address is fixed, it will lead to persistent illegal proliferation and cannot be effectively contained. The URL authentication provided by VOD can distinguish legitimate requests by generating dynamic encrypted urls (including permission authentication and expiration information) to protect video resources. You can configure URL authentication information in URL authentication. For details, see URL authentication configuration

After URL authentication is enabled, the ON-DEMAND player SDK and the API/SDK that obtains the playing address will automatically generate the playing URL with time limitation.

After URL authentication is enabled, all media resources, including video, audio, cover, and screenshot addresses, are authenticated.

After URL authentication is enabled, only urls within the URL validity period can be played. After URL authentication expires, requests are rejected and 403 response codes are returned.

4.4 Video Encryption

Aliyun video encryption encrypts video data. Even if downloaded locally, the video itself is encrypted and cannot be maliciously distributed again. If the user selects HLS encryption when configuring the transcoding template, the corresponding transcoding output file can only be played through the SDK integrated with Ali Cloud Player. At present, the player kernel SDK, covering iOS, Android and Flash platforms, automatically decrypts and plays the encrypted content; H5 player does not support encrypted video playback.

For more information, see Aliyun – Video encryption

5. Network environment

The broadcast service is strongly dependent on the network environment. If there is no stable and smooth network environment, the broadcast service quality will be seriously affected and even the video cannot be played. When the network is abnormal, you can check the network by referring to the following two methods:

5.1 Domain name hijacking Check

Accessing www.ipip.net/ip.html displays local IP by default

The user can PING the domain name to be accessed locally to check whether the IP address can be resolved

Check whether the resolved IP address is the node of Ali Cloud CDN. Enter the IP address in www.ipip.net/ip.html and the corresponding region will be displayed

If it is not the IP of Ali Cloud CDN node, then it indicates that it is hijacked, and it is recommended to complain to the network operator where the client accesses the network.

5.2 Checking the Source Site

If the IP resolved through the domain name is the node IP of Aliyun CDN, and the domain name can be pinged through, then the local domain name is bound to host test to see whether the CDN problem or the source site problem. For details, see CDN Access Exception.

6. Frequently Asked Questions

  • If the upload and play services are unavailable, check whether the vod account is overdue
  • Error code InvalidDomain.NotFound is returned when API/SDK is invoked to obtain the playing address. Please confirm the domain name configuration
  • Error Forbidden.IllegalStatus is returned when calling API/SDK to obtain the playing address. Please confirm the video status
  • Error code InvalidVideo.NotFound is returned when API/SDK is invoked to obtain the playing address. Please check whether the video is deleted
  • Verify security configuration when requesting CDN accelerated address to return 403
  • If a user in a region cannot play videos, check the user’s network environment
  • Use the output of the diagnostic page of the voD Web player to locate the playback problem. Currently supports native H5, Ali Cloud H5/Flash playback. Diagnostic page address: player.alicdn.com/detection.h…

The original link

This article is the original content of the cloud habitat community, shall not be reproduced without permission.