Tutorial: Overlay Blackbox Data (TX Sticks) in FPV Videos

Many people have asked how I overlay sticks movement onto my FPV videos, so in this short tutorial I will show you how I do it.

Good things about overlaying sticks to your FPV videos are not only to show off your stick banging skills, you can also teach people how you do certain tricks. More importantly I think it’s an excellent way of self-reflection, to see how your fingers react to different situations and how you should improve on your sticks control.

You can overlay a bunch of different flight data including PID and motor outputs in your video.

overlay-blackbox-data-stick-fpv-video-lots-of-data

Or you can just overlay your sticks movement.

overlay-blackbox-data-stick-fpv-video-only-sticks-tx

Requirement for Joy Stick Overlay

Get Blackbox Working on Your Quad

I have a detailed tutorial on how to setup Blackbox. I would personally recommend using a OpenLog recorder for this. The onboard flash memory on the flight controllers are handy for short flights and tuning, but when you need to record multiple long flights, having to export the data every few minutes is tedious. I use a 16GB SD card and it will never run out of space.

If you use Naze32 or CC3D with Betaflight, you might see loss of data in the log. Because the looptime is so low, blackbox sometimes has trouble catching up, and I found disabling ACC helps.

I cannot stress enough how useful Blackbox is, I actually use it for PID tuning as well.

Video Editor: Supports Import Image Sequence and Footage Overlay

You will also need a video editor that supports “Import Image Sequence”, which mean it should be able to take a sequence of pictures, and turn them into a video. That’s because the Blackbox Render Tool exports the flight data in the format of a series of transparent images (as oppose to a video file).

Your video editor also needs to be capable of video overlay, which allows you to put footage on top of another. By the way I am using Adobe Premiere Pro CS6. For a free editor, you can try DaVinci Resolve. GoPro Studio and Windows Movie Maker cannot put video on top of another, so they won’t work.

Rendering Blackbox Data

Get the Decode and Render Tool from Github first.

The Blackbox Decode and Render tools aren’t the most user-friendly software. You need to operate it through Windows Command line so if you are familiar with CMD this should be straight-forward for you. But if not, it’s not end of the world, you only need to know a few commands and parameters to work it.

Decode tool is not required, so I will only talk about the render tool.

So How to Use the Render Tool?

Here is our Blackbox log file. For example I put it in my D drive, in a folder called “blackbox-files”.

overlay-blackbox-data-stick-fpv-video-log-file-location

Here is where I unzipped the render tool application files, also in D drive, in a folder called “blackbox-tools”.

overlay-blackbox-data-stick-fpv-video-render-tool-location

Now click “Run” in your Start menu (or press the windows key + R), and type in “cmd” (without double quotation mark) to bring up the command line window.

Change the Drive letter to D drive, and go to the directory where the render tool is located. See below, the red text are what I entered.

C:\Users\oscar>
C:\Users\oscar>d:
D:\>cd D:\blackbox-tools\

overlay-blackbox-data-stick-fpv-video-cmd-go-to-render-tool-directory

Now you should be good to go. Type in the command to render your BB log. Here is an example.

To plot everything including PID, you can do the following. Almost everything is on by default except PID, so you need to specify it in the option if you want to include that in your graph (see “–plot-pid” in the command).

"D:\blackbox-tools\blackbox_render.exe" --plot-pid "D:\blackbox-files\LOG00151.TXT"

There are 3 parts to the command:

  1. first part (green) is the location of the render application, change it in your case, keep the double quotation mark
  2. second part (red) are the options. They are explained pretty well in the Github documentation.
  3. third part (blue) is the location of your blackbox log file, , keep the double quotation mark

Here is another example command where I only want to render the stick movement:

"D:\blackbox-tools\blackbox_render.exe" --fps 60 --no-draw-pid-table --no-draw-craft --no-draw-time --no-plot-motor --no-plot-gyro "D:\blackbox-files\LOG00151.TXT"

You can see in the command, I am turning off everything that is on by default, but sticks. Note that I am also telling the program to convert it to 60fps (–fps 60), so that it matches my FPV video frame rate (which is recorded at 60fps).

overlay-blackbox-data-stick-fpv-video-cmd-render-command

Rendering takes about 5 mins for a 1-minute flight on my computer. When it finishes you should see something like this.

overlay-blackbox-data-stick-fpv-video-cmd-render-command-finish

Now if you go back to the folder where your blackbox log is, you should find a folder containing thousands of images. These are the rendered blackbox images we will be using. One picture is 1 frame in the video.

overlay-blackbox-data-stick-fpv-video-rendered-png-image-files

Overlaying Blackbox Data on your Video

I won’t go into detail in this part, as most likely it would be different from one video editor to another, but the way it works should be similar. If you are not sure how to do this, I suggest looking it up on Youtube, there should be tons of tutorials on how to do this for every major video editor.

Import Image Sequence

In your video editor, import the PNG image files we just generated from the Blackbox Render Tool, and they should appear as a video. Make sure you adjust the frame rate (FPS) to match the number you set ealier when you rendered them (if you didn’t, it’s by default 30).

Overlay Sticks on FPV video

Now, you can overlay the footage of blackbox data on top of your FPV video, and you should be able to adjust the position and size of the sticks.

Synchronisation of Blackbox Data and FPV Video

And finally you need to make sure both videos are in sync. Easiest way I found is by matching the start of the log with the arming beep from the buzzer (the start of the audio)

In the beginning of the blackbox log you will find a vertical bar moving across the screen.

overlay-blackbox-data-stick-fpv-video-video-editor-synchronise-adobe-premiere

Results

Here are some examples I have done.

5 thoughts on “Tutorial: Overlay Blackbox Data (TX Sticks) in FPV Videos

  1. laflaf3d

    boring github… I never find the release. Can someone help me to find the render_tool’s release please ? I see only sources on github :-(

    Reply
  2. Scott.

    I’ve been doing something very similar to this, and was actually porting this over to windows to try a new video editor (I use blender currently) and saw your new post.

    It was easy enough to add the “C:\Program Files (x86)\blackbox-tools-0.4.2” to the PATH variable and then add the following contents to a file (cmd/bat) located in the blackbox tools dir. From there just run your new file my_blackbox_render or whatever you named it.

    blackbox_render ^
    –fps 60 ^
    –no-draw-pid-table ^
    –no-draw-craft ^
    –no-draw-time ^
    –no-plot-motor ^
    –no-plot-pid ^
    –no-plot-gyro ^
    –index %1 ^
    %2

    good bit of info!

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

Are you Robot? *

I only check blog comments once or twice a week, if you want a quick reply you can post your question on this forum IntoFPV.com... You might get a faster response from me there (multirotor related only).