Replies: 4 comments
-
Hello Michael,
Thanks for posting your question.
Safe to assume you have the suffix property on the VideoWriter set to Timestamp?
I cannot see anything obvious that would cause the issue you are seeing. Your description sounds like you are passing a timestamp to update the filename property of the video on each repeat, which could add a new timestamp each loop. However, there is no property mapping to the `VideoWriter` so am unsure how this can be doing what you are seeing. I was not able to replicate it myself. Is that `VideoWriter` the only one?
Would you be able to share the actual .bonsai workflow, so we can see what properties you have set and what is inside the `CreateObservable`?
Thanks,
Tom
P.S. Just in case it is useful and FYI, there is an operator called `RoiActivity`in Bonsai.Vision that I expect suits your needs for the activity tracking you have done long hand. This will allow you to define multiple regions in your image, computing activity with different operations (mean, sum etc.)
From: Michael Graupner ***@***.***>
Sent: 12 February 2025 07:26
To: bonsai-rx/bonsai ***@***.***>
Cc: Subscribed ***@***.***>
Subject: [Bonsai] Accumulating time stamps of VideoWriter output (Discussion #2136)
Hello,
The attached Bonsai sketch generates video recordings whenever there is activity in a certain region (defined with Crop) of the image. The issue is that consecutive recordings accumulate time stamps in the file name generated by VideoWriter, as show in the file browser image.
Screenshot.2025-02-11.095719.png (view on web)<https://github.com/user-attachments/assets/92fd34cd-924e-48da-aa27-493c65e6b85b>
The behavior is that all previous time stamps are kept and the time stamp of the current recording is added to the end of the file name. Do you know how to avoid this accumulation?
Thanks in advance.
Best,
Michael
—
Reply to this email directly, view it on GitHub<#2136>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AI6XU4L3U772FDNWESJ7FR32PLZQXAVCNFSM6AAAAABW64IMRGVHI2DSMVQWIX3LMV43ERDJONRXK43TNFXW4OZXHE2TCMRWGI>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.******@***.***>>
|
Beta Was this translation helpful? Give feedback.
-
Dear Tom, Thank you very much for your response. As to your questions :
Please find attached the Bonsai sketch. Any hints would be much appreciated. Cheers, |
Beta Was this translation helpful? Give feedback.
-
Hi Michael,
Sorry to come back to you with bad news but I am still unable to replicate what you are seeing, despite trying quite hard to do so. I have many videos saved with the expected behaviour triggered by the activity in the ROI, it appears to be doing exactly what you want it to do. Perhaps I am missing something, but I can only imagine the difference between our machines is the bonsai environment or the OS itself. If you can send us the bonsai.config and nuget.config in the bonsai environment where you see this issue maybe we can dig a bit more.
Right now I can only suggest trying the workflow on a fresh install of bonsai, installing the packages you need manually from the package manager, (i.e. don't use the current bonsai.config).
Thanks!
Tom
From: Michael Graupner ***@***.***>
Sent: 13 February 2025 16:13
To: bonsai-rx/bonsai ***@***.***>
Cc: TomRyan ***@***.***>; Comment ***@***.***>
Subject: Re: [bonsai-rx/bonsai] Accumulating time stamps of VideoWriter output (Discussion #2136)
Dear Tom,
Thank you very much for your response.
As to your questions :
1. Yes, the suffix variable in the VidoWriter node is set to Timestamp
2. As you point out, there is no property mapped to the VideoWriter node.
3. And yes, it is the only VideoWriter node in the sketch.
4. The CreateObserable function makes sure that the video recording lasts for at least 10 s (specified in the Delay node within) but is extended if further activity occurs during the 10 s.
Please find attached the Bonsai sketch.
Any hints would be much appreciated.
Cheers,
Michael
ActivityTriggersCameraRecording.zip<https://github.com/user-attachments/files/18786807/ActivityTriggersCameraRecording.zip>
-
Reply to this email directly, view it on GitHub<#2136 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AI6XU4LNAMDWMZWZW2RGMTL2PTAADAVCNFSM6AAAAABW64IMRGVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTEMJYHE4TMNY>.
You are receiving this because you commented.Message ID: ***@***.******@***.***>>
|
Beta Was this translation helpful? Give feedback.
-
Dear Tom, Thank you very much for your input. Your comments made me rebuild the workflow from scratch and I realized that writing the output to the Arduino was at the origin of the described behavior, i.e., accumulating time stamps. When I removed the Arduino output, the file names of consecutive recordings showed the desired behavior. I turn, I change the work-flow to publish the signals and subscribe to those signals for the Arduino part. It works now even though I don't fully understand what cased the accumulating time-stamps in the first place. Find attached the working sketch. I have tried to implement the gating for two cameras but I run into the same problem again :-( Cheers, |
Beta Was this translation helpful? Give feedback.
-
Hello,
The attached Bonsai sketch generates video recordings whenever there is activity in a certain region (defined with
Crop
) of the image. The issue is that consecutive recordings accumulate time stamps in the file name generated byVideoWriter
, as show in the file browser image.The behavior is that all previous time stamps are kept and the time stamp of the current recording is added to the end of the file name. Do you know how to avoid this accumulation?
Thanks in advance.
Best,
Michael
Beta Was this translation helpful? Give feedback.
All reactions