-
Notifications
You must be signed in to change notification settings - Fork 4
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
High speed cameras generate warning about unused codec option #588
Comments
@ZhixiaoSu @XX-Yin Can you investigate this? |
In cpu compression, -crf 23 controls the compression level, the larger the number, the higher the compression. But as we switched to gpu compression, we should change the flag to -rc vbr -cq 23. I got the same error when using -crf locally. |
I attempted to test different codecs, but the codec in video writer doesn't seem to update according to the one in box settings. @XX-Yin Is there a different location I should check to update the codec? |
There are four boxes. I assume that you changed the right Settings_box#.csv? |
Might be obvious - but you need to close the GUI after changing the codec, you can't just start/stop the camera. |
@XX-Yin Yes, I change the one in setting folder. For 446, each computer only has one settings file, so it's hard to be wrong. And, yes, @alexpiet I restarted the GUI together with Bonsai and check the codecs after restarting. The parameter I tested with was bitrate, changing the number to 25M in csv file didn't change the one in bonsai. |
I just figured out why: since the cameras are in restart loggers, the codec doesn’t update until we trigger the camera. After triggering, the codec gets updated. |
[like] Xinxin Yin reacted to your message:
…________________________________
From: ZhixiaoSu ***@***.***>
Sent: Friday, July 19, 2024 2:26:16 AM
To: AllenNeuralDynamics/dynamic-foraging-task ***@***.***>
Cc: Xinxin Yin ***@***.***>; Mention ***@***.***>
Subject: Re: [AllenNeuralDynamics/dynamic-foraging-task] High speed cameras generate warning about unused codec option (Issue #588)
I just figured out why: since the cameras are in restart loggers, the codec doesn’t update until we trigger the camera. After triggering, the codec get updated.
—
Reply to this email directly, view it on GitHub<#588 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/A2CTX5XF5T5ECGXT3XU5AY3ZNB2MRAVCNFSM6AAAAABKKLD24OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMZXHE2DGOJWGQ>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
I tested '-rc vbr -cq 23' on 6A and 6B, it worked well without warnings. I'll check the video quality of 6A, which still has this codec now. If it looks ok, let's update all the codecs. |
Hi @ZhixiaoSu, looks great! Can you also check if the video quality/size changes with the |
It should in theory, as it has similar functions as -crf in cpu codec. Let me check it with a real mouse there. |
Videos look ok, @mlee10201 will help update the codecs this week (week of 7/29). |
We should make a PR to change the settings template file so all the rigs use the same codec. @mlee10201 share the final codec you used. |
Is this the same codec as the one Bruno was recommending? |
codec,-vcodec h264_nvenc -rc vbr -cq 23 -preset fast -b:v 50M -v 24 |
Let’s also include sound attenuation in the settings. I can add it this week. |
02:10:24 PM:INFO:Foraging:Foraging.py:log_subprocess_output:line 4288:BONSAI: [out#0/avi @ 0000013ff6d2af00] Codec AVOption crf (Select the quality for constant quality mode) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.
I checked, and the logs include this warning before the recent addition of the
-v 24
verbose option, it was just getting buried in other information. This message appears twice, once for each camera. It appears whether I pressed "preview" or "record"This is the codec in
Settings_box1.csv
codec,-vcodec h264_nvenc -crf 23 -preset fast -b:v 50M
I dont know what
-crf 23
does, or if it matters. @XX-Yin @ZhixiaoSuThe text was updated successfully, but these errors were encountered: