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

    Need help installing ustreamer

    Scheduled Pinned Locked Moved
    General Discussion
    8
    135
    10.9k
    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.
    • luckyflyerundefined
      luckyflyer
      last edited by

      It took it all now rebooting

      1 Reply Last reply Reply Quote 0
      • luckyflyerundefined
        luckyflyer
        last edited by

        Rebooted and logged on, went to http://192.168.0.181:8080/stream but no image. When I manually start pgm image is there.

        1 Reply Last reply Reply Quote 0
        • A Former User?
          A Former User @gtj0
          last edited by

          in Need help installing ustreamer:

          ###  When the Pi is back up, check the status of the service...
          $ sudo systemctl status ustreamer@video0
          

          anyways, i've got to see a lighthouse about a dog.

          1 Reply Last reply Reply Quote 0
          • luckyflyerundefined
            luckyflyer
            last edited by

            It's see a man about a horse over here, anyway....

            sudo systemctl status ustreamer@video0
            
            pi@duet3:~ $ sudo systemctl status ustreamer@video0
            ● ustreamer@video0.service - UStreamer for video0
               Loaded: loaded (/etc/systemd/system/ustreamer@.service; enabled; vendor prese
               Active: failed (Result: exit-code) since Sun 2020-05-31 00:35:26 MDT; 9min ag
              Process: 351 ExecStart=/usr/local/bin/ustreamer --exit-on-parent-death -r 640x
             Main PID: 351 (code=exited, status=203/EXEC)
            
            May 31 00:35:25 duet3 systemd[1]: Started UStreamer for video0.
            May 31 00:35:25 duet3 systemd[351]: ustreamer@video0.service: Failed to execute
            May 31 00:35:25 duet3 systemd[351]: ustreamer@video0.service: Failed at step EXE
            May 31 00:35:26 duet3 systemd[1]: ustreamer@video0.service: Main process exited,
            May 31 00:35:26 duet3 systemd[1]: ustreamer@video0.service: Failed with result '
            
            pi@duet3:~ $
            
            A Former User? 1 Reply Last reply Reply Quote 0
            • luckyflyerundefined
              luckyflyer
              last edited by luckyflyer

              @bearer I'll pick up on it in 6 to 7 hours pretty worthless now, thanks again.

              gtj0undefined 1 Reply Last reply Reply Quote 0
              • gtj0undefined
                gtj0 @luckyflyer
                last edited by

                @luckyflyer @bearer Well, it looks like you guys made some progress anyway. πŸ™‚

                ### Make sure ustreamer is where the service file thinks it is...
                $ ls -al /usr/local/bin/ustreamer
                ### In a separate terminal window, monitor the service.
                $ sudo journalctl -fu ustreamer@video0
                ### Back in the other terminal window....
                $ sudo systemctl start ustreamer@video0
                ### What shows up in the monitor?
                
                1 Reply Last reply Reply Quote 0
                • A Former User?
                  A Former User @luckyflyer
                  last edited by

                  @luckyflyer said in Need help installing ustreamer:

                  It's see a man about a horse over here, anyway....

                  I did go see an actual lighthouse, anyways OT.

                  sadly the status output cropped all the interesting bits, but i suspect the issue is you haven't installed ustreamer to /usr/local/bin/ustreamer

                  and should change

                  @luckyflyer said in Need help installing ustreamer:

                  Line 6 ExecStart=/usr/local/bin/ustreamer --exit-on-parent-death -r 640x480 --static /tmp/ -d /dev/%i --host=0.0.0.0 --port=8080

                  to ExecStart=/home/pi/ustreamer/ustreamer --exit-on-parent-death -r 640x480 --static /tmp/ -d /dev/%i --host=0.0.0.0 --port=8080

                  or install it to /usr/local

                  gtj0undefined 1 Reply Last reply Reply Quote 0
                  • gtj0undefined
                    gtj0 @A Former User
                    last edited by

                    @bearer Now what are the odds that we'd post pretty much the same thoughts at exactly the same time after almost 7 hours????? πŸ™‚

                    A Former User? 1 Reply Last reply Reply Quote 0
                    • A Former User?
                      A Former User @gtj0
                      last edited by A Former User

                      @gtj0 said in Need help installing ustreamer:

                      @bearer Now what are the odds that we'd post pretty much the same thoughts at exactly the same time after almost 7 hours????? πŸ™‚

                      cant answer now on my way to buy lottery ticket πŸ˜‰

                      1 Reply Last reply Reply Quote 0
                      • luckyflyerundefined
                        luckyflyer
                        last edited by luckyflyer

                        My goodness, I can't believe my bloodshot eyes IT WORKS.
                        Loaded the changes, rebooted and 192.168.0.181 popped up immediately.

                        @bearer and @gtj0 I wish I could buy you guys your favorite beverage.
                        Thanks for staying with it till the end, I'm taking the rest of the day off. πŸ‘ πŸ€™ 😁

                        1 Reply Last reply Reply Quote 1
                        • luckyflyerundefined
                          luckyflyer
                          last edited by

                          I may have spoken a little too soon. When I load @gtj0 's Duetlapse start command (I added the -dontwait so I don't need to start a print)

                          /DuetLapse.py -camera web -weburl http://localhost:8080/stream -duet localhost -seconds 2 -detect none -dontwait
                          

                          I get,

                          Capturing frame     0 after 2.70 seconds elapsed.
                          failed: Connection refused.
                          

                          I played around with this a little yesterday. Duetlapse is not getting the image from

                          localhost:8080/stream
                          

                          for some reason. Any thoughts on this?

                          A Former User? gtj0undefined 2 Replies Last reply Reply Quote 0
                          • A Former User?
                            A Former User @luckyflyer
                            last edited by

                            @luckyflyer said in Need help installing ustreamer:

                            Any thoughts on this?

                            use the force lucky

                            i.e. netstat and systemctl status

                            1 Reply Last reply Reply Quote 1
                            • gtj0undefined
                              gtj0 @luckyflyer
                              last edited by

                              @luckyflyer

                              You're running DuetLapse, ustreamer and DuetSoftwareFramework all on the same Pi yes?

                              1 Reply Last reply Reply Quote 0
                              • luckyflyerundefined
                                luckyflyer
                                last edited by

                                Yes, same pi.

                                1 Reply Last reply Reply Quote 0
                                • luckyflyerundefined
                                  luckyflyer
                                  last edited by

                                  systemctl status,

                                  CGroup: /
                                            β”œβ”€user.slice
                                            β”‚ └─user-1000.slice
                                            β”‚   β”œβ”€session-c3.scope
                                            β”‚   β”‚ β”œβ”€8794 sshd: pi [priv]
                                            β”‚   β”‚ β”œβ”€8805 sshd: pi@pts/1
                                            β”‚   β”‚ β”œβ”€8808 -bash
                                            β”‚   β”‚ β”œβ”€9859 systemctl status
                                            β”‚   β”‚ └─9860 pager
                                            β”‚   β”œβ”€session-c6.scope
                                            β”‚   β”‚ β”œβ”€9742 sshd: pi [priv]
                                            β”‚   β”‚ β”œβ”€9753 sshd: pi@pts/2
                                            β”‚   β”‚ β”œβ”€9756 -bash
                                            β”‚   β”‚ β”œβ”€9827 python3 ./DuetLapse.py -camera web -weburl http://localhost:8080/stream -duet localhost -seconds 5 -detect none
                                            β”‚   β”‚ β”œβ”€9838 /bin/sh -c wget --auth-no-challenge -nv -O /tmp/DuetLapse/IMG00000001.jpeg "http://localhost:8080/stream"
                                            β”‚   β”‚ └─9839 wget --auth-no-challenge -nv -O /tmp/DuetLapse/IMG00000001.jpeg http://localhost:8080/stream
                                            β”‚   β”œβ”€user@1000.service
                                            β”‚   β”‚ β”œβ”€obex.service
                                            β”‚   β”‚ β”‚ └─924 /usr/lib/bluetooth/obexd
                                            β”‚   β”‚ β”œβ”€pulseaudio.service
                                            β”‚   β”‚ β”‚ └─780 /usr/bin/pulseaudio --daemonize=no
                                            β”‚   β”‚ β”œβ”€gvfs-gphoto2-volume-monitor.service
                                            β”‚   β”‚ β”‚ └─842 /usr/lib/gvfs/gvfs-gphoto2-volume-monitor
                                            β”‚   β”‚ β”œβ”€dbus.service
                                            β”‚   β”‚ β”‚ └─696 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
                                            β”‚   β”‚ β”œβ”€gvfs-udisks2-volume-monitor.service
                                            β”‚   β”‚ β”‚ └─832 /usr/lib/gvfs/gvfs-udisks2-volume-monitor
                                            β”‚   β”‚ β”œβ”€gvfs-mtp-volume-monitor.service
                                            β”‚   β”‚ β”‚ └─838 /usr/lib/gvfs/gvfs-mtp-volume-monitor
                                            β”‚   β”‚ β”œβ”€gvfs-goa-volume-monitor.service
                                            β”‚   β”‚ β”‚ └─852 /usr/lib/gvfs/gvfs-goa-volume-monitor
                                            β”‚   β”‚ β”œβ”€gvfs-afc-volume-monitor.service
                                            β”‚   β”‚ β”‚ └─847 /usr/lib/gvfs/gvfs-afc-volume-monitor
                                            β”‚   β”‚ β”œβ”€init.scope
                                            β”‚   β”‚ β”‚ β”œβ”€616 /lib/systemd/systemd --user
                                            β”‚   β”‚ β”‚ └─619 (sd-pam)
                                            β”‚   β”‚ └─gvfs-daemon.service
                                            β”‚   β”‚   β”œβ”€719 /usr/lib/gvfs/gvfsd
                                            β”‚   β”‚   β”œβ”€724 /usr/lib/gvfs/gvfsd-fuse /run/user/1000/gvfs -f -o big_writes
                                            β”‚   β”‚   └─860 /usr/lib/gvfs/gvfsd-trash --spawner :1.4 /org/gtk/gvfs/exec_spaw/0
                                            β”‚   β”œβ”€session-c1.scope
                                            β”‚   β”‚ β”œβ”€ 607 lightdm --session-child 14 17
                                            β”‚   β”‚ β”œβ”€ 683 /usr/bin/lxsession -s LXDE -e LXDE
                                            β”‚   β”‚ β”œβ”€ 712 /usr/bin/ssh-agent x-session-manager
                                            β”‚   β”‚ β”œβ”€ 735 openbox --config-file /home/pi/.config/openbox/lxde-rc.xml
                                            β”‚   β”‚ β”œβ”€ 737 lxpolkit
                                            β”‚   β”‚ β”œβ”€ 740 lxpanel --profile LXDE
                                            β”‚   β”‚ β”œβ”€ 741 pcmanfm --desktop --profile LXDE
                                            β”‚   β”‚ β”œβ”€ 744 /bin/bash /usr/bin/launch-dwc
                                            β”‚   β”‚ β”œβ”€ 748 /usr/lib/chromium-browser/chromium-browser-v7 --disable-quic --enable-tcp-fast-open --ppapi-flash-path=/usr/lib/chromium-browser/libpepflashplayer.so --ppapi-flash-a
                                            β”‚   β”‚ β”œβ”€ 750 /usr/bin/ssh-agent -s
                                            β”‚   β”‚ β”œβ”€ 752 /usr/bin/python3 /usr/bin/blueman-applet
                                  

                                  Net stat partial,

                                  pi@duet3:~ $ netstat -a less
                                  Active Internet connections (servers and established)
                                  Proto Recv-Q Send-Q Local Address           Foreign Address         State
                                  tcp        0      0 0.0.0.0:5900            0.0.0.0:*               LISTEN
                                  tcp        0      0 0.0.0.0:http-alt        0.0.0.0:*               LISTEN
                                  tcp        0      0 0.0.0.0:ssh             0.0.0.0:*               LISTEN
                                  tcp        0      0 localhost:ipp           0.0.0.0:*               LISTEN
                                  tcp        0      0 localhost:33497         localhost:46644         ESTABLISHED
                                  tcp        0      0 192.168.0.181:http-alt  192.168.0.100:62936     ESTABLISHED
                                  tcp        0      0 192.168.0.181:ssh       192.168.0.100:63776     ESTABLISHED
                                  tcp      580      0 192.168.0.181:41818     dfw25s26-in-f14.1:https ESTABLISHED
                                  tcp        0      0 192.168.0.181:ssh       192.168.0.100:54678     ESTABLISHED
                                  tcp        0      0 192.168.0.181:53956     dfw25s27-in-f3.1e:https TIME_WAIT
                                  tcp        0      0 192.168.0.181:41816     dfw25s26-in-f14.1:https ESTABLISHED
                                  tcp        0      0 localhost:51108         localhost:http-alt      TIME_WAIT
                                  tcp        0      0 localhost:46644         localhost:33497         ESTABLISHED
                                  tcp        0      0 192.168.0.181:5900      192.168.0.100:63153     ESTABLISHED
                                  tcp        0    256 192.168.0.181:ssh       192.168.0.100:63873     ESTABLISHED
                                  tcp        0      0 192.168.0.181:ssh       192.168.0.100:63001     ESTABLISHED
                                  tcp        0      9 localhost:35552         duet3:http              ESTABLISHED
                                  tcp6       0      0 [::]:5900               [::]:*                  LISTEN
                                  tcp6       0      0 [::]:http               [::]:*                  LISTEN
                                  tcp6       0      0 [::]:ssh                [::]:*                  LISTEN
                                  tcp6       0      0 localhost:ipp           [::]:*                  LISTEN
                                  tcp6       0     70 192.168.0.181:http      192.168.0.100:56198     ESTABLISHED
                                  tcp6       0      0 duet3:http              localhost:35552         ESTABLISHED
                                  tcp6       1      0 localhost:45790         localhost:ipp           CLOSE_WAIT
                                  tcp6       1      0 localhost:45788         localhost:ipp           CLOSE_WAIT
                                  udp        0      0 0.0.0.0:38957           0.0.0.0:*
                                  udp        0      0 0.0.0.0:bootpc          0.0.0.0:*
                                  udp        0      0 0.0.0.0:ipp             0.0.0.0:*
                                  udp        0      0 224.0.0.251:mdns        0.0.0.0:*
                                  udp        0      0 224.0.0.251:mdns        0.0.0.0:*
                                  udp        0      0 0.0.0.0:mdns            0.0.0.0:*
                                  udp6       0      0 [::]:43679              [::]:*
                                  udp6       0      0 [::]:mdns               [::]:*
                                  raw6       0      0 [::]:ipv6-icmp          [::]:*
                                  

                                  I apologize, I'm not able to gather any useful information from this , Hopefully others can.

                                  gtj0undefined 1 Reply Last reply Reply Quote 0
                                  • gtj0undefined
                                    gtj0 @luckyflyer
                                    last edited by

                                    @luckyflyer ustreamer isn't started. You'd see 0.0.0.0:8080 in the local address column.

                                    So again, run sudo journalctl -fu ustreamer@video0 on one window and in another run sudo systemctl stop ustreamer@video0 then sudo systemctl enable ustreamer@video0, then sudo systemctl start ustreamer@video0

                                    Now check what journalctl is telling you and run sudo netstat -antp.

                                    A Former User? 1 Reply Last reply Reply Quote 0
                                    • A Former User?
                                      A Former User @gtj0
                                      last edited by

                                      @gtj0 said in Need help installing ustreamer:

                                      You'd see 0.0.0.0:8080 in the local address column.

                                      he ran netstat without any options ( -n ), so 0.0.0.0:http-alt would be 0.0.0.0:8080

                                      (I guess i'll be more specific next time)

                                      1 Reply Last reply Reply Quote 0
                                      • luckyflyerundefined
                                        luckyflyer
                                        last edited by luckyflyer

                                        Ran all commands,

                                        pi@duet3:~ $ sudo systemctl stop ustreamer@video0
                                        pi@duet3:~ $ sudo systemctl enable ustreamer@video0
                                        pi@duet3:~ $ sudo systemctl start ustreamer@video0
                                        pi@duet3:~ $ sudo netstat -antp
                                        Active Internet connections (servers and established)
                                        Proto Recv-Q Send-Q Local Address           Foreign Address         State                                                                                                                    PID/Program name
                                        tcp        0      0 0.0.0.0:5900            0.0.0.0:*               LISTEN                                                                                                                   465/vncserver-x11-c
                                        tcp        0      0 0.0.0.0:8080            0.0.0.0:*               LISTEN                                                                                                                   1725/ustreamer
                                        tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN                                                                                                                   485/sshd
                                        tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN                                                                                                                   376/cupsd
                                        tcp        0      0 127.0.0.1:36329         127.0.0.1:36054         ESTABLISHED                                                                                                              790/vncserverui
                                        tcp        0      0 192.168.0.181:22        192.168.0.100:53077     ESTABLISHED                                                                                                              1472/sshd: pi [priv
                                        tcp        0 280040 192.168.0.181:8080      192.168.0.100:53229     ESTABLISHED                                                                                                              1725/ustreamer
                                        tcp        0      0 127.0.0.1:36054         127.0.0.1:36329         ESTABLISHED                                                                                                              465/vncserver-x11-c
                                        tcp        0      0 192.168.0.181:22        192.168.0.100:53112     ESTABLISHED                                                                                                              1558/sshd: pi [priv
                                        tcp        0    208 192.168.0.181:22        192.168.0.100:53086     ESTABLISHED                                                                                                              1523/sshd: pi [priv
                                        tcp        0      0 127.0.0.1:51236         127.0.1.1:80            ESTABLISHED                                                                                                              932/chromium-browse
                                        tcp6       0      0 :::5900                 :::*                    LISTEN                                                                                                                   465/vncserver-x11-c
                                        tcp6       0      0 :::80                   :::*                    LISTEN                                                                                                                   453/DuetWebServer
                                        tcp6       0      0 :::22                   :::*                    LISTEN                                                                                                                   485/sshd
                                        tcp6       0      0 ::1:631                 :::*                    LISTEN                                                                                                                   376/cupsd
                                        tcp6       0      0 192.168.0.181:80        192.168.0.100:53121     TIME_WAIT                                                                                                                -
                                        tcp6       1      0 ::1:36158               ::1:631                 CLOSE_WAIT                                                                                                               442/cups-browsed
                                        tcp6       1      0 ::1:36156               ::1:631                 CLOSE_WAIT                                                                                                               442/cups-browsed
                                        tcp6       0      0 127.0.1.1:80            127.0.0.1:51236         ESTABLISHED                                                                                                              453/DuetWebServer
                                        tcp6       0      0 192.168.0.181:80        192.168.0.100:52855     ESTABLISHED                                                                                                              453/DuetWebServer
                                        pi@duet3:~ $
                                        

                                        This is what I have,
                                        This is what Duetlapse returned

                                        pi@duet3:~ $ ./DuetLapse.py -camera web -weburl http://localhost:8080/stream -du                                                                                                             et localhost -seconds 5 -detect none
                                        Attempting to connect to printer at localhost
                                        Connected to a Duet V3 printer at http://localhost
                                        
                                        ##################################
                                        # Options in force for this run: #
                                        # camera   = web                 #
                                        # printer  = localhost           #
                                        # seconds  = 5.0                 #
                                        # detect   = none                #
                                        # pause    = no                  #
                                        # camparms =                     #
                                        # vidparms =                     #
                                        # movehead =   0.00   0.00       #
                                        # dontwait = False               #
                                        ##################################
                                        
                                        Waiting for print to start on printer localhost
                                        Will take pictures when printing starts,
                                          and make video when printing ends.
                                        Or, press Ctrl+C one time to move directly to conversion step.
                                        
                                        Print start sensed.
                                        End of print will be sensed, and frames will be converted into video.
                                        Or, press Ctrl+C one time to move directly to conversion step.
                                        
                                        Capturing frame     0 after 27.95 seconds elapsed.
                                        failed: Connection refused.
                                        

                                        sudo journalctl -fu ustreamer@video0

                                        
                                        5 HW buffers, got 5
                                        May 31 16:59:00 duet3 ustreamer[1725]: -- INFO  [675.553    stream] -- Capturing                                                                                                              started
                                        May 31 16:59:00 duet3 ustreamer[1725]: -- INFO  [675.553    stream] -- Using JPE                                                                                                             G quality: 80%
                                        May 31 16:59:00 duet3 ustreamer[1725]: -- INFO  [675.553    stream] -- Creating                                                                                                              pool with 4 workers ...
                                        May 31 16:59:00 duet3 ustreamer[1725]: -- INFO  [675.554    stream] -- Capturing                                                                                                              ...
                                        May 31 16:59:00 duet3 ustreamer[1725]: -- INFO  [675.553    stream] -- Using JPE                                                                                                             G quality: 80%
                                        May 31 16:59:00 duet3 ustreamer[1725]: -- INFO  [675.553    stream] -- Creating                                                                                                              pool with 4 workers ...
                                        May 31 16:59:00 duet3 ustreamer[1725]: -- INFO  [675.554    stream] -- Capturing                                                                                                              ...
                                        May 31 16:59:04 duet3 ustreamer[1725]: -- INFO  [679.389      http] -- HTTP: Reg                                                                                                             istered the new stream client: [192.168.0.100]:53229, id=d66596d6-6c20-427a-b97a                                                                                                             -06b1e15307a8; clients now: 1
                                        May 31 17:03:30 duet3 ustreamer[1725]: -- INFO  [945.139      http] -- HTTP: Reg                                                                                                             istered the new stream client: [127.0.0.1]:38592, id=3e9ec971-decd-4c3b-a7c7-c19                                                                                                             ee9a22261; clients now: 2
                                        May 31 17:06:53 duet3 ustreamer[1725]: -- INFO  [1148.478      http] -- HTTP: Di                                                                                                             sconnected the stream client: [127.0.0.1]:38592; clients now: 1
                                        May 31 17:11:37 duet3 ustreamer[1725]: -- INFO  [1432.190      http] -- HTTP: Re                                                                                                             gistered the new stream client: [127.0.0.1]:38616, id=47dbcc78-fb2f-4178-bb95-90                                                                                                             70175cde34; clients now: 2
                                        May 31 17:19:21 duet3 ustreamer[1725]: -- INFO  [1897.003      http] -- HTTP: Di                                                                                                             sconnected the stream client: [127.0.0.1]:38616; clients now: 1
                                        May 31 17:20:03 duet3 ustreamer[1725]: -- INFO  [1938.732      http] -- HTTP: Re                                                                                                             gistered the new stream client: [127.0.0.1]:38642, id=73fb5a45-3617-4d48-b9bd-96                                                                                                             cecb5c01a9; clients now: 2
                                        ^C
                                        pi@duet3:~ $
                                        
                                        

                                        But I'm getting connection refused from Duet lapse.

                                        gtj0undefined 2 Replies Last reply Reply Quote 0
                                        • gtj0undefined
                                          gtj0 @luckyflyer
                                          last edited by

                                          @luckyflyer OK so ustreamer is running now. I'm wondering if DuetLapse isn't connecting properly.

                                          So now try this to see if DuetLapse can connect directly to the camera,,,

                                          $ sudo systemctl stop ustreamer@video0
                                          $ ./DuetLapse.py -camera usb -duet localhost -seconds 5 -dontwait -detect none
                                          1 Reply Last reply Reply Quote 0
                                          • gtj0undefined
                                            gtj0 @luckyflyer
                                            last edited by

                                            @luckyflyer OK, I know what the issue is... You need to use a different URL for ustreamer...

                                            Substitute /stream with /snapshot

                                            ./DuetLapse.py -camera web -weburl http://localhost:8080/snapshot -duet localhost -seconds 5 -detect none
                                            

                                            DuetLapse expects a since JPEG image, not a stream. Sorry about that.

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