I wrote a simple little Node.js downloader for people to put clip URLs in, and get the related clip video MP4 files out. 90% of the time, I can call the API, get the tracking_id and download using clips-media-assets.twitch.tv/[tracking-id].mp4
Occasionally, a clip is not at that address, but instead at [broadcast-id]-offset-######.mp4
There is no indication that a clip is at the alternate style URL, nor is the offset # exposed via the API in any way (occasionally the offset is also visible in the thumbnail URL, but not always).
If the Clip video file URL could be added to the API that would be ideal. Barring that, the fact that it’s using the broadcast_id with the offset would also work.
I apologize, I meant to put the following in my initial report. I was able to solve a majority by looking for the offset in the Thumbnail. However, some clips do not expose the offset in the thumbnail URL. I didn’t know this was an issue until I got a bug report from a user with this Example Clip
%7C is an url encoded “_”, not sure why they did it this way but that’s how it currently is.
Because Twitch now uses multiple ways for their video URLs it’s probably best to use the above mentioned API to get the right one for the Clip you want to download.