Video framerate in VideoWriter

265 views
Skip to first unread message

Jaeeon Lee

unread,
Dec 17, 2021, 5:29:32 PM12/17/21
to Bonsai Users
Hello 

I'm new to both Bonsai and high speed camera tracking & codec, and I have some confusion about video frame rate. Hope somebody can answer this question.

So I'm trying to do high speed camera tracking with a Pointgrey camera. I have a simple work flow with PointgreyCamera->image->VideoWriter. I'm using FMP4 as codec and saving as avi file. The camera is set at 300FPS. 

My question is, when I set the video frame rate (in the VideoWriter) at 300FPS, then the resulting video doesn't seem to have all the frames (temporal resolution looks bad). However, if i use a much lower FPS in the VideoWriter, then the video is slowed downed, but I can now see all the frames. What's confusing is that if I open the two video files in MATLAB, they both have the same number of frames. What is going on here? Is video displayed not the real representation of the actual raw data in the file itself?

Jay

Gonçalo Lopes

unread,
Dec 29, 2021, 9:26:54 PM12/29/21
to Jaeeon Lee, Bonsai Users
Hi Jay,

The FPS parameter in VideoWriter is just an indicator for movie players to decide how quickly to update the frames in the movie, it will not change the number of frames in the video. When you say the temporal resolution looks bad when playing back the video, which software were you using to do this?

--
You received this message because you are subscribed to the Google Groups "Bonsai Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bonsai-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bonsai-users/37c6aee6-b675-445b-a879-9f7c5c23fba2n%40googlegroups.com.

Jaeeon Lee

unread,
Feb 9, 2022, 1:03:34 AM2/9/22
to Bonsai Users
I was using the VLC. but it seems like when I open the file in matlab, everything looks good (all the frames are there)
Thanks!
Reply all
Reply to author
Forward
0 new messages