• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

[MMM-RTSPStream] - Video Streaming from Live Feeds & Security Cameras

Scheduled Pinned Locked Moved Utilities
602 Posts 67 Posters 1.8m Views 68 Watching
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.
  • N Offline
    Number_5
    last edited by Feb 7, 2020, 3:24 PM

    @evroom said in [MMM-RTSPStream] - Video Streaming from Live Feeds & Security Cameras:

    omxplayer --info --genlog --avdict rtsp_transport:tcp --win 786,424,1138,666 --live --video_queue 4 --fps 30 --no-osd ‘rtsp://xxx.xxx@192.168.2.108:554/cam/realmonitor?channel=2&subtype=0’

    Hello evroom,

    you are the best. now its working!

    thanks all for your support. and thanks all for your patience in the past nights.

    pi@raspberrypi:~/MagicMirror/config $ omxplayer --genlog --avdict rtsp_transport:tcp --win 786,424,1138,666 --live --video_queue 4 --fps 30 --no-osd 'rtsp://admin:RoKu1234@192.168.2.108:554/cam/realmonitor?channel=1&subtype=0'
    Video codec omx-h264 width 1920 height 1080 profile 77 fps 30.000000
    Subtitle count: 0, state: off, index: 1, delay: 0
    V:PortSettingsChanged: 1920x1080@30.00 interlace:0 deinterlace:0 anaglyph:0 par:1.00 display:0 layer:0 alpha:255 aspectMode:0
    

    I have put tbe url in the config.js

    {
      module: "MMM-RTSPStream",
       position: "middle_center",
       header: "Test Kamera",
           config: {
           autoStart: true,
           rotateStreams: true,
           rotateStreamTimeout: 10,
           moduleWidth: 354,
           moduleHeight: 240,
           localPlayer: 'omxplayer',
           remotePlayer: 'none',
           showSnapWhenPaused: true,
           remoteSnaps: true,
           stream1: {
               name: 'door',
               url: 'rtsp://XXX:XXX@192.168.2.108:554/cam/realmonitor?channel=1&subtype=0',
               frameRate: 'undefined',
               snapshotType: 'url',
               snapshotRefresh: 10,
              width: undefined,
               height: undefined,
               },
           }
      },
    

    with

    pm2 stop MagicMirror
    

    the mirror stops, but not the stream from the camerea.
    Only with the command

    pm2 stop 1
    

    the stream stops.

    S E 2 Replies Last reply Feb 7, 2020, 3:25 PM Reply Quote 0
    • S Offline
      sdetweil @Number_5
      last edited by Feb 7, 2020, 3:25 PM

      @Number_5 you need to write a little script to do pm2 stop 1, then pm2 stop 0

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      N 1 Reply Last reply Feb 7, 2020, 7:50 PM Reply Quote 0
      • E Offline
        evroom @Number_5
        last edited by evroom Feb 7, 2020, 4:53 PM Feb 7, 2020, 4:16 PM

        @Number_5 said in [MMM-RTSPStream] - Video Streaming from Live Feeds & Security Cameras:

        now its working!

        Great to hear!

        When you add

        omxRestart: 1,
        

        in the

        config: {
        

        part, then when restarting MagicMirror, the omx_stream1 will be stopped and restarted too.
        If you really want to stop MagicMirror and omx_stream1, then you will need to stop both:

        pm2 stop MagicMirror
        pm2 stop omx_stream1
        

        Provided that you named you stream1 stream1.

        MagicMirror version: 2.30.0
        Raspberry Pi 4 Model B Rev 1.5 (8 GB RAM)
        Raspbian GNU/Linux 12 (bookworm)

        Test environment:
        MagicMirror version: v2.30.0
        Raspberry Pi 3 Model B Plus Rev 1.3 (1 GB RAM)
        Raspbian GNU/Linux 12 (bookworm)

        1 Reply Last reply Reply Quote 0
        • N Offline
          Number_5 @sdetweil
          last edited by Feb 7, 2020, 7:50 PM

          @sdetweil

          hello sam,
          Thank you. You opened the door for me a few days ago. writing small and large scripts will be my next challenge :-). for the first one ,i took up the suggestion from evroom. I hope you will help me with the next projects, :-)

          1 Reply Last reply Reply Quote 0
          • E Offline
            Egnos
            last edited by Feb 20, 2020, 1:33 PM

            Hello to all,
            I congratulate the developer of this module which, if I manage to make it work, will be very useful to me! :smiling_face_with_open_mouth_smiling_eyes:

            I describe my environment:
            I’m testing the various modules on a virtual machine (Virtual Box) that runs on a Windows 10 PC.
            For now all modules work perfectly except MMM-RTSPStream.

            Description of the problem:
            I followed the installation guide at this link.

            When dependencies are installed the installation fails

            Cloning the repository on master branch...
            
            Cloning into 'MMM-RTSPStream'...
            remote: Enumerating objects: 16, done.
            remote: Counting objects: 100% (16/16), done.
            remote: Compressing objects: 100% (14/14), done.
            remote: Total 315 (delta 5), reused 6 (delta 2), pack-reused 299
            Ricezione degli oggetti: 100% (315/315), 1.13 MiB | 876.00 KiB/s, done.
            Risoluzione dei delta: 100% (192/192), done.
            
            Installing dependencies...
            
            
            > MMM-RTSPStream@2.0.2-dev preinstall /home/pi/MagicMirror/modules/MMM-RTSPStream
            > ./scripts/preinstall.sh
            
            Updating packages ...
            Trovato:1 http://security.debian.org stretch/updates InRelease
            Trovato:2 http://archive.raspberrypi.org/debian stretch InRelease              
            Ign:3 http://ftp.debian.org/debian stretch InRelease                           
            Trovato:4 http://ftp.debian.org/debian stretch-updates InRelease
            Trovato:5 https://deb.nodesource.com/node_10.x stretch InRelease
            Trovato:6 http://ftp.debian.org/debian stretch Release
            Lettura elenco dei pacchetti... Fatto                 
            Generazione albero delle dipendenze       
            Lettura informazioni sullo stato... Fatto
            152 pacchetti possono essere aggiornati: eseguire "apt list --upgradable" per vederli.
            
            Installing helper tools: devilspie2 and wmctrl...
            Lettura elenco dei pacchetti... Fatto
            Generazione albero delle dipendenze       
            Lettura informazioni sullo stato... Fatto
            E: Impossibile trovare il pacchetto omxplayer
            npm ERR! code ELIFECYCLE
            npm ERR! errno 100
            npm ERR! MMM-RTSPStream@2.0.2-dev preinstall: `./scripts/preinstall.sh`
            npm ERR! Exit status 100
            npm ERR! 
            npm ERR! Failed at the MMM-RTSPStream@2.0.2-dev preinstall script.
            npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
            npm WARN Local package.json exists, but node_modules missing, did you mean to install?
            
            npm ERR! A complete log of this run can be found in:
            npm ERR!     /home/pi/.npm/_logs/2020-02-20T11_38_51_172Z-debug.log
            Failed to install dependencies.
            

            Can you help me?

            Thank you all

            My Mirror https://forum.magicmirror.builders/topic/17262/the-raspimirror-was-born/7

            E BKeyportB 2 Replies Last reply Feb 20, 2020, 7:19 PM Reply Quote 0
            • E Offline
              evroom @Egnos
              last edited by Feb 20, 2020, 7:19 PM

              @Egnos said in [MMM-RTSPStream] - Video Streaming from Live Feeds & Security Cameras:

              E: Impossibile trovare il pacchetto omxplayer

              To me it looks like it cannot install omxplayer.
              You can try to install it manually.
              The script does it using this command:

              sudo apt install -y omxplayer
              

              Perhaps another command is needed, or indeed the package to install omxplayer does not exist for your platform.

              MagicMirror version: 2.30.0
              Raspberry Pi 4 Model B Rev 1.5 (8 GB RAM)
              Raspbian GNU/Linux 12 (bookworm)

              Test environment:
              MagicMirror version: v2.30.0
              Raspberry Pi 3 Model B Plus Rev 1.3 (1 GB RAM)
              Raspbian GNU/Linux 12 (bookworm)

              1 Reply Last reply Reply Quote 0
              • BKeyportB Offline
                BKeyport Module Developer @Egnos
                last edited by BKeyport Feb 20, 2020, 11:02 PM Feb 20, 2020, 9:07 PM

                evroom’s got it right. OMXplayer isn’t being installed. I understand it went under a few management changes, so it could be trying to access an old version or something. RTSPStream’s clunky enough that you might find it easier (and better) to run OMXplayer independently of the mirror, like evroom has done, as have I.

                see earlier in this thread: https://forum.magicmirror.builders/topic/2743/mmm-rtspstream-video-streaming-from-live-feeds-security-cameras/259

                steps really to take RTSP-Stream out and run OMX directly:

                1. Find the resolution of your screen so you know your range. (1920x1080 in my case)
                2. Figure out the resolution of the stream. (640x360 in my case)
                3. figure out where on the screen you want it using the top left corner, this would become your X1 and Y1 (I wanted it in the upper right corner, so, that was rather easy)
                4. Add width of your stream to X1 for X2, height of your stream to Y1 for Y2.
                5. omx player will likely need the following commands: “–avdict rtsp_transport:tcp --live --fps 30” as well as the following
                6. The “–win” command string is “X1 Y1 X2 Y2”
                7. If you have your screen rotated, and omxplayer doesn’t play along (it likely wont), add “–orientation” and how many degrees to twist (90 = portrait “right”, 180 = landscape “upside down”, 270 Portrait “Left”) command line, and adjust X and Y calculations for 90 or 270 rotation. The X and Y will remain as if the screen isn’t rotated.

                I used the first one of these, but the other 3 is as rotated for the same corner.
                omxplayer --avdict rtsp_transport:tcp --live --fps 30 --orientation 0 --win “1280 0 1920 360” [url]
                omxplayer --avdict rtsp_transport:tcp --live --fps 30 --orientation 90 --win “1560 0 1920 640” [url]
                omxplayer --avdict rtsp_transport:tcp --live --fps 30 --orientation 180 --win “1280 0 1920 360” [url]
                omxplayer --avdict rtsp_transport:tcp --live --fps 30 --orientation 270 --win “1560 0 1920 640” [url]

                The "E" in "Javascript" stands for "Easy"

                E 1 Reply Last reply Feb 22, 2020, 12:23 PM Reply Quote 0
                • E Offline
                  Egnos @BKeyport
                  last edited by Egnos Feb 22, 2020, 12:26 PM Feb 22, 2020, 12:23 PM

                  Thanks a loro @BKeyport and @evroom!
                  In a few days I will try your advice.

                  @BKeyport said in [MMM-RTSPStream] - Video Streaming from Live Feeds & Security Cameras:

                  RTSPStream’s clunky enough that you might find it easier (and better) to run OMXplayer independently of the mirror, like evroom has done, as have I.

                  does this mean i have to uninstall the module RTSPStream’s and install only the component OMXplayer?

                  Thanks

                  My Mirror https://forum.magicmirror.builders/topic/17262/the-raspimirror-was-born/7

                  1 Reply Last reply Reply Quote 0
                  • E Offline
                    evroom
                    last edited by Feb 22, 2020, 3:00 PM

                    @Egnos said in [MMM-RTSPStream] - Video Streaming from Live Feeds & Security Cameras:

                    does this mean i have to uninstall the module RTSPStream’s and install only the component OMXplayer?

                    If you are able to install OMXPlayer, then you can give MMM-RTSPStream a try.
                    In principle it does work, depending on what you want to stream.
                    If it works for you, perfect, if it doesn’t, then try if omxplayer works standalone,
                    Actually testing omxplayer standalone is always a good thing before trying out MMM-RTSPStream.

                    MagicMirror version: 2.30.0
                    Raspberry Pi 4 Model B Rev 1.5 (8 GB RAM)
                    Raspbian GNU/Linux 12 (bookworm)

                    Test environment:
                    MagicMirror version: v2.30.0
                    Raspberry Pi 3 Model B Plus Rev 1.3 (1 GB RAM)
                    Raspbian GNU/Linux 12 (bookworm)

                    1 Reply Last reply Reply Quote 0
                    • BKeyportB Offline
                      BKeyport Module Developer
                      last edited by Feb 23, 2020, 2:43 AM

                      You don’t have to uninstall a module - just take it out of your config. In my case, once I got OMX working, and followed evroom’s instructions to start, I found that using OMX directly rather than through the module is rather cleaner. I can run the hi-def stream for one thing.

                      The "E" in "Javascript" stands for "Easy"

                      1 Reply Last reply Reply Quote 0
                      • 1
                      • 2
                      • 44
                      • 45
                      • 46
                      • 47
                      • 48
                      • 60
                      • 61
                      • 46 / 61
                      • First post
                        Last post
                      Enjoying MagicMirror? Please consider a donation!
                      MagicMirror created by Michael Teeuw.
                      Forum managed by Sam, technical setup by Karsten.
                      This forum is using NodeBB as its core | Contributors
                      Contact | Privacy Policy