aio-videoindexer¶
Overview¶
An async video indexer package for querying Microsoft Media Services Video Indexer in Python.
See also
See the original application this package was forked from.
Install the package from pip with
pip install aio-videoindexer
Subscribe to the video indexer API: https://api-portal.videoindexer.ai/
Log into your video indexer account: https://www.videoindexer.ai/account/login
Warning
This package is in active development, and documentation and examples are missing throughout the application.
Setup Example¶
Here is an example of the package in use:
from asyncvideoindexer import AsyncVideoIndexer
VIDEO_INDEXER_ACCOUNT_ID = "your-account-id"
VIDEO_INDEXER_KEY = "your-account-key"
VIDEO_INDEXER_ACCOUNT_LOCATION = "your-account-location"
async def get_video_indexer():
video_indexer = await AsyncVideoIndexer.AsyncVideoIndexer.create(
VIDEO_INDEXER_ACCOUNT_ID,
VIDEO_INDEXER_KEY,
VIDEO_INDEXER_ACCOUNT_LOCATION,
)
Main Class¶
A class for interacting with Video Indexer using asyncio. Does not implement all API facilities.
-
class
AsyncVideoIndexer.
AsyncVideoIndexer
[source]¶ A class for interacting with Video Indexer using asyncio.
-
async classmethod
create
(account_id, subscription_key, location, get_access_token_on_startup=True)[source]¶ Acts as the __init__ method. This triggers W0201. Using an @classmethod rather than __init__ in order to init async.
-
async
get_thumbnail
(video_id, thumbnail_id)[source]¶ Returns the thumbnail content for the provided video ID.
-
async
get_video_access_token
(video_id, allow_edit=False)[source]¶ Gets a bearer token for accessing an individual video.
-
async
get_video_id_by_external_id
(external_id)[source]¶ Gets the Video Indexer ID using an externally provided ID.
-
async
get_video_insights_widget_url
(video_id, video_access_token, allow_edit=False)[source]¶ Gets the video insights Widget, as well as whether users should be able to edit.
-
async
get_video_player_widget_url
(video_id, video_access_token)[source]¶ Gets the video player widget.
-
async
upload_video_from_url
(video_name, video_external_id, callback_url, video_url)[source]¶ Instructs Video Indexer to ingest a video from provided URL.
-
async classmethod