Here are a bunch of scripts that I created some time ago as a proof of concept that Betaflight blackbox gyro data can be converted to GoPro Metadata Format (GPMF) and embedded into a MP4 file that is shot with non-GoPro camera.
The goal of this is that the file thus produced can be used in ReelSteady GO to achieve image stabilization (similar to GoPro HyperSmooth functionality).
There is a discussion here which gives some basic idea how the scripts can be used.
These scripts are not a finished product and if one wants to use them he'll have to dig in and modify them according to his needs.
Currently I don't plan to develop this project any further but I'm placing it here so that anyone who finds it interesting can base his own work on it.