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

[FR] Raspicam - change resolution without a reboot? #24

Open
Naugrimohtar opened this issue Apr 30, 2021 · 4 comments
Open

[FR] Raspicam - change resolution without a reboot? #24

Naugrimohtar opened this issue Apr 30, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@Naugrimohtar
Copy link

So today I can change RaspiCam resolution via editing '/boot/octopi.txt' an then rebooting...
Is there a way to change it on the fly? Incorporate into this plugin? This would be hugely helpful!

@Naugrimohtar Naugrimohtar added enhancement New feature or request needs review labels Apr 30, 2021
@The-EG
Copy link
Owner

The-EG commented Apr 30, 2021

I'll put this on the TODO list to research.

It's technically possible to send a request to set the resolution in a similar manner to how the controls are set, but since mjpg-streamer is expecting the stream to be of a particular size I'm not sure how well it would behave if it suddenly changes without warning.

uStreamer might work better since it seems to be able to handle changes and even a lack of the camera stream better...

In any case, this will require some testing and thought!

edit: FWIW, I think you can do that without a reboot already. Changing /boot/octopi.txt and then running sudo systemctl restart webcamd should work.

@BobCraig10
Copy link

That would be a great addition to a WONDERFUL plugin! Great job!!

@Naugrimohtar
Copy link
Author

Naugrimohtar commented Apr 30, 2021

Just as an asside sudo systemctl restart webcamd did work to try changes to /boot/octopi.txt

For those curious, I have two RaspiCam versions and here are the settings I found that work best for me:
Old (V1 camera)
camera_usb_options="-r 1296x972 -f 20"

New (V2 camera)
camera_usb_options="-r 1280x960 -f 20"

The following website helped me learn more about the native resultions for them:
Camera Modes

@The-EG
Copy link
Owner

The-EG commented Apr 30, 2021

If you ever want to use higher resolutions (at the cost of FPS), check out the modprobe options described: here. (uStreamer itself is also a nice alternative to mjpg-streamer)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants