Difference between revisions of "How to Build Synced Multi-Camera Video"

From iPi Docs
Jump to: navigation, search
Line 68: Line 68:
  
 
=== Synchronization ===
 
=== Synchronization ===
 +
 +
To build combined video source videos from separate cameras must be synchronized. Current version of '''Combined Video Builder''' supports only manual synchronization based on some short/sharp visual event visible in all cameras simultaneously. Frame where such event takes place is called as '''sync frame'''. That is, you have to set sync frame for each source video:
 +
 +
<center>[[File:build-combined-video-sync-schema.png|1000px|link=]]</center>
 +
 +
We recommend to use the following visual events for synchronization:
 +
* the moment when you turn on/off flash light (or [https://www.amazon.com/Playstation-3-Move-Motion-Controller/dp/B002I0J51U/ref=as_sl_pc_qf_sp_asin_til?tag=wwwipisoftcom-20&linkCode=w00&linkId=3LAZCYWUQQFLH2LX&creativeASIN=B002I0J51U Sony Move])
 +
* manual firing of external on-camera flash
 +
 +
For details see [[How to Record Video with Action Cameras#Synchronization Event]].
  
 
Example of synchronization using external on-camera flash in manual mode:
 
Example of synchronization using external on-camera flash in manual mode:
<table border="0">
+
<center><table border="0">
 
<tr><td></td><td align="center">'''Prev. frame'''<br/>(before sync)</td><td align="center">'''Sync frame'''</td><td align="center">'''Next frame'''<br/>(after sync)</td></tr>
 
<tr><td></td><td align="center">'''Prev. frame'''<br/>(before sync)</td><td align="center">'''Sync frame'''</td><td align="center">'''Next frame'''<br/>(after sync)</td></tr>
 
<tr><td>cam1&nbsp;</td><td>[[File:frame-before-sync-cam1.jpg|320px|link=]]</td><td>[[File:frame-sync-cam1.jpg|320px|link=]]</td><td>[[File:frame-after-sync-cam1.jpg|320px|link=]]</td></tr>
 
<tr><td>cam1&nbsp;</td><td>[[File:frame-before-sync-cam1.jpg|320px|link=]]</td><td>[[File:frame-sync-cam1.jpg|320px|link=]]</td><td>[[File:frame-after-sync-cam1.jpg|320px|link=]]</td></tr>
Line 76: Line 86:
 
<tr><td>cam3&nbsp;</td><td>[[File:frame-before-sync-cam3.jpg|320px|link=]]</td><td>[[File:frame-sync-cam3.jpg|320px|link=]]</td><td>[[File:frame-after-sync-cam3.jpg|320px|link=]]</td></tr>
 
<tr><td>cam3&nbsp;</td><td>[[File:frame-before-sync-cam3.jpg|320px|link=]]</td><td>[[File:frame-sync-cam3.jpg|320px|link=]]</td><td>[[File:frame-after-sync-cam3.jpg|320px|link=]]</td></tr>
 
<tr><td>cam4&nbsp;</td><td>[[File:frame-before-sync-cam4.jpg|320px|link=]]</td><td>[[File:frame-sync-cam4.jpg|320px|link=]]</td><td>[[File:frame-after-sync-cam4.jpg|320px|link=]]</td></tr>
 
<tr><td>cam4&nbsp;</td><td>[[File:frame-before-sync-cam4.jpg|320px|link=]]</td><td>[[File:frame-sync-cam4.jpg|320px|link=]]</td><td>[[File:frame-after-sync-cam4.jpg|320px|link=]]</td></tr>
</table>
+
</table></center>
  
 
=== Background ===
 
=== Background ===

Revision as of 05:15, 15 August 2018

Introduction

To process video recorded by action cameras (or other standalone camcorders) in iPi Mocap Studio you have to create multi-camera .iPiVideo file from separate MP4/MOV/AVI/MPEG video files recorded by these cameras.

build-combined-video-workflow-schema.png

Preparations

Copy MP4/MOV/AVI/MPEG video files from each camera to computer.

There are two hints here:

  1. It's better to use microSD-card reader to copy files because it provides much higher speed of this operation in comparison with USB-connection.
  2. Two distinguish files from different cameras it is convenient to create sub-folder for each camera. And name of such sub-folder should contain label/nickname of corresponding camera.
    For example: if you have cameras with labels/names "cam1", "cam2", "cam3" and "cam4" then you can create the following structure of folders and files on your local disk:
YYYY-MM-DD-session-name
   cam1
      video files from "cam1" camera
   cam2
      video files from "cam2" camera
   cam3
      video files from "cam3" camera
   cam4
      video files from "cam4" camera
Alternatively you can rename video files right after copying (or even during copying) to local disk while you're remembering from what camera these files are. Such approach is used in the following sample: Sample Videos and Projects (four GoPro).


Overall Procedure

  • Run iPi Recorder and click on Build Combined Video button in toolbar on home screen.
build-combined-video-tool-button.png
  • For each camera:
    • add video from this camera by clicking Add Video button in toolbar — see mark (1) on screenshot below
    • choose this camera by clicking on image from this camera — (2)
    • in the left panel (3) set camera parameters by clicking on Load button in camera parameters section — (4)
    • click button Edit in sync frame section of left panel (3) and choose frame with synchronization event — (5)
  • Now videos from all cameras are added and required parameters (camera parameters and synchronization frames) are defined for them.
build-combined-video-workflow.png
  • Evaluate background:
    • using markers (6) and (7) select interval on timeline where there is no actor and moving objects
    • alternatively, to set interval on timeline you can use controls in section INTERVAL of toolbar — (8)
    • click Evaluate Background button in toolbar to evaluate background for all cameras simultaneously from selected interval on timeline — (9)
    • alternatively:
      • you can evaluate background for each camera separately using button Edit... in section background in left panel (3)(A)
      • or you can even load background from file if you've already evaluated it before from different video — (B)
      • for details see below
  • Now everything is ready to be saved into destination .iPiVideo file:
    • using markers (6) and (7) on timeline or controls (8) in toolbar, select fragment you want to save to result video
      • for calibration video it could be fragment where glowing marker is visible
      • for action video it could be fragment with required action sequence or movement
      • or you can save the whole video if you're not sure what fragment exactly will be used for processing in iPi Mocap Studio
    • click Save Combined Video button in toolbar and choose destination file name — (C)
    • also before saving you can set compression quality for destination video — (D)
      • but in most cases default value (70%) works very well providing good balance between image quality in result video and size of this video
  • After all you can open result .iPiVideo file in iPi Mocap Studio and process it.

Important Aspects

Now let's discuss some aspects in details:

Cameras and Their Parameters

  1. It is strictly mandatory to add cameras in one and the same order for scene calibration and action videos. In other case results of scene calibration will not match action video(s). By the way, you can use drag-and-drop to reorder cameras.
  2. Don't forget to apply camera parameters by loading them from appropriate .iPiCam file. Remember that this .iPiCam file must be for exactly the same camera item and for exactly the same resolution and view/FOV settings (FPS may differ). The thing is that camera optics parameters significantly vary from item to item (even when all items are of one and the same model) and depends on resolution and view/FOV settings.
  3. You can adjust scale of undistort filter right in Combined Video Builder:
build-combined-video-scale.png
But be aware that this scale must be one and the same for scene calibration and action videos (per camera, of course). For this reason use this feature with great care.

Synchronization

To build combined video source videos from separate cameras must be synchronized. Current version of Combined Video Builder supports only manual synchronization based on some short/sharp visual event visible in all cameras simultaneously. Frame where such event takes place is called as sync frame. That is, you have to set sync frame for each source video:

build-combined-video-sync-schema.png

We recommend to use the following visual events for synchronization:

  • the moment when you turn on/off flash light (or Sony Move)
  • manual firing of external on-camera flash

For details see How to Record Video with Action Cameras#Synchronization Event.

Example of synchronization using external on-camera flash in manual mode:

Prev. frame
(before sync)
Sync frameNext frame
(after sync)
cam1 frame-before-sync-cam1.jpgframe-sync-cam1.jpgframe-after-sync-cam1.jpg
cam2 frame-before-sync-cam2.jpgframe-sync-cam2.jpgframe-after-sync-cam2.jpg
cam3 frame-before-sync-cam3.jpgframe-sync-cam3.jpgframe-after-sync-cam3.jpg
cam4 frame-before-sync-cam4.jpgframe-sync-cam4.jpgframe-after-sync-cam4.jpg

Background

Sample

You can use the following sample videos to train in this subject without need in recording your own videos: Sample Videos and Projects (four GoPro).