I have been using Video Indexer API to upload video from my application for some time now, and since yesterday I start encountering the INVALID_INPUT
error.
Here's how I am calling the POST upload API in Python:
vi_location = 'southeastasia'
vi_account_id = 'some-account-id' # replaced with actual account ID
video_language = 'en-US'
name = 'test-video-name'
access_token = 'some-access-token' # replaced with actual access token generated with AccessToken endpoint
params = {
'streamingPreset': 'Default',
'indexingPreset': 'DefaultWithNoiseReduction',
'language': video_language,
'name': video_name,
'accessToken': access_token
}
files = {
'file': open('some-file-name.mp4', 'rb')
}
upload_video_req = requests.post('https://api.videoindexer.ai/{loc}/Accounts/{acc_id}/Videos'.format(
loc=vi_location,
acc_id=vi_account_id
),
params=params,
files=files
) # here's where it generates the error message
Here's the message generated from the API response.
{"ErrorType":"INVALID_INPUT","Message":"Indexing preset \'DefaultWithNoiseReduction\' is invalid. Trace id: \'5086aa05-14d3-4f9a-928e-c2159a14705e"}
Based on the documentation, the allowed values for indexing preset is as followed:
The indexing preset to use. Allowed values: DefaultWithNoiseReduction/Default/AudioOnly/VideoOnly/Basic/BasicAudio/BasicVideo/Advanced/AdvancedAudio/AdvancedVideo
I have tried 2 things:
- Add the
Ocp-Apim-Subscription-Key
in the request headers, previously doesn't seems to require if I were to pass in the access token - Switching
DefaultWithNoiseReduction
toDefault
and that seems to allow the API call to go through, however, it then shows an error in indexing the video after.
Manually uploading the video via the console/dashboard seems to work, so it could be just the API endpoints that are having some issues.
Any help will be greatly appreciated!
Update 2021-02-01: Seems like changing the indexing preset to Default
works now. However, the issue with DefaultWithNoiseReduction still persists.