Videoflo is series of Python scripts to help automate the YouTube video production workflow in DaVinci Resolve. Go here to learn more about Videoflo.

Installation

The following section will explain how to install Videoflo on your computer. This is a one-time process.

Requirements

Videoflo should work with most modern versions of Mac, Windows, and Linux. You will also need the following software installed on your system.

Download

Download Videoflo with the following command.

cd ~/
git clone https://github.com/tonyflo/videoflo.git

This will download Videoflo into the ~/videoflo/ directory.

Packages

You will need to install some Python package via pip which allow Videoflo to work.

It is recommended that you use a Python virtual environment. For Mac/Linux users for example, you can do something like this:

python3 -m venv ~/env/vf
source ~/env/vf/bin/activate

Then install the following packages to this virtual environment.

pip install configparser requests oauth2client
pip install google-api-python-client google-auth-oauthlib google-auth-httplib2

When you want to use videoflo, always activate your virtual environment first:

cd ~/videoflo
source ~/env/vf/bin/activate

Tip: You can add an alias to your shell’s rc (run commands) file. Common rc files are .bashrc and .zshrc which are located in your Unix-like home directory. Add the following line to your rc file.

alias vf='cd ~/videoflo/; source ~/env/vf/bin/activate'

Then in the future when you want to use Videoflo, all you have to do is type vf in your Terminal.

Configuration

Open the settings.ini file and provide the full path to where you keep your video projects. Here’s an example.

[main]
root_dir = /Volumes/vid/channels/

If you have multiple YouTube channels, it is recommended to create subdirectories for each channel. For example, I have 3 channels, so the following directories exist on my system.

Optionally, if you will generate any screen recordings or screenshots during the research or filming phase, please specify the path where your screen recordings and screenshots are saved. Notice how the screens settings below uses an asterisk as a wildcard character to match any filenames that start with “Screen”. This is the default naming convention for QuickTime Player which is the recommended way to capture screen recordings and screenshots.

[main]
...
screens = /Users/tonyflorida/Desktop/Screen*

For each one of your channels, add a section in your settings.ini file. You will need at least one section, but can have as many sections as you have channels. Pick a short, memorable name for your section name as you will use this name to distinguish your channel on the command line. In the snippet below, the section for Tony Teaches Tech is named [ttt].

[ttt]
name = Tony Teaches Tech
path = tony-teaches-tech
schedule = 1,2,3,4
timeline = /Volumes/vid/assets/tony-teaches-tech/Timeline1.drt
description = /Volumes/vid/assets/tony-teaches-tech/yt-description.txt
framerate = 24
width = 3840
height = 2160

A description of each configuration option follows.

MacOS Tags

If you are using a Mac computer, Videoflo will tag your video project directories according to their status in the production workflow.

Please install the following packages to enable this feature. You will need to install brew if you don’t already have it.

pip install mac-tag
brew install tag

For Mac users only as a one-time setup, open a Finder window, go to Finder > Preferences, and add the following tags. The colors don’t matter too much, but make sure you have the exact text for each tag.

How to Use Videoflo

In addition to an initialization script called init.py, Videoflo contains 7 Python scripts in that allow you to automate various aspects of video production from idea to publishing.

  1. new-video.py
  2. ready-to-film.py
  3. done-filming.py
  4. edit.py
  5. finish-edit.py
  6. render.py
  7. upload.py

The following is an overview of how those scripts fit into the video production workflow.

Note: In the examples below, please replace the -c argument with the name of your channel section in from your settings.ini file.

0. Initialize Videoflo for Your Channel

Sign up for a free Trello account if you don’t already have one. Create an empty board in Trello. This board is where Videoflo will keep track of your video projects for this channel. I named my Trello board Tony Teaches Tech after my YouTube channel of the same name.

Next, initialize Videoflo with your Trello board. In the example below, the  -c argument of ttt comes from my settings.ini file.

python init.py -c ttt

The first time init.py is run, a browser window will open asking “Would you like to give the following application access to your account?“.

Click the Allow button, and on the next page, copy the token and paste it into your command window.

Select the Trello board associated with your channel by typing the number associated with it and hitting Enter on your keyboard.

Videoflo will automatically create lists on your Trello board for each stage in the video production process if they don’t already exist.

At this point, you have successfully initialized Videoflo with Trello for this channel. Feel free to repeat this process for other channels that you may have.

1. Create the Directory Structure for Your New Video Idea

At the inception of an idea for a video, use new-vid.py to create the basic directory structure to house your future video files, assets, thumbnails, etc. The name of the directory in the example below will be my-first-video.

python new-video.py my-first-video -c ttt

Based on the configuration setting example above, this will create the following directory for your video project /Volumes/vid/channels/tony-teaches-tech/my-first-video/. If using Mac, this directory will be tagged with a Script tag.

In this directory, a camera subdirectory will be created. This is where you will eventually copy your camera’s video file for this project.

This will also create an empty notes.txt file in this directory. You can use this as a place to put an outline for your video or other relevant notes.

