My use case is that my program programmatically captures screen recording videos from computers or attached mobile devices, e.g.:
ffmpeg -f avfoundation ...
adb shell screenrecord ...
xcrun simctl io booted recordVideo ...
- any other similar command.
How can I map the very first frame of a video to the host computer time?
The reason I'm asking is because I can notice a certain delay between these two points: when the command (to record) starts, and when the video itself starts being recorded.
Maybe it is a small delay, but I need to have a precision of ±1ms. Also I'm afraid of dropped frames, and that they might ruin this precision.
I need such a precision to synchronise thousands of quick rushing application log messages (trace mode) with the screen recording, and any inaccuracy might harm the usability of this feature.
Is there any option to inject timestamps into the keyframes, so that at least, if I know the exact time difference between the computer and the remote device, I can read them and map every frame, existing or dropped, to the world clock?