Extend Clips API to provide the MP4 url so editors can automate downloads
If I have an oAuth that represents a User, where the User is either
- the broadcaster the clip is of
- an editor of the channel that the clip is of
- the user is the owner of the clip
And I make a request for a Clip as documented: https://dev.twitch.tv/docs/api/reference#get-clips
(but with the bearer naturally)
The JSON Response should include the direct link to the MP4 or an ability to download the Clip.
This is off the back of the removal/deprecation of some undocumented API's that I was using to get the MP4 URL for automated download for creation of clip reels and similar.
A dedicated "Get Clips Download" API endpoint has been added as an open beta and is expected to be generally available (i.e. stable with no further changes) in two weeks. More details are available in the announcement: https://discuss.dev.twitch.com/t/get-clips-download-twitch-api-endpoint-now-available-in-open-beta/64334
-
woollybear64
commented
Similar issues to others here. I used a custom setup for clip overlays that breaks unless I filter out clips with the new format (post-August 2024). It would be preferable if Twitch provided access to the mp4 link directly via API.
Alternatively, the official Twitch embed viewer could be used if the clip viewer had interactive calls (setClip, setVolume, pause, play, etc.).
-
just_some_donkus
commented
Idea shared in 2019, good lord.
-
MsFelonyRose
commented
The deprecation and removal of the undocumented API, and the replacement with NONE, ruins my capability to perform properly on stream:
I have utilized the API with my bot and also directly over Stream Deck script to create and show my video and of raid participants.
Also thumbnail to the MP4 do no work anymore.
Now all of the above is not possible, so please either provide new API, or allow the access to the old API framework in the meantime!!!
Twitch programmer are removing to many old existing functions without replacing them with anything, this is really starting to break too many working things and disrupting functionality and workflow. Many streamers I know are getting pushed to look for alternatives.
Please hear us and remedy the problem. -
This_is_Daan
commented
Here are two suggestions that could help address some of the concerns.
Interactive embed support for clips:
Allow developers to have greater control over clip playback, including duration, content warnings, and video controls.Direct access to MP4 URLs:
Provide a way for developers to access MP4 URLs directly, subject to appropriate rate limits and permissions. -
AmberGambEXE
commented
Need this with extreme haste as since twitch have broken the "thumbnail url to mp4" workaround, my entire editing workflow is completely broken with no alternative in sight.
The new "My Clips" page is so useless and clunky for downloading clips in bulk, the Highlighter doesn't show all clips, most clips now have some form of audio/video desync, some clips are disconnected from their VODs meaning I can't even get timecode information for clip chronology organisation.
This new update to the API has broken everything and added nothing! Please for the love of everything fix this Twitch! At least allow us access to the old API framework or SOMETHING in the meantime????
-
Durss
commented
Adding another 2 cents, I have countless users complaining about playback issues since I switched from mp4 to twitch embed.
Image lags a lot, sometimes freezes while audio continues, ending up with audio/video being desync.
And of course depending on the loading speed, clip is sometimes closed before playback completes because I auto close it after the exepected clip duration +2s of margin which isn't always enough due to lags. My overlay really doesn't do much so there's very low chance playback issue comes from anything else but the embed itself.Basically, showing clips on stream is kinda dead for many people now.
It might be due to OBS browser being +3 years old, or might not. Dunno.
OBS will finally upgrade to newest version probably in the coming month which may solve this issue, or not ¯\(°_o)/¯. -
Calophi
commented
I have my own twitch clip shoutout implemented in a browser source on obs because I was tired of losing functionality of third party clip players. But now recent clips are not working with the jpg/mp4 switch I was using previously. It's a huge bummer. Inline i-frames are a terrible practice, please give us better options.
-
TekNeil
commented
Imperative that this is (Re)implemented, many applications (Such as the best around-MixItUp) using overlays etc are now broken for what must be a pretty large amount of content creators.
-
SaviorXTanren
commented
To add to this, we have a similar use case of showing clips for both the streamer and specific users dynamically via our Overlay functionality, but newer clips don't support a way to get a video URL that can be displayed on a non-interactive page (EX: A web browser source in OBS Studio).
Ideally, we would love to allow you to get a download link to **ANY** clip as long as the clip is allowed to be downloaded (permissions, etc.), but we'll take a minimum the ability to download clips only made by the streamer.
-
Lyliya
commented
Same issues as Teklynk here. I have a project that rely on getting twitch clip url. Sad to see the new enpoint does not support those options, with no alternative on embed clips. Having video event like loading / playing / ended on embed would be awesome at least
-
SmartASCII
commented
Chipping in! My use case, like others, is pulling the URL for a rotating clip player for an overlay.
-
Teklynk
commented
I just wanted to add some context and clarity to the issue.
We used to be able to parse the thumbnail_url, remove the -preview-480x272.jpg and add .mp4 to it to get the clips mp4 url. This no longer works with the new thumbnail_url's.
Examples:
Old url: "https://clips-media-assets2.twitch.tv/XXXXXX/AT-cm%7XXXXXXX-preview-480x272.jpg"New url: "https://static-cdn.jtvnw.net/twitch-clips-thumbnails-prod/XXXXXX/XXXXXX/preview-480x272.jpg"
The old url still works with older clips however, clips created from this date no longer work using the new thumbnail_url's.
I have a clips player that is pretty heavily used by the Twitch community. I think my only workaround solution is to skip/ignore any clips that use the new thumbnail_url. This means that any new clips will no longer get played in my clips player. This will affect the creators since the clips player will not show new clips from the creators.
-
BigBaaladon
commented
Twitch is lame as fk for this .
i’m a content creator + you’re fkn with my business. This is ridiculous ! Y’all are just trying to make things harder on us .This Stream Kit app helps people who may not be the most technical savvy . Why would you impede on our way to create ? what type of shxt is that
-
SpikeyDerFuchs
commented
Wouldn't it be at least a compromise to allow fetching the mp4 link via the API if you submit a bearer token by either the streamer or one with the editor role of the channel. So exactly those users that are allowed to directly download the clips and VODs from the dashboard anyway.
-
LH147
commented
Passed more than 8 years since announcing clips and there is still no official endpoint for downloading clips.
More than. The last Twitch update requires token to get mp4 source for new clips. And of course only via inner graphql api that can't be used. -
Durss
commented
I agree on this.
Basically most clips overlay are kinda dead after this update.We can technically use the embed but it comes with the UI showing up a few seconds at the begining hiding part of the content, and we cannot know when clips starts or end accuratly to sync show/hide in the overlay.
Best we can do is wait an arbitrary amount of time after iframe loading completes, wait for the clip duration loaded from the API, and hop for no lag during playing and no much delay before start so it's kinda synced.But most importantly, there's the content classification layer with the "start watching" CTA blocking playback that we can't even know if it will be there or not in advance.
I guess we'll never get a way to bypass the later and that this at least partly motivated the clip's storage change preventing us from getting the MP4. But it should at least come with a flag on the /clip API letting us know if this clip's autoplay will be blocked by a the content classification layer or not.
TLDR; If getting the MP4 is out of consideration, we'd at least need a JS API to get playback notifications, ideally also a JS API to control playback/audio, get a flag to completely hide the player's UI, and get a way to know in advance if a clip autoplay will be blocked by the content classification layer.
-
TheBlackParrot
commented
Adding a comment here mentioning that the workaround @deanpcmad mentioned a few years ago no longer works (for web content! using the link in any other way still works) as of the recent clip frontend update a few days ago. This broke my shoutout/clip overlay.
I *can* proxy downloading clips through the URL workaround through my own server to get around CORS, but that's a whole can of worms I really do not want to open.
I really, *really* do not want to use anyone else's clip overlay as they're all incredibly invasive, occasionally showing clips I've *deleted.* I made my own in protest just because that bothered me so bad.
Just let me have a raw download link, man. Or give us interactable events in the clip embeds. *SOMETHING*
-
GitagoGaming
commented
I would also like to see the option to indicate how long of a clip you would like to create.. 15 seconds, 30 seconds, 45 seconds, or 1 minute would be great to have
-
Freso
commented
Just wanted to link this for getting direct URLs for VODs, since it might be of interest to people who are also interested in getting direct clip download links. :) https://twitch.uservoice.com/forums/310213-developers/suggestions/41560489-extend-videos-api-to-allow-editors-and-above-to
-
deanpcmad
commented
Although an MP4 link would be handy, you can generate it yourself by taking the clip thumbnail and adding mp4 to it. Like so:
https://clips-media-assets2.twitch.tv/AT-cm|CLIPID-preview-260x147.jpg
to
https://clips-media-assets2.twitch.tv/AT-cm|CLIPID.mp4