Skip to content

Latest commit

 

History

History
85 lines (51 loc) · 2.54 KB

README.md

File metadata and controls

85 lines (51 loc) · 2.54 KB

Videographer

Build and Test

This project is licensed under the terms of the MIT license.

Videographer is an application allowing creation of overlay telemetry data onto sport videos.

At the moment it supports .fit files generated by Garmin devices.

Videographer was tested on GoPro Hero 12 videos and Garmin Edge 830 produced .fit files.

For best results use instructions below how to build a project, to satisfy dependencies I recommend checking GitHub actions setup.

Examples

Example screenshots from test video: YouTube - NeriMTB

Example 1

Example 2

Building and testing

  1. cmake -B build generate cmake files to build directory
  2. cmake --build build --target vgraph build main binary
  3. build/vgraph -h see usage arguments
  4. cmake --build build --target vgraph_test build unit tests
  5. build/vgraph_test run unit tests

Pipeline

  1. Gather video clips (.mp4) and telemetry file (.fit) to be used

  2. Concatenate video clips

    example ffmpeg command: ffmpeg -f concat -safe 0 -i mylist.txt -c copy output.mp4

    with mylist.txt content:

    file '/path/to/clip/1.mp4'
    file '/path/to/clip/2.mp4'
    file '/path/to/clip/3.mp4'
    
  3. Trim concatenated video

    example ffmpeg command: ffmpeg -ss 00:00:30.0 -to 00:01:00.0 -i input.mp4 -c copy output.mp4

  4. Run generator in alignment mode (see instructions below) to determine telemetry offset

  5. Run generator app to generate final video

    for YT - use upscale to 4K and 80mbit/s bitrate (-r 3840x2160 -b 80000)

  6. Upload video

Dependencies

TBD - partial dependencies below

Packages required in system to build the application

  • CMake >= 3.23
  • Make / Ninja
  • GCC >= 14.x
  • gstreamer >= 1.24
  • cairo
  • pango
  • pugixml

For testing

  • googlemock

Alignment Mode

Basic usage based on speed visible on video:

  1. run generator with --alignment to generate alignment clip (can also use --clip-time to change default 60s duration of alignment clip)
  2. open video in your favorite video player and find exact frame at which speed changes
  3. locate data frame with same speed change in alignment data and remember the OFFSET
  4. use that OFFSET as input for main application to align the overlay