Learn how to use the externalMedia service to upload and manage YouTube hosted videos
This workflow has no steps. Try adding one.
You still haven't completed step 1
This workflow will guide you on how to use the externalMedia service to manage YouTube hosted videos as native Kaltura videos that benefit from the same workflows, experience and analytics available for Kaltura hosted video entries.
To add a YouTube hosted video as a Kaltura media, you will need the YouTube video ID: To find your YouTube video ID:
v
. The value of v
is the ID of your YouTube video.https://www.youtube.com/watch?v=ioY-Cp58zkY
, the ID is ioY-Cp58zkY
.That ID will be set as the value of the referenceId
field in Kaltura when creating the ExternalMediaEntry
object.
Important: Make sure that the YouTube video visibility is set to either
Public
orUnlisted
.
Private YouTube videos will not play outside YouTube, and as such are not supported as Kaltura external entries.
In order to get the title and description of the YouTube video, we recommend using the YouTube Data API.
You still haven't completed step 1
First, create a ThumbAsset that will hold the thumbnail image for the video in Kaltura. In the next step we will import the Thumbnail from YouTube to that ThumbAsset object.
You still haven't completed step 1
To import the YouTube thumbnail, use the following URL structure:http://img.youtube.com/vi/[VIDEO_ID]/maxresdefault.jpg
Replace [VIDEO_ID] with the YouTube ID of the video you'd like to use.
For example: in this YouTube video; https://www.youtube.com/watch?v=ioY-Cp58zkY
, the ID is ioY-Cp58zkY
.
And the Thumbnail URL is: http://img.youtube.com/vi/ioY-Cp58zkY/maxresdefault.jpg
.
Set the values below to try this step
curl -X POST https://www.kaltura.com/api_v3/service/thumbasset/action/setContent \
-d "ks=$KALTURA_SESSION" \
-d "contentResource[objectType]=KalturaUrlResource" \
-d "contentResource[url]=http%3A%2F%2Fimg.youtube.com%2Fvi%2FioY-Cp58zkY%2Fmaxresdefault.jpg"
Copy to clipboardYou still haven't completed step 1
In this step we will set the thumbnail imported from YouTube as the default thumbnail of the entry.
After this step, when embedding the Kaltura player with that entry ID, the player will present this thumbnail before the user clicks the play button.
Note: If you're using the PlayKit Player (aka Player v7), make sure to enable the YouTube plugin in the KMC > TV Platform Studio.
You can learn more about the operations used in this workflow by visiting the API Console and Documentation
externalMedia.add | Console | Documentation |
thumbAsset.add | Console | Documentation |
thumbAsset.setContent | Console | Documentation |
thumbAsset.setAsDefault | Console | Documentation |