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 2.1m 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.
    • evroomE Offline
      evroom @Egnos
      last edited by

      @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.33.0
      Raspberry Pi 4 Model B Rev 1.5 (8 GB RAM)
      Raspbian GNU/Linux 12 (bookworm)

      Test environment:
      MagicMirror version: v2.33.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

        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 Reply Quote 0
        • E Offline
          Egnos @BKeyport
          last edited by Egnos

          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
          • evroomE Offline
            evroom
            last edited by

            @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.33.0
            Raspberry Pi 4 Model B Rev 1.5 (8 GB RAM)
            Raspbian GNU/Linux 12 (bookworm)

            Test environment:
            MagicMirror version: v2.33.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

              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
              • D Offline
                DirkS
                last edited by DirkS

                Hi, i have used the Module for a long time now jsut with snapshots. I never streamed live.

                A year ago i switched the native magic mirror to docker install to use it for more devices at the same time. RTSPStream just worked fine after that change. But in last december i updated it and since that moment it stopped working. I had other issues to do so i did not investigate the cause.

                But now i want to get it back working.

                The error i can see via web logging is this:

                Uncaught DOMException: Failed to construct 'WebSocket': The URL 'ws://192.168.10.1:undefined' is invalid.
                    at WSSource.start (http://192.168.10.1:82/modules/MMM-RTSPStream/scripts/jsmpeg.min.js:1:16242)
                    at new Player (http://192.168.10.1:82/modules/MMM-RTSPStream/scripts/jsmpeg.min.js:1:5838)
                    at Class.playStream (http://192.168.10.1:82/modules/MMM-RTSPStream//MMM-RTSPStream.js:399:26)
                    at Class.rotateStream (http://192.168.10.1:82/modules/MMM-RTSPStream//MMM-RTSPStream.js:123:23)
                    at Class.setupStreamRotation (http://192.168.10.1:82/modules/MMM-RTSPStream//MMM-RTSPStream.js:94:14)
                    at Class.resumed (http://192.168.10.1:82/modules/MMM-RTSPStream//MMM-RTSPStream.js:168:22)
                    at http://192.168.10.1:82/modules/MMM-RTSPStream//MMM-RTSPStream.js:697:43
                

                I’ve tried now different ways and also checked if it is streaming. I have installed ffmpeg within the docker container and also the node-rtsp-stream-es6 module. Also i have installed node-rtsp-stream-es6 at one rpi client and just to be sure ffmpeg. But in the past it worked without it.

                Here is my config (now with ffmpeg streaming):

                {
                    module: "MMM-RTSPStream",
                    position: "bottom_right",
                    header: "Rundumblick",
                        config: {
                        autoStart: false,
                        rotateStreams: true,
                        rotateStreamTimeout: 10,
                        moduleWidth: 354,
                        moduleHeight: 240,
                        localPlayer: 'ffmpeg',
                        remotePlayer: 'none',
                        showSnapWhenPaused: true,
                        remoteSnaps: true,
                	debug: true,
                        stream1: {
                            name: 'Haustür',
                            url: 'rtsp://192.168.10.1:7447/5af753a0b1d674c3bbc08189_1',
                            frameRate: 'undefined',
                            hdUrl: 'rtsp://192.168.10.1:7447/5af753a0b1d674c3bbc08189_0',
                            snapshotUrl: 'http://192.168.10.55/snap.jpeg',
                            snapshotType: 'url',
                            snapshotRefresh: 10,
                            width: undefined,
                            height: undefined,
                            },
                        stream2: {
                            name: 'Garten-Wz',
                            url: 'rtsp://192.168.10.1:7447/5af75418b1d674c3bbc0818a_1',
                            frameRate: 'undefined',
                            hdUrl: 'rtsp://192.168.10.1:7447/5af75418b1d674c3bbc0818a_0',
                            snapshotUrl: 'http://192.168.10.56/snap.jpeg',
                            snapshotType: 'url',
                            snapshotRefresh: 10,
                            width: undefined,
                            height: undefined,
                            },
                        stream3: {
                            name: 'Kellertreppe',
                            url: 'rtsp://192.168.10.1:7447/59541285b6468d91abd88fa9_1',
                            frameRate: 'undefined',
                            hdUrl: 'rtsp://192.168.10.1:7447/59541285b6468d91abd88fa9_0',
                            snapshotUrl: 'http://192.168.10.50/snap.jpeg',
                            snapshotType: 'url',
                            snapshotRefresh: 10,
                            width: undefined,
                            height: undefined,
                            },
                        stream4: {
                            name: 'Terrasse-Wz',
                            url: 'rtsp://192.168.10.1:7447/59541285b6468d91abd88fa6_1',
                            frameRate: 'undefined',
                            hdUrl: 'rtsp://192.168.10.1:7447/59541285b6468d91abd88fa6_0',
                            snapshotUrl: 'http://192.168.10.54/snap.jpeg',
                            snapshotType: 'url',
                            snapshotRefresh: 10,
                            width: undefined,
                            height: undefined,
                            },
                	stream5: {
                	    name: 'Terrasse-Ku',
                	    url: 'rtsp://192.168.10.1:7447/59541285b6468d91abd88fa8_1',
                            frameRate: 'undefined',
                            hdUrl: 'rtsp://192.168.10.1:7447/59541285b6468d91abd88fa8_0',
                            snapshotUrl: 'http://192.168.10.53/snap.jpeg',
                	    snapshotType: 'url',
                            snapshotRefresh: 10,
                            widht: undefined,
                            height: undefined,
                            },
                	stream6: {
                	   name: 'Garage',
                	   url: 'rtsp://192.168.10.1:7447/59541285b6468d91abd88fa7_2',
                	   frameRate: 'undefined',
                	   hdUrl: 'rtsp://192.168.10.1:7447/59541285b6468d91abd88fa7_0',
                           snapshotUrl: 'http://192.168.10.51/snap.jpeg',
                	   snapshotType: 'url',
                	   snapshotRefresh: 10,
                	   widht: undefined,
                	   height: undefined,
                	   },
                	stream7: {
                	   name: 'Hof-Garage',
                	   url: 'rtsp://192.168.10.1:7447/59541285b6468d91abd88fa7_2',
                           frameRate: 'undefined',
                	   hdUrl: 'rtsp://192.168.10.1:7447/59541285b6468d91abd88fa7_0',
                           snapshotUrl: 'http://192.168.10.52/snap.jpeg',
                           snapshotType: 'url',
                           snapshotRefresh: 10,
                           widht: undefined,
                           height: undefined,
                           },
                

                can anybody assume where to search the cause? I’m out of ideas :(

                If i just want to have snapshots i get this:

                MMM-RTSPStream.js:712 Uncaught TypeError: Cannot read property 'appendChild' of null
                    at Class.socketNotificationReceived (MMM-RTSPStream.js:712)
                    at module.js:246
                    at r.<anonymous> (socketclient.js:25)
                    at r.emit (index.js:83)
                    at r.onevent (index.js:83)
                    at r.MMSocket.self.socket.onevent (socketclient.js:19)
                    at r.onpacket (index.js:83)
                    at r.<anonymous> (index.js:83)
                    at r.emit (index.js:83)
                    at r.ondecoded (index.js:83)
                
                1 Reply Last reply Reply Quote 0
                • E Offline
                  Egnos
                  last edited by Egnos

                  @BKeyport and @evroom I tried to install omxplayer but i always get the same error:

                  E: Impossibile trovare il pacchetto omxplayer
                  

                  Can you help me?

                  Many thanks!

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

                  evroomE 1 Reply Last reply Reply Quote 0
                  • BKeyportB Offline
                    BKeyport Module Developer
                    last edited by BKeyport

                    It looks as though you’re on a Pi, correct? If I recall right OMX should be installed with the OS in more than the “lite” install…If it’s not there, it’s not available in your language, maybe. I’m not too versed in how those installs work.

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

                    1 Reply Last reply Reply Quote 0
                    • evroomE Offline
                      evroom @Egnos
                      last edited by

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

                      Can you help me?

                      What platform are you on.
                      Raspberry Pi with Debian?

                      lsb_release -a
                      
                      sudo apt-get install omxplayer
                      

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

                      Test environment:
                      MagicMirror version: v2.33.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
                      • E Offline
                        Egnos
                        last edited by

                        @BKeyport and @evroom this is my environment:

                        • PC Hp Intel I5.

                        • Raspbian on Virtual Box (using Debian…).

                        First I try to make everything work on the virtual machine and then I transfer everything to PI.

                        Many thanks.

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

                        1 Reply Last reply Reply Quote 0
                        • BKeyportB Offline
                          BKeyport Module Developer
                          last edited by

                          @egnos you might never get OMX working in a virtual environment. It works directly with the hardware to show the picture.

                          I would highly recommend setting it up on the pi now, and setting up SSH to communicate.

                          I also have SAMBA (https://www.juanmtech.com/samba-file-sharing-raspberry-pi/) running on my pi, so I can use Geany for Windows (https://www.geany.org/) to directly edit the raspberry files.

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

                          1 Reply Last reply Reply Quote 0
                          • H Offline
                            Hram2008
                            last edited by

                            Has anyone been able to get this working with Axis camera products? VLC will pull and display the video stream outside of MM but will not display the same stream on MM when configured.

                            Any thoughts???

                            evroomE BKeyportB 2 Replies Last reply Reply Quote 0
                            • evroomE Offline
                              evroom @Hram2008
                              last edited by

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

                              Has anyone been able to get this working with Axis camera products?

                              Yes, I have.

                              Please show your MMM-RTSPStream part from config.js.

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

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

                              H 1 Reply Last reply Reply Quote 0
                              • BKeyportB Offline
                                BKeyport Module Developer @Hram2008
                                last edited by

                                @Hram2008 have you tried running the URL straight with OMX to see if it works, if it does, you may have issues with the plugin itself, and as the author seems to have disappeared, you could just replace the plugin with OMX cutting the proper hole out of the window (It’ll go in front of whatever is running, so you run it independently, and it just works.

                                omxplayer --no-osd --no-keys --avdict rtsp_transport:tcp --live --fps 30 --orientation 0 --win "640 0 1280 360" [URL]
                                
                                -or- 
                                
                                omxplayer --no-osd --no-keys --avdict rtsp_transport:udp --live --fps 30 --orientation 0 --win "640 0 1280 360" [URL]
                                
                                

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

                                1 Reply Last reply Reply Quote 0
                                • E Offline
                                  Egnos
                                  last edited by Egnos

                                  Hello everybody!
                                  I’m trying to set up the module by doing some tests.

                                  I am using this configuration, using the test stream recommended by the developer “rtsp://184.72.239.149/vod/mp4:BigBuckBunny_115k.mov”:

                                  {
                                  		   module: "MMM-RTSPStream",
                                  		   //position: "middle_center",
                                  		   pages: {Security: "middle_center"},
                                  		   header: "Test",
                                  		   config: {
                                  				autoStart: true,
                                  				rotateStreams: false,
                                  				rotateStreamTimeout: 10,
                                  				moduleWidth: 354,
                                  				moduleHeight: 240,
                                  				localPlayer: 'omxplayer',
                                  				remotePlayer: 'none',
                                  				showSnapWhenPaused: false,
                                  				remoteSnaps: false,
                                  				stream1: {
                                  					name: 'BigBuckBunny',
                                  					url: 'rtsp://184.72.239.149/vod/mp4:BigBuckBunny_115k.mov',
                                  					frameRate: 'undefined',
                                  					width: undefined,
                                  					height: undefined,
                                  						},
                                  					}
                                  		},
                                  

                                  The module starts but I don’t see anything.
                                  Below is a screen shot of the MM:

                                  2020-04-02-144902-1920x1080-scrot

                                  Where am I wrong?

                                  Thank you all.

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

                                  bheplerB 1 Reply Last reply Reply Quote 0
                                  • bheplerB Offline
                                    bhepler Module Developer @Egnos
                                    last edited by

                                    @Egnos - Have you checked to make sure there is something at that URL? I punched it into VLC and got connection failed.

                                    E 1 Reply Last reply Reply Quote 0
                                    • E Offline
                                      Egnos @bhepler
                                      last edited by

                                      @bhepler thanks for the answer.
                                      I thought it was just my problem.
                                      I found the link on the gitHub page.
                                      The developer recommends using this link for testing and I thought it worked.

                                      Do you know any public links to test the module?

                                      Regards.

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

                                      1 Reply Last reply Reply Quote 0
                                      • evroomE Offline
                                        evroom
                                        last edited by

                                        Try this link:

                                        rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov

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

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

                                        E 1 Reply Last reply Reply Quote 0
                                        • E Offline
                                          Egnos @evroom
                                          last edited by

                                          Many thanks @evroom, the link works in VLC but still doesn’t work in MM.

                                          Below what I see on the terminal:

                                          [10:58:31.986] [LOG]    Starting stream stream1 using: omxplayer --avdict rtsp_transport:tcp --win 786,238,1138,480 --live --video_queue 4 --fps 30 --no-osd rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov
                                          [10:58:32.033] [LOG]    Starting PM2 for omx_stream1
                                          [10:58:43.404] [LOG]    PM2 started for omx_stream1
                                          

                                          Are there any errors in config.js?

                                          		{
                                          		   module: "MMM-RTSPStream",
                                          		   //position: "middle_center",
                                          		   pages: {Security: "middle_center"},
                                          		   header: "Test",
                                          		   config: {
                                          				autoStart: true,
                                          				rotateStreams: false,
                                          				rotateStreamTimeout: 10,
                                          				moduleWidth: 354,
                                          				moduleHeight: 240,
                                          				localPlayer: 'omxplayer',
                                          				remotePlayer: 'none',
                                          				showSnapWhenPaused: false,
                                          				remoteSnaps: false,
                                          				stream1: {
                                          					name: 'BigBuckBunny',
                                          					url: 'rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov',
                                          					frameRate: 'undefined',
                                          					width: undefined,
                                          					height: undefined,
                                          						},
                                          					}
                                          		},
                                          

                                          Thanks for your patience!

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

                                          evroomE 1 Reply Last reply Reply Quote 0
                                          • evroomE Offline
                                            evroom
                                            last edited by

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

                                            the link works in VLC but still doesn’t work in MM

                                            Hi,

                                            What does this say ?

                                            pm2 logs --lines 100
                                            

                                            The part where you should see

                                            0|MagicMirror  | Starting stream stream1 with args: [
                                            

                                            And

                                            pm2 status
                                            

                                            should show

                                            omx_stream1
                                            

                                            And can you try it from the command line ?

                                            omxplayer --genlog --avdict rtsp_transport:tcp --live --video_queue 4 --fps 30 --win "0 0 354 240" rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov
                                            

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

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

                                            E 1 Reply Last reply Reply Quote 0

                                            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                            With your input, this post could be even better 💗

                                            Register Login
                                            • 1
                                            • 2
                                            • 22
                                            • 23
                                            • 24
                                            • 25
                                            • 26
                                            • 30
                                            • 31
                                            • 24 / 31
                                            • 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