Recording from multiple cameras

356 views
Skip to first unread message

Mark Laubach

unread,
May 25, 2022, 11:03:53 AM5/25/22
to Bonsai Users
We are attempting to use Bonsai to record video across a set of operant chambers (to replace a system from Noldus). The cameras are ELP 1.3 MP cameras, and a Logitech V-U0018 webcam, connected by USB3. The lab computer’s specs are Intel i7-10700K CPU and 64.0 GB of RAM.

From our testing so far, there are discrepancies in the length of time recording and the length of the resulting video. We may record a video for five minutes and get a three minute video saved. Referencing the timestamp, we see that the saved video was recorded for the full time intended and there have been no dropped frames.

When we use ffmpeg to evaluate the videos, we get an accurate amount of frames (30 fps) for the resulting video time length. The number of frames does not match the amount of time that the video was actually recorded, and is always shorter than the intended recording time. We have used the ffmpeg writer example from the bonsai galleries, and we also get shortened videos.

We have used two different computers (the one referenced above as well as a laptop), both resulting in the same issue. We have also tried two different types of USB cameras as well as a built-in laptop camera, so it doesn’t seem to be camera-related.

Our workflow was modified from a previous post: https://groups.google.com/g/bonsai-users/c/7An12M54_34/m/1MevjfFsBwAJ

Any advice on these issues would be greatly appreciated.

brunocruz

unread,
May 25, 2022, 1:11:10 PM5/25/22
to Bonsai Users
Hi, 
How are you determining the frame rate of the camera? Can you plot the derivative of the frame times and check if you get something stable close to 33ms?
Cheers,
Bruno
Reply all
Reply to author
Forward
0 new messages