Video transcoding System File Upload interface Specification

Source: Internet
Author: User
Tags http post

1. Overview 1.1. Use

The Cloud Vision Core Video transcoding system (" transcoding system ") can upload transcoded video files to the server via HTTP protocol.
By default, an HTTP address is given to upload the file. In order to meet more complex application requirements, the transcoding system also supports more flexible upload methods, this document defines the transcoding system upload rules. Developers can refer to this rule to implement server-side logic for uploading servers.

1.2. Communication protocols

In this specification, the server that receives the data is the server side of the communication ("Server"), and the transcoding system is the communication client. The client and the server communicate over the HTTP protocol, and the client sends the request to the server using HTTP GET, and the server returns the data in JSON format to the client. The server can be any third-party system that can provide services in accordance with this specification, such as the streaming media server system and content management system of cloud view core.

1.3. Prerequisites

If you want the transcoding system to access the interface and upload files according to this interface specification, please tick the "Upload location to meet Cloud View specification" option in the Setup interface of transcoding system , for example:

2. Query the upload location

The client obtains the actual upload location and callback location by accessing the interface location provided by the server. The interface location is a URL address that conforms to the HTTP specification.
The client passes the HTTP GET request interface, and after the server receives the request, it returns JSON data in the following format:

{    "code": 0,    "data": {        "upload": "http:\/\/192.168.1.11\/upload\/?sub_path=&field_name=field1",        "callback": "http:\/\/192.168.1.11\/mserver\/interface\/src=_FILENAME&src_id=_SRC_ID&title=_TITLE"    }}

If not, returns the JSON data with code not equal to zero, returning an error in the following format:

{"code":100,"err_desc":"\u7f3a\u5c11\u5fc5\u8981\u53c2\u6570"}

which
upload is the location where the file is actually transmitted, and the client uploads the file to that location via HTTP POST.
callback is the callback location after the file upload is complete and can be ignored.
If a callback location is provided, after the file is correctly uploaded, the client invokes the interface and attempts to replace the following string in the interface before the call:
_filename upload the file name, replace it with the actual file name
_src_id partial substitution of suffix with filename
_title replace the suffix with the filename, or replace it with an explicitly set file title
If the call callback succeeds, the server returns:

{"code":0}

Failed to return code non-zero data:

{"code":100,"err_desc":"。。。"}
3. File Upload

The transcoding system uploads files to the upload location using the HTTP POST protocol. The post data is multipart/form-data encoded.

Video transcoding System File Upload interface Specification

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.