Automating video editing with Python

Automating video editing with Python

This short article is meant to focus on some specific aspects of automation, video editing and Vimeo’s API, thus I won’t spend any time on the Python basics. I will focus on the few bits and bobs that I found challenging and I think are interesting to share.

I recently had to solve an automation issue, where the client’s desire was to automatically generate hundreds of videos putting side by side a “base video” with a video picked from a list of hundreds. Whilst this could have easily been done by hand with one big effort, the project was an ongoing one, and the number of videos to generate was growing daily. For this reason, I decided to write a small script using Python and ffmpeg that would automatically generate and upload these videos to the client’s Vimeo channel.

This short article is meant to focus on some specific aspects of automation, video editing and Vimeo’s API, thus I won’t spend any time on the Python basics. I will focus on the few bits and bobs that I found challenging and I think are interesting to share.

Preparation

Preparation in an automation job is essential, even more when you’re trying to harvest information from the files themselves. For this reason, I set some ground rules for the video files the script would have dealt with and asked for these to be conformed. The final decision for the file naming was the following:

index_artist name_provenance.extension

With these three simple pieces of information I would have been able to keep track of the videos that had already been generated and customised title and description on Vimeo using the provided metadata. I used the underscores as data separators, and then used the neatly separated data stored in a list whenever it was needed.

automation videos editing api python

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Top 10 API Security Threats Every API Team Should Know

Learn what are the most important API security threats engineering leaders should be aware of and steps you can take to prevent them

Public ASX100 APIs: The Essential List

The method used for this initial research was to obtain a list of the ASX100 (as of 18 September 2020). Then work through each company looking at the following

A Simple Guide to Planning API Roadmaps

APIs - the current “big thing” - offer the opportunity for modern organizations to unlock new and lucrative business models. The article below covers some tips on how to spin the API flywheel and leverage its possibilities. 

What Are Good Traits That Make Great API Product Managers

What is API product management and what can you be doing to be a better API product manager — get aligned with SaaS and enterprise software requirements. This guide lays out what is API product management and some of the things you should be doing to be a good product manager.

54% of Developers Cite Lack of Documentation as the Top Obstacle to Consuming APIs

APIs are perceived as reliable—more than half of respondents stated that APIs do not break, stop working, or materially change specification often enough to matter.