Additionally, a new card will be added to the Script list in Trello as can be seen above. The due date for this card will be set as the next available date based on the release schedule you defined in your settings.ini file for this channel. The due date on the card corresponds to the date and time in the future that you want the video to be published on YouTube.

For example, let’s say you publish videos every Tuesday at 7:05 PM. If the Trello card with the latest due date is January 12, 2022 at 7:05 PM, then your new Trello card will be assigned a due date of January 19, 2022 at 12:30 PM. If this is your first Trello card, then it will default to a week from right now.

2. Research and Plan

Keyword Research

With an idea in your head, it is best practice to do some keyword research for your video topic. This will not only help you determine the final title and description for your video, but also point you in the right direction for general research on the topic.

Based on your research, put the title and description of your YouTube video as the title and description of the new card in Trello. Additionally, put relevant tags from your keyword research in the tags checklist on the card in Trello.

If you don’t have all of this information yet, that’s okay. You can add this information anytime before uploading; however, it’s highly recommended that you put some serious thought into this as early as possible.

Trello card created by Videoflo with a title, description, due date, tags, and hashtags that correspond to a YouTube video

Also note that the due data for the card will be the date and time that the corresponding video will be scheduled to be published on YouTube.

Hashtags will be appended to your video description at the end on a line of their own. These should not contain any spaces or special characters and are optional.

Plan Your Video

Now that you know exactly what your video is going to be about, do the necessary research for it.

You can make a simple outline or write a script in notes.txt. If you need more flexibility than a plain text file, feel free to link a Google Doc to your Trello card as an attachment.

After you have written a script or outline, use ready-to-film.py to update the state of the video.

python ready-to-film.py my-first-video -c ttt

If you specified a location for screen recordings and screenshots in settings.ini, this script will move these to a screen folder in the root of your project directory.

The Trello card for this video will be moved to the Film board indicating that the video is ready to be filmed. If using Mac, this directory will be tagged with a Film tag.

3. Shoot the Video

Set aside some time and plan to film multiple videos in the same day. This not only is more efficient, but also allows you to take full advantage of the batching capability of Videoflo.

After filming each video, use done-filming.py to update the state of the video in Trello.

python done-filming.py my-first-video -c ttt

If you specified a location for screen recordings in settings.ini, this script will move these to a screen folder in the root of your project directory.

The Trello card for this video will be moved to the Edit board indicating that the video is ready to be edited. If using Mac, this directory will be tagged with an Edit tag.

4. Edit the Video

Use edit.py to create a DaVinci Resolve project for your video. This will import all media files from this project’s directory into the Media Pool.

Note: You’ll need to first manually copy your camera’s video files from your SD card into the camera subdirectory for each video project before executing this script.

Another Note: It’s very important that you have DaVinci Resolve open before executing the edit.py script or else it will fail.

python edit.py my-first-video -c ttt

This script will also import an optional timeline file for the channel that you specified in settings.ini.

5. Finish the Edit

When you’re satisfied with the edit, use finish-edit.py to export the DaVinci Resolve project as a .drp file to the root of your project directory.

python finish-edit.py

Make sure you execute this script when you still have the project open in DaVinci Resolve. There is no need to specify the -c argument for this.

Note: It is recommended to have ‘Live Save’ enabled in DaVinci Resolve; otherwise, the project export will fail if you haven’t saved your project. You can enable this by going to DaVinci Resolve > Preferences > User > Project Save and Load > Save Settings and checking the ‘Live Save’ checkbox.

The Trello card for this video will be moved to the Render board indicating the the video is ready to be rendered. If using Mac, this directory will be tagged with a Render tag.

Feel free to repeat these steps for all videos that you are currently working on.

6. Render

If you have multiple video project that you are working on simultaneously, you can render all projects (overnight for example) after your finished editing them all. You can do this with the render.py script which will find all video projects that are in the Trello Render list for a particular channel and render them one after the other.

The render settings specified for the channel in settings.ini be used here.

Please make sure DaVinci Resolve is open, or else the script will fail.

python render.py -c ttt

Each rendered video will be saved to the root of the project directory.

After each video is rendered, the Trello card for that video will be moved to the Upload board indicating the the video is ready to be uploaded to YouTube. If using Mac, this directory will be tagged with an Upload tag.

Note: If you would like your video file to be named something else, this is a good time to change the name of the .mov file. It’s understood that YouTube uses the filename of your video file as an additional indicator to determine what your video is about, so it’s important for SEO purposes to name it accurately and not video1_final.mov for example.

7. Upload to YouTube

Use the upload.py script to upload all rendered videos for a particular channel to YouTube.

python upload.py -c ttt

Before uploading, this script will make sure that you have the following for each video:

Note: The first time you upload a video to a channel with Videoflo, you will need to authorize Videoflo to access your YouTube account. Learn more here.

After each video is uploaded, the Trello card for that video will be moved to the Scheduled board indicating the the video is scheduled to be published. Attachments will be added to the card that link to the video in YouTube studio and the video itself.

If using Mac, this directory will be tagged with a Backup tag indicating that the project directory for this video can be backed up.

In YouTube Studio, you can confirm that titles, descriptions, tags, and scheduled dates are set accordingly for each video that was uploaded.