-
Notifications
You must be signed in to change notification settings - Fork 148
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
Problem setting bitrate through web interface #30
Comments
Thanks for the bug report. Will we always have a whitespace after the name in v4l2-ctl? |
It's a good question, I'm not sure. I also considered \b for a word break, which would catch both a whitespace or a colon. However, this wouldn't allow for names with a hyphen (-) in them if those exist (it would allow underscores). Just remember to escape the slash in the string, or you'll really confuse yourself. |
I am back in the office now and checked my RPi. |
For the record, we should note that the sense of auto_exposure is backwards in these settings. A value of 0, or unchecked, means auto exposure is on. A value of 1 or checked means manual exposure. Not sure the easiest way to note this in the interface, but I suppose you could change it to a menu/dropdown type where "on" = 0 and "off" = 1. |
This bug has been fixed in RPOS now. (I've pulled in the Pull Request from my fork). |
While using rpos, I noticed that when setting
video_bitrate
through the web interface, the value is not preserved. The value always reads '0' in thev4l2ctl.json
settings file. I tracked this down to what I think is a RegExp bug inv4l2ctl.ts
In the
ReadControls()
function, we take the control name and append the variableregexPart
to create a RegExp that is matched against the output ofv4l2-ctl -l
command.The problem shows when two different controls start the same way: in this case
video_bitrate_mode
andvideo_bitrate
. The regex will matchvideo_bitrate_mode
for both controls. So, when you attempt to setvideo_bitrate
, it takes affect and even gets written to file correctly. But anytime the file is read, the value ofvideo_bitrate_mode
will be captured for both controls.To fix, you could change
to
This will require whitespace after the control name, which will limit the RegExp to only match the correct control.
The text was updated successfully, but these errors were encountered: