Video plus data streaming with racecapture

Introduction

This guide shows you how to add video+data livestreaming to your existing RaceCapture system.

After following this guide, you will have:

  • 2-camera video with picture-in-picture
  • Rich graphics overlay in realtime
  • Broadcast to youtube or your preferred streaming provider via an in-vehicle cellular hotspot
  • Local video recording

Cost

The cost for adding video+data livestreaming to your RaceCapture system can range between 0 and 800 USD, depending on the parts you may already have on hand.

How hard is it to setup?

This project requires following setup instructions, including:

  • Installing an operating system
  • Typing computer commands
  • Plugging in cables
  • Editing configuration files
  • Selecting options in an application

This ability is within the realm of someone with moderate computer skills. If the instructions seem daunting, find someone to help you along.

  • For those who crave convenience, we will also be offering a pre-packaged setup that take care of most of the setup steps.

Is it reliable?

Since it is based largely on existing RaceCapture systems (RaceCapture hardware and RaceCapture app), the main parts of the system is very stable.

However, the newer components which needs more testing is the encoder/streaming agent and the dashboard video overlay.

As of this writing, the system has received about 12 hours of endurance racing testing. During this test we were very pleased with the stability and performance.

Here's the Session from the inaugural test (with sub optimal camera exposure and audio)

Provided ID could not be validated.

Experimental

While we consider this experimental - it is also a free software upgrade for a system that was never originally designed for this purpose.

With your testing help we can incrementally improve the system and ultimately provide an incredibly cost effective yet very full-featured and high performance system that rivals solutions costing upwards of $5000 USD.

Overview

System Diagram

A rendering & broadcast computer is added to an existing RaceCapture system to facilitate livestreaming.

Parts you will need

Your existing RaceCapture system

The RaceCapture system will provide access to your car's sensor data (CAN bus or analog sensors), high performance GPS, Accelerometer / Gyro sensors, lap timing and other motorsport related statistics.

Compatible Systems

  • Any current or previous RaceCapture or PodiumConnect system will work.

Racecapture pro mk4 connectors 1024.jpg PodiumConnect MK2 3quarter 1024.jpg Rct mk3 3quarter.jpg

Rendering/Streaming computer

A tiny form-factor computer is used to receive data from RaceCapture and is responsible for video+data overlay, encoding, and broadcasting the video to youtube or similar streaming platform.

Recommended

The Beelink SER5 is our recommended choice as it is powerful, cost effective, and is in a compact and lightweight form factor.

Beelink ser5 micro pc.jpg

Alternatives

A micro system with an Intel I5-6500 through I5-7600 + SSD + 8GB RAM is an acceptable option as well. This may be a system you already have or a surplus system you can get at minimum cost.

  • Look for these options:
    • SSD (required for ruggedness - smallest size is fine).
    • Smallest RAM option is fine (typically 8GB)
    • Included WiFi - for connection versatility

Candidates

  • Dell Optiplex 7050 micro desktop: Ebay search (nice because most have wifi)

Dell-optiplex-7050.jpg

HP-elitedesk-800.jpg

12v DC to DC converter

A 12v-19v DC to DC converter is needed to power the rendering/broadcasting computer in the vehicle. This converter avoids needing an AC inverter in the car, providing a clean installation.

  • Tips:
    • Choose a device that has sufficient power capacity (100W minimum)

Recommended

These have been tested to work:

KFD-100W-DC-to-DC-converter-12v-to-19v.jpg

  • Notes:
    • We recommend cutting the cigar lighter connection and hard-wiring the power to a 15A circuit. (center conductor is positive).

Cameras

You will need 1 or 2 cameras for capturing and rendering video.

Recommended (but not yet available)

Autosport Labs will soon provide a camera kit that provides high quality imaging, a waterproof compact form-factor, and the perfect 90 degree HFOV that offers just the right field-of-view without distortion.

Racecapture-streaming-camera.jpg

Alternatives

Most any USB camera (such as a webcam) can be used. These are commonly found on Amazon or Ebay.

  • Tips:
    • Logitech is a good, high quality option
    • Find a camera that offers a 1/4-20 threaded camera mount for a secure rollbar attachment to minimize vibration.

Microphone

A microphone is needed for capturing audio.

  • Candidates:
    • USB microphone - you can use a separate USB microphone, especially if you get one that offers higher quality.
    • Analog microphone - you can use an analog microphone that attaches to the front headset input of the micro PC. Make sure you get a microphone that has the 4-ring connector for proper operation.
    • Microphone embedded in one of the cameras - if one of your your cameras has its own microphone, you can use that as an audio source.

