Extracting transcripts and insights from videos in Python

Published on

Heads up! This information might be outdated since it was last updated over a year ago. Please double-check the information before relying on it.

Compared to YouTube from Google, and Twitch from Amazon, Microsoft’s experiments with media have been… ill-feted in the past. From the shuttering of the Zune service in 2012, and the closure of the Mixer streaming service in July 2020, the track record doesn’t look great.

But - Microsoft actually has a powerhouse of services for managing and handling video in the cloud. Enter Azure Media Services Video Indexer - a service which brings together the whole gamut of Azure Cognitive Services, including translation, and Computer Vision.

In the UK, we’re still in lockdown due to the pandemic - so I’ve been trying to think of ways to help people stay connected, without burning out. This led me to work on a social video project to allow people to upload videos from their phone, automatically transcribing and posting them to teams.

In the course of this project (more detail of which will be in a forthcoming blog post series, around deploying Python Web Applications to Azure) - I realised that the Python SDK for Video Indexer is a bit lacking. I found a great package by BK Lim, but there isn’t an official SDK.

A social video project I’ve been working onFor most purposes, BK Lim’s library would be great, but with the number of queries and callbacks I expected, being able to run the library asynchronously for me was a must.

aio-videoindexer allows you to use Azure Media Services in Python

I thought it might be useful for others, so I’ve spun the library out into a package on PyPy.

aio-videoindexerAn async video indexer package for querying Microsoft Media Services Video Indexer in Python.PyPIThis doesn’t implement the full range of the Video Indexer Operations API, but for uploading from blob storage, getting video display widgets, and listing out video information - this should be a good start!

I’ve added basic documentation to ReadTheDocs, and you can see this package in action in the Teams-Vid repository. In an upcoming blog post, I’ll show how Video Indexing can be used to power a social video application made with Python.

A list of uploaded videosSealjay-clj/teams-vidWeb application for mobile and desktop to quickly post videos for your team. Demonstrates Starlette, and Azure Media Services Video Indexer. Lets people record themselves on the fly, to stay in syn…GitHubSealjay-cljTODO: Add social tile. TODO: Add captions.