GoPro Video Sync
A tool to determine the offset between videos from two jointly mounted GoPros based on a combination of audio, accelerometer, and gyroscope data.
Installation
Install gopro-video-sync from PyPI:
pip install gopro-video-sync
Or from the source on GitHub:
pip install "gopro-video-sync @ git+https://github.com/evoth/gopro-video-sync"
The package will be installed with the module name gopro_video_sync.
Usage example
Print the required adjustment to sync videos from two jointly mounted GoPros:
from gopro_video_sync import gopro_offset
video_1 = "GOPR1569.MP4"
video_2 = "GOPR0105.MP4"
offset, source_1, source_2 = gopro_offset(video_1, video_2)
if offset is None:
print("Could not determine offset between the given videos.")
else:
offset = round(offset, 3)
if offset > 0:
print(f"Trim the first {offset} seconds of {video_1} to sync the videos.")
elif offset < 0:
print(f"Trim the first {-1 * offset} seconds of {video_2} to sync the videos.")
else:
print("Videos are already synced.")
How it works
Since I had wanted to sync videos from two GoPros that were mounted together, I realized that the gyroscope and accelerometer information from each should be identical. GoPros store sensor data inside MP4 files in a format called GPMF, developed by GoPro for this very purpose. So, this program extracts the GPMF data from each video file and uses cross-correlation to attempt to line up the videos.
If the individual offsets obtained from the gyroscope and accelerometer data do not agree, then the audio data is used in an attempt to verify one of the sensor offsets. If this does not work, then the offset can not be determined.
Metadata
Release files for gopro-video-sync 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gopro-video-sync-0.0.3.tar.gz | 9.0 kB | Without provenance | Details for gopro-video-sync-0.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gopro_video_sync-0.0.3-py3-none-any.whl | Python 3 | none | any | Details for gopro_video_sync-0.0.3-py3-none-any.whl |
Total release size: 18.7 kB
Release files / gopro-video-sync-0.0.3.tar.gz
| Download URL | gopro-video-sync-0.0.3.tar.gz |
|---|---|
| Size | 9.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3fe0f714989d0b1cc2fa8f0c3555cdfbdfad2c1029c74105d88c48bf3e5c6270
|
|
BLAKE2b-256 checksum How to use checksums |
c2552aee105865ea75175d1fb50d525b38a9b977934c22d4a4e7e4dc4cd4ac6e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.0
|
Release files / gopro_video_sync-0.0.3-py3-none-any.whl
| Download URL | gopro_video_sync-0.0.3-py3-none-any.whl |
|---|---|
| Size | 9.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ba493da6fc97a87414dc45a6c34fef08f2f963c3d16d2e5f0ae8badb77964859
|
|
BLAKE2b-256 checksum How to use checksums |
53870256c5ba33fc9405ad5976744b81cbb600e635415ba8b2dc5d9078bfffa9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.0
|
Security for gopro-video-sync 0.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.