MobileRoboticsSkoltech / OpenCamera-Sensors

Android app for synchronized recording of video and IMU data with advanced camera options, useful for 3D reconstruction, SLAM, AR, video stabilization. Supports remote control over network.
GNU General Public License v3.0
173 stars 19 forks source link

not fully synchronized recording #68

Closed l1346792580123 closed 2 years ago

l1346792580123 commented 2 years ago

I am able to perform synchronized recording after using another type phone. While I have found that the recorded videos are not fully synchronized. I have recorded two videos with two phones while the total frames of these two videos are different. One of the videos has a total frame count of 472 and the other has 469. I upload the video to the computer and use cv2 to read the total number of frames. Is this normal ? The two phones are different types. Will the results be more synchronized using two identical phones?

TimPushkin commented 2 years ago

The results you got are expected: OpenCamera Sensors mainly synchronizes the recordings by timestamps of frames, however the synchronization of the moments when recordings start and end is not so good (as it is affected by Wi-Fi signal speed). It means that you have to extract the parts when both phones were recording by yourself and you'll get the synchronized videos.

You can cut the videos by hand somehow or make use of script for extraction of synchronized frames found here (see "Extraction and matching of the frames" section of README), for example.

l1346792580123 commented 2 years ago

Thanks for your quick reply, I have found that running the script requires a corresponding csv file for each video. How can I get or generate this csv file?

TimPushkin commented 2 years ago

OpenCamera Sensors creates one for each video when recording with RecSync enabled. In the folder where OpenCamera writes all the videos there should be a corresponding subfolder for each one. In such subfolder you can find a file named <video name>_recsync_<leader or client>_<device id>.csv -- this is the file you need.

l1346792580123 commented 2 years ago

Thanks for your reply!