• Tags
  • Documentation
  • Order
  • Register
  • Login
Duet3D Logo Duet3D
  • Tags
  • Documentation
  • Order
  • Register
  • Login

[Video] Adding a USB Webcam to DWC with a Raspberry Pi

Scheduled Pinned Locked Moved
Third-party software
6
16
1.4k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • undefined
    stuartofmt @Phaedrux
    last edited by 5 Jan 2021, 18:12

    @Phaedrux

    Sorry - I have DWiFi Server 1.23 and DWC 3.1.1 -- looked but didn't look 😞

    1 Reply Last reply Reply Quote 1
    • undefined
      fractalengineer
      last edited by 5 Jan 2021, 19:56

      brilliant, thank you. I never knew how to make it work but that step by step guide is of great help.

      I seem to be stuck halfway though; I installed snapd and mjpg streamer and everything seems to be running well (see the snapd process)

      pi@duet3:~ $ ps -A
      PID TTY TIME CMD
      1 ? 00:00:06 systemd
      2 ? 00:00:00 kthreadd
      3 ? 00:00:00 rcu_gp
      4 ? 00:00:00 rcu_par_gp
      7 ? 00:00:00 kworker/u8:0-events_unbound
      8 ? 00:00:00 mm_percpu_wq
      9 ? 00:00:00 ksoftirqd/0
      10 ? 00:00:00 rcu_sched
      11 ? 00:00:00 migration/0
      12 ? 00:00:00 cpuhp/0
      13 ? 00:00:00 cpuhp/1
      14 ? 00:00:00 migration/1
      15 ? 00:00:00 ksoftirqd/1
      18 ? 00:00:00 cpuhp/2
      19 ? 00:00:00 migration/2
      20 ? 00:00:00 ksoftirqd/2
      23 ? 00:00:00 cpuhp/3
      24 ? 00:00:00 migration/3
      25 ? 00:00:00 ksoftirqd/3
      28 ? 00:00:00 kdevtmpfs
      29 ? 00:00:00 netns
      30 ? 00:00:00 kworker/0:1-events
      32 ? 00:00:00 kauditd
      33 ? 00:00:00 khungtaskd
      34 ? 00:00:00 oom_reaper
      35 ? 00:00:00 writeback
      36 ? 00:00:00 kcompactd0
      54 ? 00:00:00 kblockd
      55 ? 00:00:00 blkcg_punt_bio
      56 ? 00:00:00 watchdogd
      58 ? 00:00:00 rpciod
      59 ? 00:00:00 kworker/u9:0-hci0
      60 ? 00:00:00 xprtiod
      61 ? 00:00:00 kswapd0
      62 ? 00:00:00 nfsiod
      64 ? 00:00:00 iscsi_eh
      65 ? 00:00:00 dwc_otg
      66 ? 00:00:00 DWC Notificatio
      67 ? 00:00:00 kworker/1:2-events
      68 ? 00:00:00 vchiq-slot/0
      69 ? 00:00:00 vchiq-recy/0
      70 ? 00:00:00 vchiq-sync/0
      71 ? 00:00:00 vchiq-keep/0
      72 ? 00:00:00 SMIO
      73 ? 00:00:00 kworker/1:3-events_freezable
      74 ? 00:00:00 mmc_complete
      75 ? 00:00:00 kworker/1:1H-kblockd
      76 ? 00:00:00 kworker/0:1H-mmc_complete
      77 ? 00:00:00 jbd2/mmcblk0p2-
      78 ? 00:00:00 ext4-rsv-conver
      79 ? 00:00:00 kworker/0:2H-kblockd
      80 ? 00:00:00 ipv6_addrconf
      84 ? 00:00:00 kworker/2:1H-kblockd
      86 ? 00:00:00 kworker/3:1H-kblockd
      101 ? 00:00:00 kworker/1:2H
      102 ? 00:00:00 kworker/3:2H-kblockd
      108 ? 00:00:00 irq/166-usb-001
      111 ? 00:00:00 kworker/2:2H-kblockd
      123 ? 00:00:03 systemd-journal
      144 ? 00:00:01 kworker/u8:2-events_unbound
      148 ? 00:00:01 systemd-udevd
      149 ? 00:00:00 loop0
      150 ? 00:00:00 loop1
      172 ? 00:00:00 SMIO
      179 ? 00:00:00 mmal-vchiq
      180 ? 00:00:01 spi0
      183 ? 00:00:00 mmal-vchiq
      186 ? 00:00:00 mmal-vchiq
      189 ? 00:00:00 mmal-vchiq
      233 ? 00:00:00 cfg80211
      241 ? 00:00:00 brcmf_wq/mmc1:0
      244 ? 00:00:00 brcmf_wdog/mmc1
      321 ? 00:00:00 systemd-timesyn
      358 ? 00:00:00 cron
      359 ? 00:00:00 rsyslogd
      360 ? 00:00:00 dbus-daemon
      362 ? 00:01:25 DuetControlServ
      363 ? 00:00:00 thd
      366 ? 00:00:00 wpa_supplicant
      368 ? 00:00:00 rngd
      373 ? 00:00:00 avahi-daemon
      374 ? 00:00:00 alsactl
      377 ? 00:00:00 systemd-logind
      397 ? 00:00:02 snapd
      425 ? 00:00:00 avahi-daemon
      471 ? 00:00:00 wpa_supplicant
      479 ? 00:00:00 kworker/3:4-events_power_efficient
      534 ? 00:00:02 irq/167-dcs-trp
      549 ? 00:00:00 kworker/2:2-events
      553 ? 00:00:00 hciattach
      555 ? 00:00:00 kworker/u9:1-hci0
      557 ? 00:00:00 bluetoothd
      558 ? 00:00:00 bluealsa
      573 ? 00:00:00 krfcommd
      628 ? 00:00:00 dhcpcd
      633 ? 00:00:21 DuetWebServer
      645 tty1 00:00:00 agetty
      654 ? 00:00:00 sshd
      666 ? 00:00:00 sshd
      795 ? 00:00:00 systemd
      796 ? 00:00:00 (sd-pam)
      810 ? 00:00:00 sshd
      811 pts/0 00:00:00 bash
      834 pts/0 00:00:00 sudo
      835 pts/0 00:00:00 nano
      984 ? 00:00:00 kworker/0:0-events
      985 ? 00:00:00 kworker/3:1-cgroup_destroy
      988 ? 00:00:00 kworker/2:0-mm_percpu_wq
      994 ? 00:00:00 kworker/0:0H
      995 ? 00:00:00 kworker/3:0H
      996 ? 00:00:00 kworker/1:0-events
      1005 ? 00:00:00 kworker/u8:1-events_unbound
      1053 ? 00:00:00 kworker/3:0-events_power_efficient
      1154 ? 00:00:00 kworker/0:2-events
      1157 ? 00:00:00 kworker/2:1-events
      1159 pts/0 00:00:00 ps

      mjpg is well installed

      pi@duet3:~ $ sudo snap install mjpg-streamer
      snap "mjpg-streamer" is already installed, see 'snap help refresh'

      And I've copied exactly the same config file as yours

      pi@duet3:~ $ sudo nano /var/snap/mjpg-streamer/current/config
      GNU nano 3.2 /var/snap/mjpg-streamer/current/config
      INPUTOPTS="input_uvc.so -y -r 640x480 -d /dev/video0"
      PORT="-p 8080"
      DAEMON="true"

      And yet when I enter my duet IP :8080, I get no response.

      Any hint on what could be the issue?

      Using a RPi 3B+ on Duet3

      Thanks!

      Railcore II ZL

      1 Reply Last reply Reply Quote 0
      • undefined
        PCR
        last edited by 5 Jan 2021, 20:08

        Which USB Camera are you using?

        undefined 1 Reply Last reply 6 Jan 2021, 04:20 Reply Quote 0
        • undefined
          fractalengineer @PCR
          last edited by 6 Jan 2021, 04:20

          @PCR well I'm not; I got a raspi cam.

          My first attempt was with the line INPUTOPTS="input_raspi.so" as described in the guide but that didn't work out either.

          I thought I would try with your config that seemed to be working as it seems the issue is with the interface not loading; I would assume if the camera was setup wrong the GUI would still load, just show no image.

          Railcore II ZL

          1 Reply Last reply Reply Quote 0
          • undefined
            PCR
            last edited by 6 Jan 2021, 05:45

            Sorry. Raspi Cam is Not working with the SNAP. Interface will only be loade when camera is working.

            I saw on github a new plugin for raspi cams for DWC

            Best

            1 Reply Last reply Reply Quote 0
            • undefined
              PCR
              last edited by 6 Jan 2021, 09:11

              @fractalengineer

              use this

              https://desertbot.io/blog/how-to-stream-the-picamera

              undefined 1 Reply Last reply 6 Jan 2021, 11:53 Reply Quote 1
              • undefined
                fractalengineer @PCR
                last edited by 6 Jan 2021, 11:53

                @PCR Thanks, I did manage to get it working just for a few moments before it froze and I can't get it to run again lol (the interface load, not the cam)

                But I'll keep trying and keep you posted

                Railcore II ZL

                1 Reply Last reply Reply Quote 0
                • undefined
                  gdefranc
                  last edited by 7 Jan 2021, 06:59

                  Installed on rasp pi3 with octoprint and activated on DWC with Logitech C270 webcam. It works.
                  Now I have to fix the Timelapse.

                  undefined 1 Reply Last reply 7 Jan 2021, 08:29 Reply Quote 0
                  • undefined
                    PCR @gdefranc
                    last edited by 7 Jan 2021, 08:29

                    @gdefranc with duetlapse easy. But use the snapshot Screen of Mjpg

                    1 Reply Last reply Reply Quote 0
                    • undefined
                      PCR
                      last edited by 7 Jan 2021, 08:30

                      And the DuetAPI from @jay_s_uk

                      1 Reply Last reply Reply Quote 0
                      • undefined
                        fma
                        last edited by 7 Jan 2021, 11:54

                        You can turn a Pi zero+ cam as a usb webcam, using https://github.com/showmewebcam/showmewebcam

                        Frédéric

                        1 Reply Last reply Reply Quote 0
                        • undefined
                          Phaedrux Moderator
                          last edited by 7 Jan 2021, 18:09

                          I use a PizeroW with the Pi cam module and MotionOS to turn it into a webcam. It works very well with DWC and makes for a very small and very functional cam.

                          https://github.com/ccrisan/motioneyeos/wiki

                          Z-Bot CoreXY Build | Thingiverse Profile

                          1 Reply Last reply Reply Quote 0
                          14 out of 16
                          • First post
                            14/16
                            Last post
                          Unless otherwise noted, all forum content is licensed under CC-BY-SA