Hi Chenglin,
The behavior and imaging video streams are not guaranteed to have the same number of frame or same frame rate. Generally, webcams have a frame rate that varies across a recording session while the Miniscope frame rate should be completely stable. Every time a frame is acquired (both for the behavior and imaging video streams) the DAQ Software timestamps that acquisition and saves that information in timestamp.dat. This file allows you to sync up the 2 videos offline by matching up timestamps. I hope this helps.