kbaccouche
kbaccouche

Reputation: 4605

How to create thumbnail from an uploaded video on dmcloud.net

I am using the Python SDK to upload videos on dmcloud.net.

Now I want to give the user of my application the possibility to choose a thumbnail to the video he uploaded. How can I generate different thumbnails from an uploaded video on dmcloud.net.

Thanks.

Upvotes: 1

Views: 306

Answers (1)

transContext
transContext

Reputation: 36

Through the SDK, you can update the video thumbnail using the set_thumbnail method of the Media API. You have two options:

  • Specify a URL to a new thumbnail
  • Specify a timecode, which is a time offset within the video

For your end-users, provide a way to let them specify a URL or an offset (verify it's an offset that's appropriate for the video's duration). If you're using a custom player, you can probably let them choose an offset visually by pausing the player on their frame of choice and then extracting a time offset from your player for the dmcloud API call.

If you choose to set a thumbnail by timecode (offset), the SDK call would look like this:

    cloudkey.media.set_thumbnail(id, timecode)

SDK Link: http://www.dmcloud.net/doc/api/python-sdk.html#media-object

Upvotes: 2

Related Questions