gopro / OpenGoPro

An open source interface specification to communicate with a GoPro camera with accompanying demos and tutorials.
https://gopro.github.io/OpenGoPro/
MIT License
704 stars 152 forks source link

Allow for 20 ms video synchronization #212

Open pavlosharhan2 opened 2 years ago

pavlosharhan2 commented 2 years ago

I want to sync the footage from multiple GoPros for future video processing.

For this I would like to be able to get the video creation time with precision up to milliseconds. I did various attempts trying to get this info from MP4 metadata via ffprobe, but the timestamps there seem to have to sense.

My current solution is to get the Time from My PC while sending the "shutter on" command and take away ~0.132 seconds considering average latency between sending the command and actual start of the video. The error with this approach is ~20-40 ms, which is not enough for me. One more downside of this method is that latency is different for different presets. That's why I want something neater and more accurate.

The only one solution in my mind could be enabling GPS and extract the timestampes (with milliseconds precision) from telemetry files. I feel like It's an overkill. It would drain the battery significantly and there might be no signal. I'd made some tests in past and sometimes the GoPro needs 5-10 minutes to catch the GPS signal.

Is there some better solution for this?

@tcamise-gpsw @KonradIT

KonradIT commented 2 years ago

You need GoPro Labs.

https://gopro.github.io/labs/control/precisiontime/

https://gopro.github.io/labs/control/gpssync/

steelbytes commented 2 years ago

syncronisation is important. I also really need this via bluetoothle, not qr code

tcamise-gpsw commented 2 years ago

What level of synchronization accuracy are you trying to achieve? You mentioned above that 20 ms is not enough.

steelbytes commented 2 years ago

What level of synchronization accuracy are you trying to achieve? You mentioned above that 20 ms is not enough.

I'm happy with say 100ms but others may(do) want better.

I want it so I can sync the video with telemetry data. I am planning on writing an app that decodes the video, renders a speedo&tacho and reencodes the video. my vehicle data is at a rate of 100ms.

Landstein commented 2 years ago

@steelbytes @pavlosharhan2 working on something similar. Attempting to get two gopro devices to film simultaneously for a redundant recording. if you'd be interested in collaboration or sharing ideas, get in touch.