Hotspot/Router

Most any hostspot should work, but for the best performance and reliability, these options should be considered:

  • Hard-wired ethernet connection, for direct connection to the micro computer.
  • External antenna connection - a hotspot that offers external antenna will boost performance by allowing you to use a high-gain roof-mount antenna.

Setup

Connect a keyboard, mouse, and monitor to the rendering/streaming computer and prepare to install Ubuntu:

Install ubuntu 22.x

Download Ubuntu Desktop and install the image to a USB flash drive.

  • Install Ubuntu with the following options:
    • During installation, choose the option to download / install updates, including "non-free" software updates (which includes video drivers)
    • Choose the option to erase the hard drive and perform a complete install.
    • Select Automatic Login without password.
  • Notes To install, you will need to configure the system's BIOS to boot first from the USB flash drive.
    • Beelink: Repeatedly press 'delete' on the keyboard right after power up.
    • HP: Repeatedly press F10 after power up
    • Dell: Repeatedly press F2 after power up

After the installation is complete, the computer will reboot into the standard desktop.

Disable keyring popup

From the desktop: log out, and log back in using with the password you created during the installation step.

Then, Disable the keyring popup using these instructions. Observe the security notes in this guide.

  • Notes
    • The log-out/log-in step is important - don't skip it!
    • This step is important to prevent a popup dialog when the RaceCapture app automatically starts.

Run the installer

From the Ubuntu desktop, open a terminal and enter the following command, pressing <enter> after the line:

cuxrl -sL bit.ly/3RL9Yoj | bash

This will automatically install the RaceCapture app and video streamer, related software dependencies, and set up configuration file templates.

Reboot

Reboot the computer once it is complete with the installation. It should automatically launch the RaceCapture app.

Edit RaceCapture settings

Edit these RaceCapture settings for proper operation when streaming

App Preferences

Navigate to Setup / App Preferences:

  • set Fullscreen -> ON
  • Set Startup Screen -> Dashboard
  • Turn off Session Recording

Racecapture-video-data-livestreaming-app-settings.jpg

Dashboard Preferences

Navigate to the Dashboard, then press the gear icon in the upper right of the dashboard, select "More Settings" and set the following:

  • Turn off Pit stop timer

Racecapture-video-data-livestreaming-dashboard-settings.jpg

Plug in camera(s)

Plug in 1 or 2 cameras into the USB port

  • Note: Remember the ports the cameras are plugged into, and keep this consistent during use.

Plug in USB microphone

  • Plug USB microphone into a USB port

Configure Dashboard

  • Press Settings Gear Icon, go to More Settings / Camera Preferences

Select /dev/video0 for Camera1, and /dev/video2 for Camera2

Create a test dashboard

  • Press the Settings gear icon, select Add Gauge
  • create a video gauge, and select Camera 1 as the source.
  • Resize to fit the dashboard.
  • create another video gauge, and select Camera 2 as the source.
  • Resize to be the picture-in-picture video window.
  • Add additional gauges as you see fit, such as an analog speed gauge, track map, etc.
  • Note If the cameras are reversed, you can swap the camera mappings in the main dashboard settings under More Settings / Camera Preferences

Video Streaming / recording

Edit the video-config.ini file in your user's Desktop directory.

Streaming Key / URL

If using Youtube: Set the streaming key as provided by youtube. Or, you can specify a custom URL.

Local recording

Video files will be recorded in the user's Videos directory

Microphone

If using a USB microphone (recommended) use the default audio_device=1

Example default config file

[capture]
audio_device=1

[local_recording]
video_dir=$HOME/Videos

[streaming]
streaming_url=rtmp://a.rtmp.youtube.com/live2/<streaming key>         

Maintenance/Troubleshooting

Open a terminal window

To open a terminal window for troubleshooting:

  • Press ctrl+t then c

Log out

You can log out of the current session to access the original Ubuntu desktop to perform additional maintenance.

  • Press ctrl_t then :
  • Type 'quit' and press <enter>

Once you've logged out, you can log back into the Ubuntu desktop by pressing the gear icon in the lower right, and select Ubuntu.

To get back to the RaceCapture full-screen app mode, select "RaceCapture livestreaming" from this menu; this is the window manager that is configured to run RaceCapture in full-screen mode.