Skip to content
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

Proposed Text Based Interface Control App #56

Closed
AlexOD42 opened this issue Nov 29, 2020 · 9 comments
Closed

Proposed Text Based Interface Control App #56

AlexOD42 opened this issue Nov 29, 2020 · 9 comments

Comments

@AlexOD42
Copy link

Attached is a proposed lightweight app for adjusting the webcam settings in the terminal before committing to /boot/camera.txt. The only dependency should be libcurses5. At present, the v4l2 control schema is hard-coded in the app based on my ZeroW and HD Sensor. I haven't handled the /boot filesystem remount or perhaps there's a better way? There may be a few bugs hiding in there but thought it was worth sharing for others to test. Please feel free to add to your repo if it's useful.

Thanks for all the great work on the wider project!

Alex

control.c.txt
screenshot

@htruong
Copy link
Contributor

htruong commented Nov 29, 2020

Thanks, let me add to new repo. I will credit you -- also do you want the source to be GPLv3 as well?

@htruong
Copy link
Contributor

htruong commented Nov 29, 2020

The boot.txt remount is fine, it can be handled by a script, no big deal.

@AlexOD42
Copy link
Author

Perfect! Yes please to GPLv3.

@dgsiegel
Copy link
Contributor

Looks good! Agree that we should add a wrapper to handle camera.txt. Additionally, here's few thoughts:

  • I think we should make use of a separate repo under the showmewebcam umbrella, as it would make it easier to integrate this tool via a buildroot package
  • We would need a small Makefile, which handles compilation and installation of the binary (Here's an example you can use https://github.com/peterbay/uvc-gadget/blob/master/Makefile)
  • Would it be possible to make the controls dynamic, ie. read them from v4l2? Here's some info on that: https://www.kernel.org/doc/html/v4.14/media/uapi/v4l/control.html
  • You probably shouldn't use a hard coded filename in the code, make use of a parameter. That way you can also use it outside of showmewebcam
  • Instead of using system(cmd) you want to use V4L2 controls like I mentioned above
  • Do you already have a name for the app?

Love to include this for the next release, thanks for working on it!

@peterbay
Copy link

I'm working on an implementation
cam_control_001

@peterbay
Copy link

aplha version of camera-control - https://github.com/peterbay/camera-control

@dgsiegel
Copy link
Contributor

dgsiegel commented Dec 1, 2020

Thanks @peterbay for stepping in! I've added a pr for this: #57

Here's a few final ideas/topics we should discuss:

  • Currently any existing comments as well as the order in camera.txt are overwritten if we save new settings. Is it worthwhile to keep them?
  • Some settings won't work if others are not enabled, e.g. ISO Sensitivity, while White Balance was merged into one control
  • Some settings are missing their actual names, e.g ISO Sensitivity could be 100, 200, 400, 800 instead of 1,2,3,4
  • Should we filter unneeded controls, e.g. H264?

Other than that great job everybody!

@peterbay
Copy link

peterbay commented Dec 2, 2020

Thanks @dgsiegel for the new ideas.
I've added a new version of camera-control.
Filtering of unneeded controls is now available through -i option. (like -i h264_i_frame_period)
Listing of all available controls is available through -l option.
Added processing for controls of type V4L2 CTRL TYPE MENU - more controls have their correct options. (ISO 100 ...)
At the moment, I don't know how to detect which controls will have no effect on the camera.

@dgsiegel
Copy link
Contributor

dgsiegel commented Dec 2, 2020

I've merged this. Thanks!

@dgsiegel dgsiegel closed this as completed Dec 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants