Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Visualisierung
    4. [HowTo] rtsp mit ffmpeg für vis konvertieren

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    [HowTo] rtsp mit ffmpeg für vis konvertieren

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

      Da fehlt ein Backslash \ nach real_stream

      Gesendet von iPad mit Tapatalk

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

        😄 😄 😄 … und läuft!

        Ganz herzlichen Dank :!:

        1 Reply Last reply Reply Quote 0
        • H
          HoffmannOs last edited by

          ` > * javascript.0 2018-12-28 01:22:59.897 info script.js.Alarmanlage.ffmpeg: ffmpeg has exited unexpected! Restart in 30s!

          javascript.0 2018-12-28 01:22:59.897 info script.js.Alarmanlage.ffmpeg: getState(id=ffmpegCam.run, timerId=0) => [object Object]
          
          javascript.0 2018-12-28 01:22:59.897 info script.js.Alarmanlage.ffmpeg: ffmpeg error: ffmpeg version 3.2.12-1~deb9u1 Copyright © 2000-2018 the FFmpeg developers built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516 configuration: --pre
          
          javascript.0 2018-12-28 01:22:54.447 info script.js.Alarmanlage.ffmpeg: ffmpeg stop failed: ffmpeg: Kein Prozess gefunden
          
          javascript.0 2018-12-28 01:22:54.447 info script.js.Alarmanlage.ffmpeg: exec: ffmpeg -i "rtsp://xxx:xxxx12@192.168.181.53:554/onvif/profile1/media.smp" [http://localhost:8090/ipcam1.ffm](http://localhost:8090/ipcam1.ffm)
          
          javascript.0 2018-12-28 01:22:54.447 info script.js.Alarmanlage.ffmpeg: ffmpeg start...
          
          javascript.0 2018-12-28 01:22:54.447 info script.js.Alarmanlage.ffmpeg: exec: killall ffmpeg
          
          javascript.0 2018-12-28 01:22:54.447 info script.js.Alarmanlage.ffmpeg: ffmpeg stop...
          
          javascript.0 2018-12-28 01:22:54.447 warn script.js.Alarmanlage.ffmpeg: clearTimeout() => not found
          
          javascript.0 2018-12-28 01:22:54.447 info script.js.Alarmanlage.ffmpeg: setForeignState(id=javascript.0.ffmpegCam.statistics.cntRestart, state=45)
          
          javascript.0 2018-12-28 01:22:54.447 info script.js.Alarmanlage.ffmpeg: getState(id=ffmpegCam.statistics.cntRestart, timerId=0) => [object Object]
          
          javascript.0 2018-12-28 01:22:54.447 info script.js.Alarmanlage.ffmpeg: setForeignState(id=javascript.0.ffmpegCam.statistics.lastRestart, state="2018-12-28 01:22:54")
          
          javascript.0 2018-12-28 01:22:24.421 info script.js.Alarmanlage.ffmpeg: setTimeout(ms=30000)
          
          javascript.0 2018-12-28 01:22:24.421 info script.js.Alarmanlage.ffmpeg: ffmpeg has exited unexpected! Restart in 30s!
          
          javascript.0 2018-12-28 01:22:24.421 info script.js.Alarmanlage.ffmpeg: getState(id=ffmpegCam.run, timerId=0) => [object Object]
          
          javascript.0 2018-12-28 01:22:24.418 info script.js.Alarmanlage.ffmpeg: ffmpeg error: ffmpeg version 3.2.12-1~deb9u1 Copyright © 2000-2018 the FFmpeg developers built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516 configuration: --pre
          
          javascript.0 2018-12-28 01:22:18.922 info script.js.Alarmanlage.ffmpeg: exec: ffmpeg -i "rtsp://xxx:xx@192.168.181.53:554/onvif/profile1/media.smp" [http://localhost:8090/ipcam1.ffm](http://localhost:8090/ipcam1.ffm)
          
          javascript.0 2018-12-28 01:22:18.922 info script.js.Alarmanlage.ffmpeg: ffmpeg start...
          
          javascript.0 2018-12-28 01:22:18.921 info script.js.Alarmanlage.ffmpeg: Start ffmpeg...
          
          javascript.0 2018-12-28 01:22:18.921 info script.js.Alarmanlage.ffmpeg: Run state changed from false to true
          
          javascript.0 2018-12-28 01:22:05.055 info script.js.Alarmanlage.ffmpeg: exec: /usr/bin/ffserver &
          
          javascript.0 2018-12-28 01:22:05.055 info script.js.Alarmanlage.ffmpeg: ffserver start... `  
          

          ich bekomme immer diesen fehler. kann mir jemand helfen?

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

            Das ist eventuell der gleiche Fehler wie bei mir.

            aus

            rtsp://xxx:xx@192.168.181.53:554/onvif/profile1/media.smp
            

            muss

            rtsp://xxx:xx@192.168.181.53:554/onvif/profile1/media.smp\
            

            werden. dann sollte es funktionieren.

            Allerdings wundert mich die Adresse. Bist du sicher das da drüber der Stream kommt?

            Allerdings funktioniert bei mir jetzt zwar das Script, aber der Stream leider nicht. 😢

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

              Ob der Stream funktioniert kannst du schnell mit VLC unter "Medien –> Netzwerkstream öffnen" testen.

              1 Reply Last reply Reply Quote 0
              • A
                aleks-83 last edited by

                Ich versuche auch gerade einen restream per ffmpeg aufzubauen.
                Habe aber ein Problem.

                Irgendwie scheitert die Verbindung zum localhost.
                Ich habe auch versucht localhost durch 127.0.0.1 oder die IP des servers zu ersetzen.
                Keine Änderung...

                ffmpeg version 3.2.12-1~deb9u1 Copyright (c) 2000-2018 the FFmpeg developers
                  built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516
                  configuration: --prefix=/usr --extra-version='1~deb9u1' 
                --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu 
                --enable-gpl --disable-stripping --enable-avresample --enable-avisynth 
                --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray 
                --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libebur128 
                --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi
                 --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libopenjpeg
                 --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband 
                --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex 
                --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis 
                --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 
                --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx 
                --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 
                --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv 
                --enable-libx264 --enable-shared
                  libavutil      55. 34.101 / 55. 34.101
                  libavcodec     57. 64.101 / 57. 64.101
                  libavformat    57. 56.101 / 57. 56.101
                  libavdevice    57.  1.100 / 57.  1.100
                  libavfilter     6. 65.100 /  6. 65.100
                  libavresample   3.  1.  0 /  3.  1.  0
                  libswscale      4.  2.100 /  4.  2.100
                  libswresample   2.  3.100 /  2.  3.100
                  libpostproc    54.  1.100 / 54.  1.100
                Input #0, rtsp, from 'rtsp://USER:PASS@10.0.0.21:554/Streaming/Channels/102':
                  Metadata:
                    title           : Media Presentation
                  Duration: N/A, start: 0.310000, bitrate: N/A
                    Stream #0:0: Video: h264 (Main), yuvj420p(pc, bt709, progressive), 640x360 [SAR 1:1 DAR 16:9], 20 fps, 25 tbr, 90k tbn, 40 tbc
                [tcp @ 0x55fc826e03a0] Connection to tcp://localhost:8090 failed (Connection refused), trying next address
                [tcp @ 0x55fc826e03a0] Connection to tcp://localhost:8090 failed: Connection refused
                http://localhost:8090/Eingang.ffm: Connection refused
                
                

                Der FFserver bzw. das WebIF ist aber auch nicht über die IP.des.Servers:8090 zu erreichen...
                Das scheint wohl das Problem zu sein.

                1 Reply Last reply Reply Quote 0
                • A
                  aleks-83 last edited by aleks-83

                  Weiß niemand warum der ffserver nicht unter 8090 zu erreichen ist?

                  Welche Befehle oder stati kann ich checken um ihn zum Laufen zu bekommen?

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

                    Gibt wenn ich mich nicht täusche für ffmpeg Optionen zum erweiterten Loggen. Mal googeln und schauen ob es mehr infos gibt.

                    1 Reply Last reply Reply Quote 0
                    • A
                      aleks-83 last edited by aleks-83

                      @wendy2702 @eastcoast
                      Ich habe den ffmpeg Server nochmal mit einem Ubuntu 18.04 aufgesetzt.
                      Das läuft jetzt soweit besser durch.
                      Den Loglevel habe ich aber auch mal auf debug gesetzt.

                      Jetzt bekomme ich eine 404 Meldung:

                      root@ffmpeg:~# ffmpeg -loglevel debug -i "rtsp://ffmpeg:stream123@10.0.0.21:554/Streaming/Channels/102/" http://10.0.0.17:8090/eingang.ffm
                      ffmpeg version 3.4.4-0ubuntu0.18.04.1 Copyright (c) 2000-2018 the FFmpeg developers
                        built with gcc 7 (Ubuntu 7.3.0-16ubuntu3)
                        configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
                        libavutil      55. 78.100 / 55. 78.100
                        libavcodec     57.107.100 / 57.107.100
                        libavformat    57. 83.100 / 57. 83.100
                        libavdevice    57. 10.100 / 57. 10.100
                        libavfilter     6.107.100 /  6.107.100
                        libavresample   3.  7.  0 /  3.  7.  0
                        libswscale      4.  8.100 /  4.  8.100
                        libswresample   2.  9.100 /  2.  9.100
                        libpostproc    54.  7.100 / 54.  7.100
                      Splitting the commandline.
                      Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'debug'.
                      Reading option '-i' ... matched as input url with argument 'rtsp://ffmpeg:stream123@10.0.0.21:554/Streaming/Channels/102/'.
                      Reading option 'http://10.0.0.17:8090/eingang.ffm' ... matched as output url.
                      Finished splitting the commandline.
                      Parsing a group of options: global .
                      Applying option loglevel (set logging level) with argument debug.
                      Successfully parsed a group of options.
                      Parsing a group of options: input url rtsp://ffmpeg:stream123@10.0.0.21:554/Streaming/Channels/102/.
                      Successfully parsed a group of options.
                      Opening an input file: rtsp://ffmpeg:stream123@10.0.0.21:554/Streaming/Channels/102/.
                      [tcp @ 0x55d237b01aa0] No default whitelist set
                      [rtsp @ 0x55d237aff8c0] SDP:
                      v=0
                      o=- 1553524705086562 1553524705086562 IN IP6 ::
                      s=Media Presentation
                      e=NONE
                      b=AS:5050
                      t=0 0
                      a=control:rtsp://10.0.0.21:554/Streaming/Channels/102/
                      m=video 0 RTP/AVP 96
                      c=IN IP6 ::
                      b=AS:5000
                      a=recvonly
                      a=x-dimensions:640,360
                      a=control:rtsp://10.0.0.21:554/Streaming/Channels/102/trackID=1
                      a=rtpmap:96 H264/90000
                      a=fmtp:96 profile-level-id=420029; packetization-mode=1; sprop-parameter-sets=Z01AHppkBQF/y4C3AQEBQAAA+gAAJxA6GAEVwAEVsu8uNDACK4ACK2XeXCg=,aO48gA==
                      a=Media_header:MEDIAINFO=494D4B48010200000400000100000000000000000000000000000000000000000000000000000000;
                      a=appversion:1.0
                      
                      [rtsp @ 0x55d237aff8c0] video codec set to: h264
                      [rtsp @ 0x55d237aff8c0] RTP Profile IDC: 42 Profile IOP: 0 Level: 29
                      [rtsp @ 0x55d237aff8c0] RTP Packetization Mode: 1
                      [rtsp @ 0x55d237aff8c0] Extradata set to 0x55d237b029a0 (size: 56)
                      [rtp @ 0x55d237b03b40] No default whitelist set
                      [udp @ 0x55d237b04360] No default whitelist set
                      [udp @ 0x55d237b04360] end receive buffer size reported is 131072
                      [udp @ 0x55d237b14800] No default whitelist set
                      [udp @ 0x55d237b14800] end receive buffer size reported is 131072
                      [rtsp @ 0x55d237aff8c0] setting jitter buffer size to 500
                      [rtsp @ 0x55d237aff8c0] hello state=0
                      [h264 @ 0x55d237b03380] nal_unit_type: 7, nal_ref_idc: 3
                      [h264 @ 0x55d237b03380] nal_unit_type: 8, nal_ref_idc: 3
                      [h264 @ 0x55d237b03380] nal_unit_type: 7, nal_ref_idc: 3
                      [h264 @ 0x55d237b03380] nal_unit_type: 8, nal_ref_idc: 3
                      [h264 @ 0x55d237b03380] nal_unit_type: 7, nal_ref_idc: 3
                      [h264 @ 0x55d237b03380] nal_unit_type: 8, nal_ref_idc: 3
                      [h264 @ 0x55d237b03380] nal_unit_type: 5, nal_ref_idc: 3
                      [h264 @ 0x55d237b03380] Reinit context to 640x368, pix_fmt: yuvj420p
                      [h264 @ 0x55d237b03380] nal_unit_type: 1, nal_ref_idc: 3
                      [h264 @ 0x55d237b03380] nal_unit_type: 7, nal_ref_idc: 3
                      [h264 @ 0x55d237b03380] nal_unit_type: 8, nal_ref_idc: 3
                      [h264 @ 0x55d237b03380] nal_unit_type: 5, nal_ref_idc: 3
                      [h264 @ 0x55d237b03380] nal_unit_type: 1, nal_ref_idc: 3
                          Last message repeated 3 times
                      [rtsp @ 0x55d237aff8c0] All info found
                      Input #0, rtsp, from 'rtsp://ffmpeg:stream123@10.0.0.21:554/Streaming/Channels/102/':
                        Metadata:
                          title           : Media Presentation
                        Duration: N/A, start: 0.310000, bitrate: N/A
                          Stream #0:0, 28, 1/90000: Video: h264 (Main), 1 reference frame, yuvj420p(pc, bt709, progressive, left), 640x360 (640x368) [SAR 1:1 DAR 16:9], 0/1, 20 fps, 25 tbr, 90k tbn, 40 tbc
                      Successfully opened the file.
                      Parsing a group of options: output url http://10.0.0.17:8090/eingang.ffm.
                      Successfully parsed a group of options.
                      Opening an output file: http://10.0.0.17:8090/eingang.ffm.
                      [NULL @ 0x55d237b3ce00] Opening 'http://10.0.0.17:8090/eingang.ffm' for reading
                      [http @ 0x55d237bf21a0] Setting default whitelist 'http,https,tls,rtp,tcp,udp,crypto,httpproxy'
                      [http @ 0x55d237bf21a0] request: GET /eingang.ffm HTTP/1.1
                      User-Agent: Lavf/57.83.100
                      Accept: */*
                      Range: bytes=0-
                      Connection: close
                      Host: 10.0.0.17:8090
                      Icy-MetaData: 1
                      
                      
                      [http @ 0x55d237bf21a0] HTTP error 404 Not Found
                      http://10.0.0.17:8090/eingang.ffm: Server returned 404 Not Found
                      
                      

                      Bei dieser Konfig:

                      
                      HTTPPort 8090
                      HTTPBindAddress 0.0.0.0
                      MaxHTTPConnections 200
                      MaxClients 100
                      MaxBandwidth 4096
                      
                      # CustomLog -
                      ########################################
                      
                      # IP camera feed...
                      
                      <feed eingang.ffm>
                      File /tmp/eingang.ffm
                      FileMaxSize 1M
                      ACL allow 127.0.0.1
                      </feed>
                      
                      #########################################
                      
                      # Streams...
                      
                      <stream eingang.rtsp>
                      Feed eingang.ffm
                      Format rtsp
                      #VideoCodec libx264 (auch getestet)
                      VideoQMin 1
                      VideoQMax 4
                      VideoFrameRate 20
                      VideoSize 640x360
                      VideoBufferSize 1024
                      VideoBitRate 1024
                      NoAudio
                      Strict -1
                      </stream>
                      
                      
                      <stream status.html="">
                      # Server status URL Format status
                      # Only allow local people to get the status
                      ACL allow 0.0.0.0 255.255.255.255
                      </stream>
                      
                      <redirect index.html>
                      # Just an URL redirect for index
                      # Redirect index.html to the appropriate site
                      URL http://www.ffmpeg.org/
                      </redirect>
                      
                      

                      Die Status-Seite gibt folgendes aus:
                      ffmpeg.png

                      Klicke ich auf "eingang.rtsp" wird diese nicht gefunden...
                      File '/eingang.rtsp' not found

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

                        @aleks-83 sagte in [Tipp] IP-Kamera Stream mit ffmpeg für vis konvertieren:

                        http://10.0.0.17:8090/eingang.ffm

                        Was soll das denn sein?

                        1 Reply Last reply Reply Quote 0
                        • A
                          aleks-83 last edited by aleks-83

                          Der Feed der auf der Stream zeigt!?

                          1 Reply Last reply Reply Quote 0
                          • wendy2702
                            wendy2702 @aleks-83 last edited by

                            @aleks-83 sagte in [Tipp] IP-Kamera Stream mit ffmpeg für vis konvertieren:

                            Opening an output file: http://10.0.0.17:8090/eingang.ffm.
                            [NULL @ 0x55d237b3ce00] Opening 'http://10.0.0.17:8090/eingang.ffm' for reading

                            Denke da stimmt etwas mit den Optionen nicht. Es wird ja scheinbar von FFMPEG versucht das File zu öffnen.

                            1 Reply Last reply Reply Quote 0
                            • A
                              aleks-83 last edited by aleks-83

                              Ja,
                              mit dem Befehl:

                              ffmpeg -loglevel debug -i "rtsp://ffmpeg:stream123@10.0.0.21:554/Streaming/Channels/102/" http://10.0.0.17:8090/eingang.ffm
                              

                              versucht er doch den rtsp Stream aus der 10.0.0.21 mit der http://10.0.0.17:8090/eingang.ffm zu verbinden, oder nicht?
                              Diese legt er dann in /tmp/ ab, und versucht sie als stream zu öffnen.
                              So verstehe ich das Ganze...

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

                                Da müsste ich mich wieder rein lesen wenn ich ehrlich bin.

                                1 Reply Last reply Reply Quote 0
                                • A
                                  aleks-83 last edited by

                                  Hmmm.
                                  Ich scheine ja kurz vorm Ziel zu sein.

                                  OffTopic:
                                  MotionEye würde ja gehen, aber das will ich meinem NUC nicht antun.
                                  Der läuft dann auf 75% CPU Last bei 4 Kameras.

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

                                    Ob ffmpeg bei 4 Kameras nachher weniger benötigt?

                                    Ich wollte/habe Motioneye ja auch gewählt da ich aufzeichnen möchte und das relativ einfach verwalten will.

                                    Kameras ohne Aufzeichung im Aussenbereich macht für mich keinen bis wenig sinn.

                                    1 Reply Last reply Reply Quote 0
                                    • A
                                      aleks-83 last edited by

                                      Aufzeichnung macht meine Synology.
                                      Da sie aber zu schwach ist um auch noch MotionEye (für das restreaming) zu machen, wollte ich meinen NUC dafür nutzen.

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

                                        Aber kann man nicht direkt von der Synology den Stream bekommen?

                                        Habe ich hier im Forum nicht so etwas mal gelesen ?

                                        Samson71 1 Reply Last reply Reply Quote 0
                                        • A
                                          aleks-83 last edited by aleks-83

                                          Die gibt nur rtsp raus.
                                          Aus der Surveillance Station

                                          Es gibt zwar ein PHP Skript was die Umwandlung in MJPEG übernimmt, das liefert aber nur alle paar Sekunden ein Bild.
                                          Das ist für mich kein Stream.

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

                                            OK.

                                            Das altbekannte Problem mit rtsp und VIS 😞

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            961
                                            Online

                                            31.8k
                                            Users

                                            80.0k
                                            Topics

                                            1.3m
                                            Posts

                                            template vis
                                            24
                                            59
                                            25347
                                            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