Re: VideoWriter playback speed

246 views
Skip to first unread message
Message has been deleted

brunocruz

unread,
Feb 16, 2022, 5:34:35 AM2/16/22
to Bonsai Users
Hi Sanna,

From what you are describing and your print screen, I doubt it is a problem with bonsai. I don't have a FLIR with me right now, but is there a chance that your acquisition frame rate changed from experiment to experiment? Make sure there is no automatic exposure setting that is messing up the frame rate for instance.

Cheers,
Bruno

On Thursday, February 10, 2022 at 3:45:39 PM UTC s.t...@ucl.ac.uk wrote:
Hi everyone,

I seem to be having an issue with my saved .avi's playing back at variable rates. I have a very simple workflow working with a FLIR Blackfly (+ computer lens) camera (workflow attached - I know you can see other nodes but they are all disabled). After stopping the workflow and watching the files, it seems every video is playing back at a different speed; for example, we have 165.5hr video playing back at 38min (261 times faster than normal speed), 70hrs video playing back at 16hrs (4.4 times normal speed) and 40 minutes playing back at 25 mins (1.6 times normal speed). 

I realise I can mess with the playback speed using file capture posthoc, however I fear I couldn't estimate precisely enough for the videos to be converted to actual realtime. I have seen some discussions about ffmpeg node as well, and messed around with it without luck. For obvious reasons, I would prefer to fix anything wrong with my workflow if that may be the problem. 

I am not sure if this is an issue (I am not a computer scientist!), but it may be relevant that I am working with a relatively limited Dell desktop at the moment with 16GB RAM. 

Thank you all for your time and help - this is the best google group ever! 
Sanna 
Message has been deleted

Sanna Titus

unread,
Feb 23, 2022, 7:49:07 AM2/23/22
to Bonsai Users
Sorry - I did not mean to delete the original post! 

Thank you Bruno for your response. Turns out it was not an issue with Bonsai as you said, but there was a sneaky hidden feature in the SpinView software! Posting my solution here in case someone runs into the same issue. 

There are two frame rates within the SpinView software for FLIR Blackfly drivers; one that you can manipulate (acquisition frame rate) and one that you cannot (resulting frame rate). Originally, I had everything on a manual setting, so the acquisition frame rate was set but the resulting frame rate was influenced by a number of factors (exposure, buffering, etc). If the exposure time is greater than the frame time (ie acquisition line rate) then the acquisition frame rate doesn’t equal the resulting frame rate and your playback speed is variable each time you film.

To fix this, I ensured the acquisition frame rate was set to automatic (AquisitionFrameRateEnable is off) so the system automatically matches the acquisition to the resulting frame rate. This limits what you can manipulate in the camera's perspective to essentially only gain and black intensity, but if you can get a good enough view for your experimental set up, its a quick fix.

Thanks for your help Bruno,
Sanna
Reply all
Reply to author
Forward
0 new messages