csom – SharePoint thumbnail retrieval options

I’m looking into options for retrieving thumbnails from SharePoint Online for an external .NET application using the SharePoint client object model (CSOM).

I’ve seen the following suggestion which apparently works for many files types (Word, Excel, PowerPoint, MP4), but I am experiencing many instances where it isn’t working, even for images.

https://tenant.sharepoint.com/portals/hub/_layouts/15/getpreview.ashx?path=https%3A%2F%2Ftenant.sharepoint.com%2Fportals%2Fcommunity%2FpVid%2FBiking%2520to%2520Work.mp4

Could anyone explain why the above URL isn’t working for various file types? Is it something to do with how the library has been setup? The content type?

Another option I’ve come across when browsing a SharePoint library and changing the view mode to Tiles is that the thumbnails come from another URL

https://centralus1-mediap.svc.ms/transform/thumbnail?provider=...&inputFormat=...&cs=...&docid=...&access_token=...&width=...&height=...&srcWidth=...&srcHeight=...&cropMode=...

I’ve not found any documentation for this URL. Has anyone come across this URL before? Is it possible to access from an external application?