Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. ioBroker Allgemein
    4. [HowTo] Anleitung: Einbindung IP-Kamera(s)

    NEWS

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    [HowTo] Anleitung: Einbindung IP-Kamera(s)

    This topic has been deleted. Only users with topic management privileges can see it.
    • lobomau
      lobomau last edited by

      @fu_zhou:

      Hast mal nur rtsp://###.###.###.###:8554/ probiert? `
      Das geht auch nicht. ABer wahrscheinlich läuft motion gar nicht, so dass VLC auch nichts anzeigen kann.

      Nach````
      raspivid -o - -t 0 -w 1280 -h 720 -fps 5 -n | cvlc -vvv stream:///dev/stdin --sout '#rtp{sdp=rtsp://:8554}' :demux=h264

      
      In der Konsole sieht es am Ende dann so aus:
      

      [73d00508] core input debug: Buffering 74%
      [73d00508] core input debug: Buffering 79%
      [73d00508] core input debug: Buffering 84%
      [73d00508] core input debug: Buffering 89%
      [73d00508] core input debug: Buffering 94%
      [73d00508] core input debug: Buffering 99%
      [73d00508] core input debug: Stream buffering done (840 ms in 1 ms)
      [73d00508] core input debug: Decoder wait done in 0 ms
      [73d00508] core input error: ES_OUT_SET_(GROUP_)PCR is called too late (pts_delay increased to 806 ms)
      [73d00508] core input error: ES_OUT_RESET_PCR called
      [73d00508] core input debug: Buffering 0%
      [73d00508] core input debug: Buffering 4%
      [73d00508] core input debug: Buffering 9%
      [73d00508] core input debug: Buffering 14%
      [73d00508] core input debug: Buffering 19%
      [73d00508] core input debug: Buffering 24%
      [73d00508] core input debug: Buffering 29%
      [73d00508] core input debug: Buffering 34%
      [73d00508] core input debug: Buffering 39%
      [73d00508] core input debug: Buffering 44%
      [73d00508] core input debug: Buffering 49%
      [73d00508] core input debug: Buffering 54%
      [73d00508] core input debug: Buffering 59%
      [73d00508] core input debug: Buffering 64%
      [73d00508] core input debug: Buffering 69%
      [73d00508] core input debug: Buffering 74%
      [73d00508] core input debug: Buffering 79%
      [73d00508] core input debug: Buffering 84%
      [73d00508] core input debug: Buffering 89%
      [73d00508] core input debug: Buffering 94%
      [73d00508] core input debug: Buffering 99%
      [73d00508] core input debug: Stream buffering done (840 ms in 1 ms)
      [73d00508] core input debug: Decoder wait done in 0 ms

      1 Reply Last reply Reply Quote 0
      • arteck
        arteck Developer Most Active last edited by

        na dann schau ich mal

        ok…hab da noch was...

        man sollte für die GPU mem allokieren

        gpu_mem=128

        1 Reply Last reply Reply Quote 0
        • lobomau
          lobomau last edited by

          @arteck:

          na dann schau ich mal

          ok…hab da noch was...

          man sollte für die GPU mem allokieren

          gpu_mem=128 `
          das ist das was man unter raspi-config einstellt? Da hatte ich bereits 128 eingestellt.

          1 Reply Last reply Reply Quote 0
          • arteck
            arteck Developer Most Active last edited by

            ok bevor ich jetzt suche…

            wie fummel ich 2 Kameras da rein ??

            1 Reply Last reply Reply Quote 0
            • lobomau
              lobomau last edited by

              @arteck:

              ok bevor ich jetzt suche…

              wie fummel ich 2 Kameras da rein ?? `
              Vielleicht hilft das hier weiter:

               If you only have one camera you only need the motion.conf file but if you have more than one camera, then you will need to have one camera config file per camera plus the motion.conf file.
              
              So if you have for example two cameras you need motion.conf and two camera config files. So a total of three config files.
              
              An option that is common to all cameras can be placed in motion.conf. (You can also put all parameters in the camera files but that makes a lot of editing when you change a common thing).
              
              An option that is unique to a camera must be defined in each camera file.
              
              It is often seen that people copy the entire motion.conf into the camera config files and change a few options. This works but it not recommended because it is more difficult to maintain and overview. Keep all the common options in motion.conf and the few unique only in the camera config files
              
              The first camera is defined in the first camera file called from motion.conf. The 2nd camera is defined in the 2nd camera file called from motion.conf etc.
              
              Any option defined in motion.conf will be used for all cameras except for the cameras in which the same option is defined in a camera config file.
              
              To make it clear, the camera files format and syntax is the same as motion.conf. An example of what you might want in a camera file as follows: assume you have two cameras, attached to one system. Create files camera0.conf and camera1.conf. At the end of motion.conf, uncomment out the lines that refer to them. The full contents of the camera files can be as simple as
              
              camera0.conf:
              videodevice /dev/video0
              stream_port 8081
              
              camera1.conf:
              videodevice /dev/video1
              stream_port 8082
              

              Quelle: http://htmlpreview.github.io/?https://g … guide.html

              1 Reply Last reply Reply Quote 0
              • arteck
                arteck Developer Most Active last edited by

                soweit hab ich schon

                aber

                ich verstehe es auch so das ich 2 gstreamer.service instanzen laufen haben muss

                richtig ??

                1 Reply Last reply Reply Quote 0
                • lobomau
                  lobomau last edited by

                  Kann ich das Ganze auch mit einem stream über http anstatt rtsp machen?

                  Das habe ich jetzt hinbekommen, dass ich einen stream bekomme über http://IP:port

                  Ich bin hier nach vorgegangen:

                  https://www.pcwelt.de/ratgeber/Mit_dem_ … 38548.html

                  1 Reply Last reply Reply Quote 0
                  • fu_zhou
                    fu_zhou last edited by

                    Achtung: bei mir funktioniert v4l2loopback nicht mehr, seitdem ich auf Jessie 4.9 upgegradet habe. Damit wird /dev/video0 nicht mehr erzeugt und gstreamer liefer kein Bild mehr an motion. Ich bin noch auf der Suche, im Moment bin ich auf rtsp mit ffmpeg umgestiegen, was aber eine höhere CPU Last zur Folge hat. Das Installieren der Kernel-Headers ging unter 4.9 wesentlich schneller, als bei der vorherigen Version. Ob es daran liegt?

                    Es wäre Klasse, wenn jemand helfen kann, den v4l2loopback unter Jessie 4.9 wieder ans laufen zu kriegen…

                    1 Reply Last reply Reply Quote 0
                    • M
                      Mike last edited by

                      Hi!

                      Ich habe ein kleines Problem mit dem Motion-Adapter.

                      Ich habe Motion installiert (mittels apt-get), und ich denke, es funktioniert auch soweit.

                      Mein Problem ist jedoch, dass im Adapter keine Reaktion auf die Aktionen von Motion zu sehen sind.

                      Bei korrekter Installation sollte ja zB "lastpicture" den Dateinamen des letzten Bildes enthalten.

                      Tut es aber nicht, und ich bekomme es auch nicht hin.

                      in der motion.conf habe ich auf das Events.sh script verwiesen, und es wird auch ausgeführt.

                      Zusätzlich habe ich fürs debuggen die folgende Zeile eingefügt:

                      echo $json_answer >> $log_file
                      

                      Darin wird, wenn ich zB einen Snapshot erstelle, folgende Zeile geloggt:

                      {"event": "on_picture_save", "thread": 1, "timestamp": "1500020347", "noiselevel": 15, "filename": "/home/motion/01-20170714101907-snapshot.jpg"}
                      

                      wenn ich jetzt aber mit netcat diesen Text übermittle

                      echo {"event": "on_picture_save", "thread": 1, "timestamp": "1500020347", "noiselevel": 15, "filename": "/home/motion/01-20170714101907-snapshot.jpg"} |netcat 127.0.0.1 8093
                      

                      dann wird die Instanz motion.0 für kurze Zeit rot (~45sek), und die Werte werden auch nicht übernommen.

                      den Motion HTTP-Server Port habe ich auf 8091 gesetzt, den Motion Event Port auf 8093 (ebenso in der Events.sh)

                      außerdem belegter POrt :

                      <code>[/# The mini-http server listens to this port for requests (default: 0 = disabled)
                      stream_port 8092
                      code]
                      
                      Die Steuerung über die Objecte in Motion.0.thread0.control funktioniert ... zumindest kann ich einen Snapshot erstellen...
                      Kann mir da jemand sagen, was ich falsch mache?
                      
                      LG Mike
                      
                      Edith sagt:
                      Habe gesehen dass im Netcat Befehl Thread 1 steht, unter den Objekten aber Thread0.
                      Beim Netcat Befehl den Thread auf 0 zu setzen, bringt aber keine Änderung :(</code>
                      
                      1 Reply Last reply Reply Quote 0
                      • M
                        Mike last edited by

                        Soo….

                        Habe jetzt ein Workaround umgesetzt.

                        Statt dem Verweis auf die Events.sh habe ich jetzt direkt in der motion.conf die Einträge für iobroker gemacht.

                        Bsp:

                         # Command to be executed when a picture (.ppm|.jpg|.webp) is saved (default: none)
                        # To give the filename as an argument to a command append it with %f
                        #on_picture_save /usbstick/motion/events.sh on_picture_save %t %s %N %f 	#funktioniert bei mir nicht
                        on_picture_save iobroker state set motion.0.thread0.events.lastpicture %f		#funktioniert ganz gut, hat aber leichte Verzögerungen
                        
                        

                        Ist zwar nicht die sauberste Lösung, aber zumindest funktioniert sie…

                        1 Reply Last reply Reply Quote 0
                        • J
                          Jautze last edited by

                          ` > gstreamer konfigurieren

                          rtsp-Link der Kamera herausfinden, z.B. durch Kamera-Dokumentation, iSpy, Internet-Recherche etc. Der wird dann in der gstreamer.service bei location= eingetragen (s.u. - zwischen … rtspsrc und ! rtph264depay ... - bei mir rtsp://192.168.0.8/Streaming/Channels/101, ich habe noch eine IP-Kamera, da ist es lediglich rtsp://192.168.0.9).

                          Code:

                          sudo nano /etc/systemd/system/gstreamer.service

                          Inhalt:

                          Code:

                          [Unit]

                          Description=Launch and monitor Gstreamer Pipeline

                          [Service]

                          ExecStart=/usr/bin/gst-launch-1.0 rtspsrc location=rtsp://192.168.0.8/Streaming/Channels/101 ! rtph264depay ! h264parse ! omxh264dec ! videoconvert ! tee ! v4l2sink device=/dev/video0

                          Restart=always

                          [Install]

                          WantedBy=multi-user.target `

                          Hallo,

                          ich habe kein rtsp Stream sondern einen MJPEG Stream über http also [http://192.168.1.51/videostream.cgi?use … =Password]

                          und hänge an der gstreamer.service…

                          was muss ich dann hier ändern?

                          ExecStart=/usr/bin/gst-launch-1.0 rtspsrc location=rtsp://192.168.0.8/Streaming/Channels/101 ! rtph264depay ! h264parse ! omxh264dec ! videoconvert ! tee ! v4l2sink device=/dev/video0

                          Danke und viele Grüße

                          Marcel Jaud

                          1 Reply Last reply Reply Quote 0
                          • J
                            Jautze last edited by

                            Hallo,

                            ich habe jetzt das hier probiert:

                            ExecStart=/usr/bin/gst-launch-1.0 souphttpsrc location="[http://192.168.1.51/videostream.cgi?use … =Password]" ! jpegparse ! jpegdec ! x264enc bitrate=512 key-int-max=45 speed-preset=superfast threads=1 ! video/x-h264,stream-format=avc,alignment=au,profile=constrained-baseline ! h264parse ! vaapidecode ! videoconvert ! tee ! v4l2sink device=/dev/video0

                            Aber ich habe auch noch ein Problem mit vainfo:

                            vainfo
                            error: can't connect to X server!
                            error: failed to initialize display
                            Abgebrochen
                            

                            Wer kann mir da helfen???

                            Das ganze läuft in einer Debian VM auf einer DS918+ mit Windows CPU

                            Danke und viele Grüße

                            Marcel Jaud

                            1 Reply Last reply Reply Quote 0
                            • T
                              Thosch last edited by

                              Hallo zusammen,

                              kennt sich hier evtl. noch jemand mit dem motion adapter aus?

                              Ich habe das Problem, dass zwar motion auf meinem ubuntu-server funktioniert, aber nichts an iobroker weitergegeben wird.

                              Befehle wie dieser hier in der motion.conf scheinen nicht ausgeführt zu werden. Weder im log von motion noch im log von iobroker tut sich etwas wenn eine Bewegung erkannt wird. Snapshots werden allerdings erstellt.

                              on_event_start /motion/events.sh on_event_start %t %s %N
                              

                              Außerdem scheint mit der Anbindung der events.sh etwas nicht zu stimmen. Habe spaßeshalber mal mit "sh events.sh" die Datei ausgeführt und plötzlich wurden unter Objekte motion.0 Objekte angelegt, aber der log gibt mir folgende Fehlermeldung aus:

                              host.server	2018-04-23 19:56:01.580	info	Restart adapter system.adapter.motion.0 because enabled
                              host.server	2018-04-23 19:56:01.580	error	instance system.adapter.motion.0 terminated with code 0 (OK)
                              host.server	2018-04-23 19:56:01.580	error	Caught by controller[0]: at TCP.onread (net.js:559:20)
                              host.server	2018-04-23 19:56:01.580	error	Caught by controller[0]: at Socket.Readable.push (_stream_readable.js:134:10)
                              host.server	2018-04-23 19:56:01.580	error	Caught by controller[0]: at readableAddChunk (_stream_readable.js:176:18)
                              host.server	2018-04-23 19:56:01.580	error	Caught by controller[0]: at Socket.emit (events.js:188:7)
                              host.server	2018-04-23 19:56:01.580	error	Caught by controller[0]: at emitOne (events.js:96:13)
                              host.server	2018-04-23 19:56:01.580	error	Caught by controller[0]: at Socket. (/opt/iobroker/node_modules/iobroker.motion/lib/motion_helper.js:66:29)
                              host.server	2018-04-23 19:56:01.580	error	Caught by controller[0]: at EventEmitter.emit (events.js:188:7)
                              host.server	2018-04-23 19:56:01.580	error	Caught by controller[0]: at emitOne (events.js:96:13)
                              host.server	2018-04-23 19:56:01.580	error	Caught by controller[0]: at EventEmitter. (/opt/iobroker/node_modules/iobroker.motion/motion.js:150:27)
                              host.server	2018-04-23 19:56:01.580	error	Caught by controller[0]: at Object.parse (native)
                              host.server	2018-04-23 19:56:01.579	error	Caught by controller[0]: SyntaxError: Unexpected end of JSON input
                              motion.0	2018-04-23 19:56:01.560	error	uncaught exception: Unexpected end of JSON input
                              

                              Hat jemand ne Idee, was bei mir schieflaufen könnte?

                              1 Reply Last reply Reply Quote 0
                              • T
                                Thosch last edited by

                                Benutzt niemand mehr erfolgreich den motion-adapter?

                                1 Reply Last reply Reply Quote 0
                                • First post
                                  Last post

                                Support us

                                ioBroker
                                Community Adapters
                                Donate
                                FAQ Cloud / IOT
                                HowTo: Node.js-Update
                                HowTo: Backup/Restore
                                Downloads
                                BLOG

                                882
                                Online

                                31.7k
                                Users

                                79.8k
                                Topics

                                1.3m
                                Posts

                                8
                                26
                                23040
                                Loading More Posts
                                • Oldest to Newest
                                • Newest to Oldest
                                • Most Votes
                                Reply
                                • Reply as topic
                                Log in to reply
                                Community
                                Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                                The ioBroker Community 2014-2023
                                logo