The-EG / OctoPrint-CameraSettings

An OctoPrint plugin that allows a user to interactively change camera settings.
GNU Affero General Public License v3.0
55 stars 7 forks source link

[BUG] Video stream: Colors are not displaing properly #135

Closed xtomasnemec closed 1 year ago

xtomasnemec commented 1 year ago

Observed behavior Colors are not displaing properly They are working properly when i use sudo service webcamd restart Snímek obrazovky 2023-03-20 181832

OctoPrint Version 1.8.7

CameraSettings Plugin Version 0.4.1

Camera Pi Camera V2.1

Linux/OctoPi Octopi 1.0.0

Other Plugins No

The-EG commented 1 year ago

And this does not happen when not using the plugin? The plugin doesn't affect the stream other than setting the specific settings, and this would normally be related to issues outside of this plugin.

xtomasnemec commented 1 year ago

No @The-EG

The-EG commented 1 year ago

What settings have you set? Can you narrow it down to specific settings? Again, this is normally indicative of an issue with the streamer or camera itself and not this plugin.

Maybe said another way: if I can't reproduce this, I can't fix it.

xtomasnemec commented 1 year ago

I only changed the bitrate settings to: Constant Bitrate, Video bitrate: 25000000

xtomasnemec commented 1 year ago

I think i could set sudo service webcamd restart to run at boot but i don't know how to do that.

The-EG commented 1 year ago

Ah, so it does this until you restart webcamd?

xtomasnemec commented 1 year ago

yes

The-EG commented 1 year ago

Ok, not much I can do about that from the plugin. That is not uncommon with the raspicams unfortunately, sometimes the camera service gets started a bit too soon.

You could create a custom system command that will add an item in OctoPrint's system menu (along side shutdown and restart): https://docs.octoprint.org/en/master/configuration/config_yaml.html#system At least then you wouldn't have to ssh in when it happens:

You'd need to add the following to octoprint's config.yaml in the proper section:

system:
    actions:
    -   action: Restart Webcam
        command: sudo service webcamd restart
        confirm: You are about to restart the webcam.
        name: Restart Webcam
xtomasnemec commented 1 year ago

I added .sh to /etc/init.d/ and that should work

xtomasnemec commented 1 year ago

I added the command to event manger image