I've been trying to find a way to upload files to the Azure AI Video Indexer from OneDrive for Business, but I keep on hitting road blocks.
This page suggests you can: https://learn.microsoft.com/en-us/azure/azure-video-indexer/odrv-download but it is for the personal version of OneDrive.
Ideally, I'd like to use the VI API and specify the URL of a (shared) video in my OneDrive for Business account.
I tried a number of things to get this to work (ie. Power Automate, Logic Apps), but I managed to successfully transfer files from OneDrive for Business to an Azure Storage account with an Azure Data Factory, and then Video Indexer can access them fine.
You can't simply supply the OneDrive for Business downloadUrl to Video Indexer, as the downloadUrl link is temporary and the Video Indexer will timeout and fail (I think it is available for one hour). The video file needs to be transferred to Azure Storage as a Blob Block first.
Using the process below, I have been able to transfer huge files (the largest I tried was 10Gb) from OneDrive for Business and make them available to Azure AI Video Indexer.
The process I followed was:
Create a App Registration with access to your OneDrive for Business. https://www.youtube.com/watch?v=Z1xFjmttEvY
Create a Data Factory in Azure.
Use the Microsoft Graph API to get an Access Token (link from 1.) with a "Web" activity.
Get the downloadUrl for the file you want to transfer https://learn.microsoft.com/en-us/graph/api/driveitem-get-content?view=graph-rest-1.0 with a "Web" activity (no need to supply authentication).
Use a "Copy data" activity with HTTP as the source binary and Azure Storage as the sink.
Now you can use the functionality of Data Factory, other Azure logic, and Video Indexer to automate your video indexing workflow.
You can read more about the process here: https://datasavvy.me/2021/12/07/copying-large-files-from-sharepoint-online/
In addition, here's the problems I had with other options I tried:
The Power Automate OneDrive for Business connector only handles files up to 500Mb.
The Power Automate HTTP functionality only handles 100Mb at a time, and with chunking the limit is 1Gb (and you have to write the logic yourself).
There are similar limitations and issues with Logic Apps.