Cannot Pick a Thumbnail for a video

Hi,

I created a video using a Shell command. I also managed to Upload a thumbnail (an image) using the documentation from https://docs.api.video/5.1/videos/upload-a-thumbnail and it looks like I am not able to Pick a thumbnail (from a time code) using https://docs.api.video/5.1/videos/pick-a-thumbnail.
I am aware of It may take up to 1h before the new thumbnail to be delivered by our CDN. and even after 2-3 hours or a day, nothing happened.
The response I got after executing the command represents the success of the action, so I can’t imagine what could have gone wrong. Is this a feature available only in production environment?

Could anyone do some test and confirm that indeed it is not possible to Pick a thumbnail?

This is my command

curl -X PATCH https://sandbox.api.video/videos/vi3cqijTRX73qVjhAtamklzb/thumbnail -H 'Content-Type: application/json' -d '{"timecode":"00:55:00x00"}' -H 'Authorization: Bearer ...'

And this is the response

    "videoId": "vi3cqijTRX73qVjhAtamklzb",
    "title": "Test video thumbnail update",
    "description": "",
    "public": true,
    "panoramic": false,
    "mp4Support": true,
    "publishedAt": "2020-07-16T08:06:48+00:00",
    "updatedAt": "2020-07-16T08:10:08+00:00",
    "tags": [],
    "metadata": [
        {
            "key": "channel",
            "value": ""
        },
        {
            "key": "description",
            "value": ""
        },
        {
            "key": "status",
            "value": "draft"
        }
    ],
    "source": {
        "type": "upload",
        "uri": "/videos/vi3cqijTRX73qVjhAtamklzb/source"
    },
    "assets": {
        "iframe": "<iframe src=\"https://embed.api.video/vod/vi3cqijTRX73qVjhAtamklzb\" width=\"100%\" height=\"100%\" frameborder=\"0\" scrolling=\"no\" allowfullscreen=\"\"></iframe>",
        "player": "https://embed.api.video/vod/vi3cqijTRX73qVjhAtamklzb",
        "hls": "https://cdn.api.video/vod/vi3cqijTRX73qVjhAtamklzb/hls/manifest.m3u8",
        "thumbnail": "https://cdn.api.video/vod/vi3cqijTRX73qVjhAtamklzb/thumbnail.jpg",
        "mp4": "https://cdn.api.video/vod/vi3cqijTRX73qVjhAtamklzb/mp4/360/source.mp4"
    },
    "playerId": "pt4iI2Ck3Xg6ISD5rC7Nh8X0"
}

Thank you,
Alex

Hi Alex,

I think your timecode format is incorrect. It should be:

timecode string When to pick thumbnail in video. Pattern : “hh:mm:ss.ms”
pattern: 00:00:00.00
See here in the docs:
https://docs.api.video/5.1/videos/pick-a-thumbnail

I agree - there should be an error code if the format is incorrect - I’ll raise that with our dev team.

Doug

Thanks for the answer, I will try with this format. However, in the documentation, on Try out section, I can see that the example uses the format --data '{"timecode":"00:00:00x00"}'. So, an update would also help in the documentation.

Alex

Thank you for the heads up - we’ll resolve that ASAP.
Doug

Hi,

I tried to update with the right time code format (hh:mm:ss.ms), but it still didn’t work. Is there any chance of having someone checking if this method works? I couldn’t manage to make it work, and I am out of ideas in trying something new.
I know that the Sandbox environment has some limitations (videos are deleted after 72 hours), so I would like to know if it is possible to be also a limitation regarding updating a video thumbnail from time code since this needs some data processing on a server.

Thank you,
Alex

Hi Alex,
Sorry for the delay on this one - for some reason this post got flagged as spam. (next task: fix those settings…)

The sandbox (other than the 72 hour video self-destruct) has the same functionality as production,

Can you supply your code? I just gave it a go, and this worked for me:

curl -X PATCH https://sandbox.api.video/videos/vi3qT9ovbSMGc12gZa5zCT2x/thumbnail -H 'Content-Type: application/json' -H 'Authorization: Bearer {key}' -d '{"timecode": "00:00:03.0"}'
It did not matter how many figures I placed in the millisecond part, I tried 1-3 zeros, and all worked.

Doug

Hi Doug,

This is my code curl -X PATCH https://sandbox.api.video/videos/vi3cqijTRX73qVjhAtamklzb/thumbnail -H 'Content-Type: application/json' -d '{"timecode":"00:55:00.00"}' -H 'Authorization: Bearer {key}'.
I cannot spot any error or difference. This is what didn’t work for me.

Thanks,
Alex

Alex,

Since the format is hh:mm:ss.milliseconds, I just want to verify that your video is over 55 minutes long?

If your request is out of the range of the video - it defaults to 00:00:00.000

Doug

I can confirm that this functionality DOES work as we have successfully implemented it in our application.