Clip Event Timestamp


#1

The last time I checked the clip creation time (‘created_at’ key in Get Clip response) referred to when the clip was created and not when the clipped event occurred live.

For example if someone watched the stream and found an interesting event but waited until an hour later to clip it (from the VOD in this case), the creation time would refer to an hour after the event.

Would we be able to get a time of the event itself in the get clip response?


#2

You mean the timeindex for the clip for the vod/.stream that is was clipped from? So for example you can go back to the vod and capture stuff before/after the clip?

You can take the clip slug that you got from Helix, and perform get clip against kraken

That has the information you are after.

https://api.twitch.tv/helix/clips?id=MushyVenomousSnakeOpieOP

compared to

https://api.twitch.tv/kraken/clips/MushyVenomousSnakeOpieOP

Kraken/v5 just has more of the needed data


#3

There are two separate timestamps I’m referring to.

  1. The created_at timestamp. The timestamp for when a user creates a clip. The created_at key in the Get Clip api call (for both of your links) refers to this.

  2. The live timestamp. A streamer will always perform live, and clips will always be created at some point after the event has occurred. This timestamp would refer to when the live event actually occurred, instead of when the clip was created, as in case 1.

I just clipped a segment from a VOD of a current livestream and went back 1 hour from live, the timestamp it gave in the created_at key was the time I clipped it (case 1). In this case, I would want a response that gave the created_at time minus 1 hour, the live timestamp.

Thanks for any responses.


#4

Thats in the second link

https://api.twitch.tv/kraken/clips/MushyVenomousSnakeOpieOP

"vod": {
"id": "340044952",
"url": "https://www.twitch.tv/videos/340044952?t=4h5m23s",
"offset": 14723,
"preview_image_url": "https://vod-secure.twitch.tv/_404/404_processing_320x240.png"
},

You can work it out by taking the offset and adding to the the get videos call for when the vod was created. It’s mathable, just not as a singular JSON key


#5

VOD’s get deleted with some frequency, which disallows the above method in general.

Edit: Accidentally edited over this post.


#6

Collect and store when the obtain the Clip details.

Other that that it’s just waiting to see if helix will include it before kraken v5 is removed


#7

Okay thanks for fleshing out the options, sometimes there are some undocumented api endpoints that prove useful.

I’ll post this in the requested features forum.


#8

For reference I’ve not cited any undocumenteds here. Just the v5 end point