OrcaSlicer icon indicating copy to clipboard operation
OrcaSlicer copied to clipboard

Support custom IP camera

Open stuomas opened this issue 1 year ago • 7 comments

This allows adding a custom IP camera source from the camera settings popup. Camera stream is shown in a WebView widget with native controls and possible scrollbars stripped away. Original bambulab camera also remains functional if one exists, and a button is added to toggle between them.

Tested on Windows with Bambu Lab P1S.

Demo: pr_gif

stuomas avatar Jan 01 '24 15:01 stuomas

Good job, not possible to display both together or the external camera in popup windows?

Eldenroot avatar Jan 02 '24 09:01 Eldenroot

Good job, not possible to display both together or the external camera in popup windows?

HTML5 video has picture-in-picture out of the box so should be easy to implement. It's available in the native controls that I hid to get more integrated look, but it could be called via its API.

Showing both at the same time shouldn't technically be hard either, but I don't know what is the best way to arrange the videos, or maybe the arrangement should be user adjustable, and then it becomes a hard UX task :)

Both if these could be future PRs though

stuomas avatar Jan 02 '24 10:01 stuomas

HTML5 video has picture-in-picture out of the box so should be easy to implement. It's available in the native controls that I hid to get more integrated look, but it could be called via its API.

I am asking because I have 2 cameras on my printer - one is stock from Bambu, the second one is IP camera attached on the frame. I would like to see both pictures on one screen or at least the second IP camera in the popup window.

Eldenroot avatar Jan 02 '24 21:01 Eldenroot

HTML5 video has picture-in-picture out of the box so should be easy to implement. It's available in the native controls that I hid to get more integrated look, but it could be called via its API.

I am asking because I have 2 cameras on my printer - one is stock from Bambu, the second one is IP camera attached on the frame. I would like to see both pictures on one screen or at least the second IP camera in the popup window.

Added partial support for viewing the custom camera in a popup window, only works for videos that are in a <video> HTML element, like *.mp4s but not for example MJPEG streams. You can try if it works for you (by right-clicking the camera switch icon). I can later drop the commit from this PR if it's deemed too unfinished.

stuomas avatar Jan 03 '24 07:01 stuomas

Great, thank you

Eldenroot avatar Jan 03 '24 07:01 Eldenroot

Builds from this branch can be found from my fork here ~~https://github.com/stuomas/OrcaSlicer/actions/runs/7396272554 (not sure why mac build has failed)~~ in case someone wants to test it out.

EDIT: rebased and now also Mac build works: https://github.com/stuomas/OrcaSlicer/actions/runs/7413929430

stuomas avatar Jan 03 '24 20:01 stuomas

Thank you! This is cool.

SoftFever avatar Jan 07 '24 05:01 SoftFever

(rebased)

Thank you! This is cool.

Thank you, let me know if you want some changes!

stuomas avatar Jan 12 '24 13:01 stuomas

(rebased)

Thank you! This is cool.

Thank you, let me know if you want some changes!

I don't have IP cam so I can't test it by myself. But the changes look good to me.

SoftFever avatar Jan 14 '24 08:01 SoftFever

Awesome to see our idea come to life! Of course all credit to stoumas for the work, but I knew there had to be someone that was interested in it as much as me when I first brought it up!

mysticprysm avatar Jan 15 '24 03:01 mysticprysm

Would it work with ONVIF or RTSP camera feeds?

Nightshade09 avatar Jan 21 '24 21:01 Nightshade09

Would it work with ONVIF or RTSP camera feeds?

wxWebView is basically a web browser, so any URL that plays in your browser should work in here. If you're stuck with RTSP, you could use some intermediate media server (like Node-Media-Server) to create a webpage that plays that stream

stuomas avatar Jan 23 '24 08:01 stuomas

Could this work with a web security camera, like the Wyze?

jesster14 avatar Apr 28 '24 20:04 jesster14