FormerLurker / Octolapse

Stabilized timelapses for Octoprint
GNU Affero General Public License v3.0
637 stars 99 forks source link

Custom Imagine Settings not working #648

Closed eblieb closed 3 years ago

eblieb commented 3 years ago

When I attempt to customize the image settings of my RPi Camera v1.3 I keep getting

Unable To Enable Custom Preferences An unexpected error was raised while testing custom image preferences for the 'Webcam - Default OctoPi 0.16.0' camera profile.

If this is a feature request describe it here

_REPLACE_THISFEATURE_REQUEST_DESCRIPTION_GOES_HERE

Version of Octolapse

Octolapse Version: _REPLACE_THISOCTOLAPSE_VERSION_GOES_HERE

Version of OctoPrint

OctoPrint Version: _REPLACE_THISOCTOPRINT_VERSION_GOES_HERE

When you ran into the problem, did you have diagnostic logging enabled?

Diagnostic Logging was Enabled: _REPLACE_THISYES_OR_NO

What were you doing when the problem occurred

  1. _REPLACE_THISSTEP_ONE_GOES_HERE
  2. _REPLACE_THISSTEP_TWO_GOES_HERE
  3. _REPLACE_THISSTEP_...

What should have happened?

_REPLACE_THISPUT_YOUR_DESCRIPTION_HERE

What happened instead?

_REPLACE_THISPUT_YOUR_DESCRIPTION_HERE

Operating System running OctoPrint and Octolapse

OS Name: _REPLACE_THISOS_NAME_GOES_HERE Os Version: _REPLACE_THISOS_VERSION_GOES_HERE

Printer model & used firmware incl. version

Printer Model: _REPLACE_THISPRINTER_MODEL_GOES_HERE Printer Firmware Version: _REPLACE_THISPRINTER_FIRMWARE_VERSION_GOES_HERE

Browser and version of browser, operating system running browser

Browser: _REPLACE_THISBROWSER_VERSION_GOES_HERE Browser OS: _REPLACE_THISBROWSER_OS_GOES_HERE

Link to the gcode file you were printing when the problem occurred

Link to Gcode File: _REPLACE_THISGCODE_FILE_LINK_GOES_HERE

Link to settings.json

Link to settings.json with all passwords removed: _REPLACE_THISSETTINGS_JSON_LINK_GOES_HERE

Link to plugin_octolapse.log

Link to plugin_octolapse.log: LINK_GOES_HERE

Link to octoprint.log

Link to octoprint.log: _REPLACE_THISLINK_GOES_HERE

Link to contents of Javascript console in the browser

Link to javascript console output: _REPLACE_THISLINK_GOES_HERE

Screenshots and/or videos of the problem:

Screenshot/Video Links: _REPLACE_THISLINKs_GO_HERE

Please consider becoming a patron

If you like this project, please support my work by becoming a patron, and consider adding a 'star' to the repository. It takes a lot of time and effort to maintain the project and respond to issues. The cost of test prints, software, cameras, printer parts, etc. can quickly add up, so every bit helps.

You can find various videos and tutorials by subscribing to my Youtube channel. You can also follow me on Twitter.

eblieb commented 3 years ago

I pulled the log and this is what I am getting 2020-12-10 19:26:54,032 - octolapse.camera - ERROR - An unexpected error was raised while testing custom image preferences for the 'Webcam - Default OctoPi 0.16.0' camera profile. Traceback (most recent call last): File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_octolapse/camera.py", line 450, in _test_mjpg_streamer_control raise CameraError("mjpg_streamer_control_error", message) CameraError: mjpg_streamer_control_error: The server denied access to the mjpg-streamer control.htm for the 'Webcam - Default OctoPi 0.16.0' camera profile. Please see this link to correct this error., or disable the 'Enable And Apply Preferences at Startup' and 'Enable And Apply Preferences Before Print' options.

FormerLurker commented 3 years ago

Are you running octoprint anywhere or the spaghetti detective? If so, they have a compatibility mode that should fix this. Also, did you follow the link in the log you posted?

eblieb commented 3 years ago

So there are 2 sets of instructions that are different https://github.com/FormerLurker/Octolapse/wiki/V0.4---Configuring-a-Raspberry-Pi-Camera and https://github.com/FormerLurker/Octolapse/wiki/V0.4---Enabling-Camera-Controls

They have different instructions

Edit: No I am not running octoprint anywhere nor spaghetti detective. I had installed spaghetti detective but then uninstalled it.

FormerLurker commented 3 years ago

Thats right. One is for a raspberry pi cam. One is for a usb cam. However, the error says you aren't using mjpgstreamer. Is that true? How are you streaming, and what camera are you using?

eblieb commented 3 years ago

Got it working. I am using a Raspberry Pi Camera v1.3 on the camera ribbon connection.

"V0.4 Configuring a Raspberry Pi Camera" - This is a misleading title because it is setting up a USB Camera on a Raspberry Pi. Not a Raspberry Pi Camera.

FormerLurker commented 3 years ago

Sorry of that was misleading, but that is what the camera is called. I wish it were more clear. Do you have a suggestion for improvement?

eblieb commented 3 years ago

One problem is both of the instructions show a Logitech C920 being installed, which makes it confusing if this is actually a Raspberry Pi Camera or a USB camera. I guess having a set of instructions for the Raspberry Pi v1, v1.3 and v2.0 camera.. Or Raspberry Pi Camera via Ribbon Connector.

eblieb commented 3 years ago

Oh I did notice another issue, not sure if you want me to open a new issue for it. But when you check Image Stabilization it zooms into a section of the image (which is expected) but when you uncheck it, it doesnt zoom back out.

FormerLurker commented 3 years ago

Yeah, that's a known issue with the driver. Long story short, image stabilization is bad for a timelapse. Don't turn it on.

Glad you got things working! I will try to make the docs more clear. I've been spending most of my time recent working on the arc welder plugin, which you may want to check out, but hope to get to some octolapse stuff again soon. One of the things I would like to do is create a custom streaming server that makes webcam controls and streaming better and easier. It just takes time and effort.

eblieb commented 3 years ago

Yup been using ArcWelder for the past few days and love it. Only issue with it is the conflict with PrintTimeGenius where they both analyze at the same time, then arcwelder replaces the original file and PrintTimeGenius has to reanalyze the file agian.

FormerLurker commented 3 years ago

Interesting that you mentioned that. I was just looking to see of stopping the analysis queue was possible. Apparently it is!

FormerLurker commented 3 years ago

Hey, I just implemented removing the source file from the analysis queue IF it will be overwritten within Arc Welder. You can try it by installing via the plugin manager by clicking get more and pasting this into the 'from url...' box: https://github.com/FormerLurker/ArcWelderPlugin/archive/8754b74bb5255eb52e67bd8e04e95404bba4b61d.zip

let me know what you think.

eblieb commented 3 years ago

Will do! Right now I am trying to tune out the elephant foot from my prints :( Not sure what else to try to tune it out but guess I can mess with bed temp a little more

FormerLurker commented 3 years ago

Sometimes that is caused by the nozzle being too low, or filament diameter issues. Sometimes not. Definitely good luck with that though, and I look forward to hearing about your results!

eblieb commented 3 years ago

Installed and it ran when I uploaded my new calibration cube. Was much faster than previously (guessing because the file isn't being locked up by PrintTimeGenius and ArcWelder at the same time). Will test it a little more with some large files once I get this elephant foot worked out.

FormerLurker commented 3 years ago

Was much faster than previously

There are two reasons for this:

  1. You mentioned, no analysis running on the same thread
  2. There was a bug in the C++ logging code. It sends info back to python when logging things, and it turns out all loggers were always enabled within C++, but they weren't getting outputted from python because the module level loggers were/might have been off. Though c++ is really fast when creating the logging strings, calling back into python is painfully slow, so this was probably the bulk of the speedup.
eblieb commented 3 years ago

So i replaced the RPi camera with an Amcrest USB cable. It is working but I have it mounted upside down and for some reason cant get it to rotate 180 degrees. Also I keep getting this notification everytime I open octolapse

New Image Preferences Available Octolapse has detected new camera preferences from your streaming server. Do you want to overwrite your current image preferences?

FormerLurker commented 3 years ago

It is working but I have it mounted upside down and for some reason cant get it to rotate 180 degrees.

image

Octolapse has detected new camera preferences from your streaming server. Do you want to overwrite your current image preferences?

I will look into that. It should not keep asking you. OUt of curiosity, what happens if you click yes?

eblieb commented 3 years ago

It changed all the settings and didn't ask me again. It turns out it rotated the video fine in the control tab, but in the octolapse preview tab it is still rotated the wrong way.

FormerLurker commented 3 years ago

It turns out it rotated the video fine in the control tab, but in the octolapse preview tab it is still rotated the wrong way.

The control tab is different since it just has to adjust the visuals. Octolapse actually must physically rotates the images. Was the timelapse in the correct orientation when you set the Octolapse Camera profile to rotate 180 degrees?

FormerLurker commented 3 years ago

I'm closing this out since it has not been updated in a while. Let me know if you want me to reopen it. Thanks!

eblieb commented 3 years ago

Hey can you push Arcwelder RC2 to final?

From: FormerLurker notifications@github.com Sent: Friday, December 11, 2020 11:46 To: FormerLurker/Octolapse Octolapse@noreply.github.com Cc: eblieb numus19@gmail.com; Author author@noreply.github.com Subject: Re: [FormerLurker/Octolapse] Custom Imagine Settings not working (#648)

Hey, I just implemented removing the source file from the analysis queue IF it will be overwritten within Arc Welder. You can try it by installing via the plugin manager by clicking get more and pasting this into the 'from url...' box: https://github.com/FormerLurker/ArcWelderPlugin/archive/8754b74bb5255eb52e67bd8e04e95404bba4b61d.zip

let me know what you think.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/FormerLurker/Octolapse/issues/648#issuecomment-743302338 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AE4D4LPNK42ETWVWFGZER63SUJEE3ANCNFSM4UVZ32TA . https://github.com/notifications/beacon/AE4D4LNUDA6ILY6PLJ2722TSUJEE3A5CNFSM4UVZ32TKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOFRG6JQQ.gif

FormerLurker commented 3 years ago

I'm in the process of doing that. It took a while to get enough feedback so that I felt confident it was working. Since the initial release I've printed maybe 50 hours of files with the newest version, and have gotten enough feedback from both the plugin and the console version.

Fyi, this is the Octolapse repo :)