Upload content with API V2
Choose an approach to add your content to your JW Player account.
Not all content upload use cases are the same. Sometimes you need to upload multiple, small files from a local machine. Other times, you might be creating an application that uploads videos from a browser. This article explains several approaches to add content to your account while addressing these varied needs.
For Platform Management API v1 developers, use this article to upload your content.
General
When you upload content to your JW Player account, you must send a POST request with a JSON body to the media endpoint to create a media entity -- your content. The JSON body contains two top-level objects: upload
and metadata
.
Within the upload
object, use method
to define the upload approach. The method
property must have one of the following values:
• direct
• multipart
• fetch
For some upload approaches, additional information is included within the upload
object.
Within the metadata
object, you can define descriptive information (for example: title
, description
, author
) about the media you are uploading.
{
"upload": {
"method": "direct"
},
"metadata:": {
"author":"Joe Schmoe",
"category": "Movies",
"custom_params":{
"is_film":"true"
},
"tags":[
"comedy"
],
"title": "Joe’s adventure",
"duration": 6000,
"publish_start_date": "2020-02-20T08:58:26+00:00",
"publish_end_date": "2021-02-20T08:58:26+00:00",
"external_id": "1231",
"description": "Joe goes on an adventure"
}
}
Media assets must have a minimum duration of 2 seconds.
Upload Methods
JW Player provides the following methods to upload content.
Approach | File Location & Size | Additional Notes |
---|---|---|
Direct Single Upload via S3 | Location: Local machine Best for uploading files that are 100 MB or less | Use when the media file is on the local machine The file should be small enough that retrying the entire file upload is not an issue. |
Multipart Resumable Upload | Location: Local machine Best for uploading files that are 100MB-25GB | Use when the media file is on the local machine The file should be large enough that retrying the entire upload is an issue. The upload needs to be paused & resumed, or upload progress needs to be reliably reported. |
Fetch Upload via URL | Location: Remote Accommodates files up to 25GB | Use when the media is hosted on another platform and your content needs to be hosted in your JW Player account |
File size limitations and recommendations may increase during 2021.
Updated about 1 month ago