-
Notifications
You must be signed in to change notification settings - Fork 5
Implement FFMPEG logger #1593
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Implement FFMPEG logger #1593
Conversation
[production merge] 2025-06-13
[update main] 2025-06-17
[production merge] 2025-06-27
[update main] 2025-07-01
[production merge] 2025-07-11
…elease updates stagewidget version
[update main] 2025-07-15
[production merge] 2025-07-18
…-package Reverts stagewidget package
…-package reverts stage widget version
[production merge] 2025-08-01
[update main] 2025-08-05
Add "transfer_service_job_type" to Settings and watchdog manifest
[update main] 2025-08-26
@bruno-f-cruz can you merge into |
…com/AllenNeuralDynamics/dynamic-foraging-task into refactor-add-standard-camera-logger
Rebased on |
Review request:
|
CSV settings file are maintained by this schema: https://github.com/AllenNeuralDynamics/dynamic-foraging-task/blob/main/src/foraging_gui/settings_model.py |
@XX-Yin would be a better person to review this tahn me since he is more familiar with how the bonsai workflows work here |
@bruno-f-cruz This looks good to me. Can you have some screenshot to highlight the bonsai change? It's difficult for us to review what's changed on the bonsai workflow? |
This is an error with the layout file. You should delete your local copy of the layout files and try again. |
|
@rachelstephlee @XX-Yin can you share the GUI logfile from the crashes? |
@bruno-f-cruz and I did a debugging session at 446. We're hitting the same problems we saw in the ephys room.
W10DT714673-C_gui_log_2025-09-10_11-48-30.txt
![]() Given that this is failing at the handshake between Python GUI and Bonsai, we need someone who can help us figure out that protocol. |
@bruno-f-cruz @rachelstephlee The stuck issue was solved. In this PR, LoggingRootPath was added after RootPath, which prevented RootPath from being propagated to other variables. |
Can you explain why this crashes the GUI tho? |
Are you sure the variable is not being propagated vs just a race condition from somewhere else? I can't seem to reproduce this with a self-contained example: <?xml version="1.0" encoding="utf-8"?>
<WorkflowBuilder Version="2.8.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:rx="clr-namespace:Bonsai.Reactive;assembly=Bonsai.Core"
xmlns:io="clr-namespace:Bonsai.IO;assembly=Bonsai.System"
xmlns="https://bonsai-rx.org/2018/workflow">
<Workflow>
<Nodes>
<Expression xsi:type="Combinator">
<Combinator xsi:type="StringProperty">
<Value>Split_</Value>
</Combinator>
</Expression>
<Expression xsi:type="Combinator">
<Combinator xsi:type="rx:Take">
<rx:Count>1</rx:Count>
</Combinator>
</Expression>
<Expression xsi:type="rx:CreateObservable">
<Workflow>
<Nodes>
<Expression xsi:type="WorkflowInput">
<Name>Source1</Name>
</Expression>
<Expression xsi:type="Combinator">
<Combinator xsi:type="rx:Take">
<rx:Count>1</rx:Count>
</Combinator>
</Expression>
<Expression xsi:type="rx:AsyncSubject">
<Name>Foo</Name>
</Expression>
<Expression xsi:type="SubscribeSubject">
<Name>Foo</Name>
</Expression>
<Expression xsi:type="rx:AsyncSubject">
<Name>Bar</Name>
</Expression>
<Expression xsi:type="Add">
<Operand xsi:type="StringProperty">
<Value>Foo</Value>
</Operand>
</Expression>
<Expression xsi:type="Combinator">
<Combinator xsi:type="io:WriteLine" />
</Expression>
<Expression xsi:type="SubscribeSubject">
<Name>Bar</Name>
</Expression>
<Expression xsi:type="Add">
<Operand xsi:type="StringProperty">
<Value>Bar</Value>
</Operand>
</Expression>
<Expression xsi:type="Combinator">
<Combinator xsi:type="io:WriteLine" />
</Expression>
</Nodes>
<Edges>
<Edge From="0" To="1" Label="Source1" />
<Edge From="1" To="2" Label="Source1" />
<Edge From="3" To="4" Label="Source1" />
<Edge From="4" To="5" Label="Source1" />
<Edge From="5" To="6" Label="Source1" />
<Edge From="7" To="8" Label="Source1" />
<Edge From="8" To="9" Label="Source1" />
</Edges>
</Workflow>
</Expression>
<Expression xsi:type="Combinator">
<Combinator xsi:type="rx:Switch" />
</Expression>
<Expression xsi:type="Combinator">
<Combinator xsi:type="StringProperty">
<Value>Together_</Value>
</Combinator>
</Expression>
<Expression xsi:type="Combinator">
<Combinator xsi:type="rx:Take">
<rx:Count>1</rx:Count>
</Combinator>
</Expression>
<Expression xsi:type="rx:CreateObservable">
<Workflow>
<Nodes>
<Expression xsi:type="WorkflowInput">
<Name>Source1</Name>
</Expression>
<Expression xsi:type="Combinator">
<Combinator xsi:type="rx:Take">
<rx:Count>1</rx:Count>
</Combinator>
</Expression>
<Expression xsi:type="rx:AsyncSubject">
<Name>Foo</Name>
</Expression>
<Expression xsi:type="rx:AsyncSubject">
<Name>Bar</Name>
</Expression>
<Expression xsi:type="SubscribeSubject">
<Name>Foo</Name>
</Expression>
<Expression xsi:type="Add">
<Operand xsi:type="StringProperty">
<Value>Foo</Value>
</Operand>
</Expression>
<Expression xsi:type="Combinator">
<Combinator xsi:type="io:WriteLine" />
</Expression>
<Expression xsi:type="SubscribeSubject">
<Name>Bar</Name>
</Expression>
<Expression xsi:type="Add">
<Operand xsi:type="StringProperty">
<Value>Bar</Value>
</Operand>
</Expression>
<Expression xsi:type="Combinator">
<Combinator xsi:type="io:WriteLine" />
</Expression>
</Nodes>
<Edges>
<Edge From="0" To="1" Label="Source1" />
<Edge From="1" To="2" Label="Source1" />
<Edge From="2" To="3" Label="Source1" />
<Edge From="4" To="5" Label="Source1" />
<Edge From="5" To="6" Label="Source1" />
<Edge From="7" To="8" Label="Source1" />
<Edge From="8" To="9" Label="Source1" />
</Edges>
</Workflow>
</Expression>
<Expression xsi:type="Combinator">
<Combinator xsi:type="rx:Switch" />
</Expression>
</Nodes>
<Edges>
<Edge From="0" To="1" Label="Source1" />
<Edge From="1" To="2" Label="Source1" />
<Edge From="2" To="3" Label="Source1" />
<Edge From="4" To="5" Label="Source1" />
<Edge From="5" To="6" Label="Source1" />
<Edge From="6" To="7" Label="Source1" />
</Edges>
</Workflow>
</WorkflowBuilder> If you run this on your PC, what do you get on the command line? |
I didn’t see the propagation. Likely a bug in bonsai. We can test it in detail on Monday.
Get Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: Bruno Cruz ***@***.***>
Sent: Saturday, September 13, 2025 9:59:59 PM
To: AllenNeuralDynamics/dynamic-foraging-task ***@***.***>
Cc: Xinxin Yin ***@***.***>; Mention ***@***.***>
Subject: Re: [AllenNeuralDynamics/dynamic-foraging-task] Implement FFMPEG logger (PR #1593)
[https://avatars.githubusercontent.com/u/7049351?s=20&v=4]bruno-f-cruz left a comment (AllenNeuralDynamics/dynamic-foraging-task#1593)<#1593 (comment)>
Are you sure the variable is not being propagated vs just a race condition from somewhere else?
I can't seem to reproduce this with a self-contained example:
<?xml version="1.0" encoding="utf-8"?>
<WorkflowBuilder Version="2.8.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:rx="clr-namespace:Bonsai.Reactive;assembly=Bonsai.Core"
xmlns:io="clr-namespace:Bonsai.IO;assembly=Bonsai.System"
xmlns="https://bonsai-rx.org/2018/workflow">
<Workflow>
<Nodes>
<Expression xsi:type="Combinator">
<Combinator xsi:type="StringProperty">
<Value>Split_</Value>
</Combinator>
</Expression>
<Expression xsi:type="Combinator">
<Combinator xsi:type="rx:Take">
<rx:Count>1</rx:Count>
</Combinator>
</Expression>
<Expression xsi:type="rx:CreateObservable">
<Workflow>
<Nodes>
<Expression xsi:type="WorkflowInput">
<Name>Source1</Name>
</Expression>
<Expression xsi:type="Combinator">
<Combinator xsi:type="rx:Take">
<rx:Count>1</rx:Count>
</Combinator>
</Expression>
<Expression xsi:type="rx:AsyncSubject">
<Name>Foo</Name>
</Expression>
<Expression xsi:type="SubscribeSubject">
<Name>Foo</Name>
</Expression>
<Expression xsi:type="rx:AsyncSubject">
<Name>Bar</Name>
</Expression>
<Expression xsi:type="Add">
<Operand xsi:type="StringProperty">
<Value>Foo</Value>
</Operand>
</Expression>
<Expression xsi:type="Combinator">
<Combinator xsi:type="io:WriteLine" />
</Expression>
<Expression xsi:type="SubscribeSubject">
<Name>Bar</Name>
</Expression>
<Expression xsi:type="Add">
<Operand xsi:type="StringProperty">
<Value>Bar</Value>
</Operand>
</Expression>
<Expression xsi:type="Combinator">
<Combinator xsi:type="io:WriteLine" />
</Expression>
</Nodes>
<Edges>
<Edge From="0" To="1" Label="Source1" />
<Edge From="1" To="2" Label="Source1" />
<Edge From="3" To="4" Label="Source1" />
<Edge From="4" To="5" Label="Source1" />
<Edge From="5" To="6" Label="Source1" />
<Edge From="7" To="8" Label="Source1" />
<Edge From="8" To="9" Label="Source1" />
</Edges>
</Workflow>
</Expression>
<Expression xsi:type="Combinator">
<Combinator xsi:type="rx:Switch" />
</Expression>
<Expression xsi:type="Combinator">
<Combinator xsi:type="StringProperty">
<Value>Together_</Value>
</Combinator>
</Expression>
<Expression xsi:type="Combinator">
<Combinator xsi:type="rx:Take">
<rx:Count>1</rx:Count>
</Combinator>
</Expression>
<Expression xsi:type="rx:CreateObservable">
<Workflow>
<Nodes>
<Expression xsi:type="WorkflowInput">
<Name>Source1</Name>
</Expression>
<Expression xsi:type="Combinator">
<Combinator xsi:type="rx:Take">
<rx:Count>1</rx:Count>
</Combinator>
</Expression>
<Expression xsi:type="rx:AsyncSubject">
<Name>Foo</Name>
</Expression>
<Expression xsi:type="rx:AsyncSubject">
<Name>Bar</Name>
</Expression>
<Expression xsi:type="SubscribeSubject">
<Name>Foo</Name>
</Expression>
<Expression xsi:type="Add">
<Operand xsi:type="StringProperty">
<Value>Foo</Value>
</Operand>
</Expression>
<Expression xsi:type="Combinator">
<Combinator xsi:type="io:WriteLine" />
</Expression>
<Expression xsi:type="SubscribeSubject">
<Name>Bar</Name>
</Expression>
<Expression xsi:type="Add">
<Operand xsi:type="StringProperty">
<Value>Bar</Value>
</Operand>
</Expression>
<Expression xsi:type="Combinator">
<Combinator xsi:type="io:WriteLine" />
</Expression>
</Nodes>
<Edges>
<Edge From="0" To="1" Label="Source1" />
<Edge From="1" To="2" Label="Source1" />
<Edge From="2" To="3" Label="Source1" />
<Edge From="4" To="5" Label="Source1" />
<Edge From="5" To="6" Label="Source1" />
<Edge From="7" To="8" Label="Source1" />
<Edge From="8" To="9" Label="Source1" />
</Edges>
</Workflow>
</Expression>
<Expression xsi:type="Combinator">
<Combinator xsi:type="rx:Switch" />
</Expression>
</Nodes>
<Edges>
<Edge From="0" To="1" Label="Source1" />
<Edge From="1" To="2" Label="Source1" />
<Edge From="2" To="3" Label="Source1" />
<Edge From="4" To="5" Label="Source1" />
<Edge From="5" To="6" Label="Source1" />
<Edge From="6" To="7" Label="Source1" />
</Edges>
</Workflow>
</WorkflowBuilder>
If you run this on your PC, what do you get on the command line?
—
Reply to this email directly, view it on GitHub<#1593 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/A2CTX5XYSWTXR32YT4VLEHT3STY47AVCNFSM6AAAAACFOQAEL6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTEOBZGE4TENBZGI>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
@bruno-f-cruz By race condition, do you think its this issue: #1521 ? |
I don't have a clear idea what it could be tbh. It could be related to that issue or, as XinXin pointed out it could be a bug in bonsai (there were some edge cases of initialization solved in 2.9). Could also be something that I am just not seeing just be looking at the workflow. All I am finding weird is that I can't reproduce it with a minimal example in my PC. Let's see what we find, even if it is working I find it dangerous to merge without understanding what this is. |
@rachelstephlee @micahwoodard @bruno-f-cruz To do after the debugging meeting:
|
|
Some notes:
|
on 5-- might also want to message @Ahad-Allen as well, because he has been updating the job type for dynamic foraging task. We probably want it to work for the new job types. |
@rachelstephlee Bonsai workflow was updated. We need somebody to update the bonsai visualizer and the python code. |
This PR implements an ffmpeg logger for all cameras. The following caveats should be considered:
Important
This PR requires the following 3rd party dependencies: