MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord

    Unsuccessful video streaming - help please :)

    Utilities
    4
    14
    2031
    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.
    • M
      mwoodage last edited by

      Hello, can anyone help, i’ve tried everything i can think of…

      I’m getting the following error when i start up Magic Mirror,

      Starting stream stream1 with args: [
      “–avdict”,
      “rtsp_transport:tcp”,
      “–win”,
      “334, 796, 686, 1038”,
      “–live”,
      “–video_queue”,
      “4”,
      “–fps”,
      “30”,
      “rtsp://admin:*******@192.168.1.77:554//h264Preview_01_main”
      ]
      Starting PM2 for omx_stream1
      PM2 started for omx_stream1
      Whoops! There was an uncaught exception…
      TypeError: Cannot read property ‘omxRestart’ of undefined
      at pm2.start (/home/pi/MagicMirror/modules/MMM-RTSPStream/node_helper.js:156:85)
      at /home/pi/MagicMirror/modules/MMM-RTSPStream/node_modules/pm2/lib/API.js:1017:21
      at /home/pi/MagicMirror/modules/MMM-RTSPStream/node_modules/pm2/lib/API.js:1088:19
      at /home/pi/MagicMirror/modules/MMM-RTSPStream/node_modules/async/dist/async.js:473:16
      at iterateeCallback (/home/pi/MagicMirror/modules/MMM-RTSPStream/node_modules/async/dist/async.js:992:24)
      at /home/pi/MagicMirror/modules/MMM-RTSPStream/node_modules/async/dist/async.js:969:16
      at /home/pi/MagicMirror/modules/MMM-RTSPStream/node_modules/pm2/lib/API.js:1084:9
      at /home/pi/MagicMirror/modules/MMM-RTSPStream/node_modules/pm2-axon-rpc/lib/client.js:45:10
      at Parser. (/home/pi/MagicMirror/modules/MMM-RTSPStream/node_modules/pm2-axon/lib/sockets/req.js:67:8)
      at emitOne (events.js:116:13)
      MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
      If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
      Stopping stream stream1
      Stopping PM2 process: omx_stream1

      Any help would be gratefully received.
      Thanks
      Martin

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

        @mwoodage
        Do you have the parameter “omxRestart” in your MMM-RTSPStream config ?
        I assume you are using this module.
        If yes, I would try to comment out (//) this parameter.
        Or set it to 0 (omxRestart: 0,).

        MagicMirror version: 2.21.0
        Raspberry Pi 3 Model B Plus Rev 1.3
        Raspbian GNU/Linux 10 (buster)

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

          Hi evroom, thanks for the help - I’ve searched for “omxRestart” in the config but found nothing. 😞

          1 Reply Last reply Reply Quote 0
          • S
            shbatm Module Developer last edited by

            @mwoodage There are some issues with the latest release of that module. Please try reverting to an older version and see if it works. I am in the process of working on a fix for it:

            cd ~/MagicMirror/modules/MMM-RTSPStream
            git checkout f583553
            
            1 Reply Last reply Reply Quote 0
            • M
              mwoodage last edited by

              Thanks @shbatm - that’s cured the errors but i’m still not getting the video feed. It could be my settings so will try that first and report back.

              Thanks again
              Martin

              S 1 Reply Last reply Reply Quote 0
              • S
                shbatm Module Developer @mwoodage last edited by

                @mwoodage Make sure you can reach the stream in VLC or something similar first. Then try using the args that were spit out in the log to run omxplayer by itself from the command line. You may have to play with the arguments until you can get it work by itself, then you can change the module settings to match.

                omxplayer –avdict rtsp_transport:tcp –win 334 796 686 1038 –live –video_queue 4 –fps 30 “rtsp://admin:*******@192.168.1.77:554//h264Preview_01_main”
                
                1 Reply Last reply Reply Quote 0
                • evroom
                  evroom last edited by

                  A few hours ago I was busy with this module too, as it stopped to work after I loaded the latest changes.
                  I deleted and re-installed the module again; am on the origin/master branch.
                  For me, the stream only started after this command:

                  pm2 start omx_stream1
                  

                  Perhaps worth a try.

                  With

                  pm2 list
                  

                  you can see if omx_stream1 is online.

                  Then I saved the pm2 config to make it boot resistant

                  pm2 update
                  pm2 save
                  

                  Btw, I do not see the

                  Starting stream stream1 with args
                  

                  in the pm2 logs anymore.

                  MagicMirror version: 2.21.0
                  Raspberry Pi 3 Model B Plus Rev 1.3
                  Raspbian GNU/Linux 10 (buster)

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

                    Thanks shbatm - i’ve tried the stream several times on my laptop and it shows up without any problems. I’ve now installed VLC player on the Raspberry Pi and i can’t get the feed to work. I’m using exactly the same on both - any ideas?

                    rtsp://admin:*******@192.168.1.77/h264Preview_01_main

                    S 1 Reply Last reply Reply Quote 0
                    • M
                      mwoodage last edited by

                      hi evroom, thanks for the help,
                      I tried what you said (after installing PM2!) but i just get the following:-

                      pi@raspberrypi:~ $ pm2 start omx_stream1
                      [PM2][ERROR] script not found : /home/pi/omx_stream1
                      script not found : /home/pi/omx_stream1
                      ┌──────┬────┬──────┬────────┬───┬─────┬────────┐
                      │ Name │ id │ mode │ status │ ↺ │ cpu │ memory │
                      └──────┴────┴──────┴────────┴───┴─────┴────────┘
                      Use pm2 show <id|name> to get more details about an app
                      pi@raspberrypi:~ $

                      Is that right?? I’m assuming not, as its saying script not found. I’ve un-installed omx player and re-installed it but get the same results.

                      Sorry, i’m completely new to this so please be patient with me 🙂

                      bhepler 1 Reply Last reply Reply Quote 0
                      • evroom
                        evroom last edited by

                        Did you setup auto start according to this procedure?

                        https://github.com/MichMich/MagicMirror/wiki/Auto-Starting-MagicMirror

                        Perhaps it worked for me because the omx_stream was already known by pm2 in my case.
                        Perhaps it needs to run once for pm2 to be useful.
                        No idea.

                        pm2 list
                        

                        Only shows mm, or MagicMirror?

                        MagicMirror version: 2.21.0
                        Raspberry Pi 3 Model B Plus Rev 1.3
                        Raspbian GNU/Linux 10 (buster)

                        1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 1 / 2
                        • First post
                          Last post
                        Enjoying MagicMirror? Please consider a donation!
                        MagicMirror created by Michael Teeuw.
                        Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
                        This forum is using NodeBB as its core | Contributors
                        Contact | Privacy Policy