• 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 not showing video

Scheduled Pinned Locked Moved Unsolved Troubleshooting
4 Posts 3 Posters 1.5k Views 3 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.
  • V Offline
    vonarstonehelm
    last edited by vonarstonehelm Feb 9, 2019, 3:13 AM Feb 9, 2019, 2:43 AM

    So, I am at my wits end with this, and am fairly certain that I am losing more hair than I should over this issue. So I have the module installed, all dependencies installed and I have tried a lot of different config settings to get this to work.

    My current config section looks like this:

    {
                               module: 'MMM-RTSPStream',
                               position: 'middle_center',
                               config: {
                                   autoStart: true,
                                   rotateStreams: false,
                                   showSnapWhenPaused: false,
    //                              moduleWidth: 354,
    //                              moduleHeight: 242,
                                                   localPlayer: 'omxplayer',
                                   stream1: {
                                       name: 'Cam1',
                                       url: 'rtsp://admin:*******@192.168.1.242',
                           snapshotUrl: '',
                           snapshotRefresh: 10, // Seconds
                           frameRate: "30",
                           port: 9999,
                                        }
                               }
                     },
    

    With this setup I get a white box with no video.

    Here are my logs from pm2:

    pi@raspberrypi:~/MagicMirror/config $ rm /home/pi/.pm2/logs/*
    pi@raspberrypi:~/MagicMirror/config $ pm2 start mm
    [PM2] Applying action restartProcessId on app [mm](ids: 0)
    [PM2] [mm](0) ✓
    [PM2] Process successfully started
    ┌─────────────┬────┬─────────┬──────┬───────┬────────┬─────────┬────────┬─────┬──────────┬──────┬──────────┐
    │ App name    │ id │ version │ mode │ pid   │ status │ restart │ uptime │ cpu │ mem      │ user │ watching │
    ├─────────────┼────┼─────────┼──────┼───────┼────────┼─────────┼────────┼─────┼──────────┼──────┼──────────┤
    │ mm          │ 0  │ N/A     │ fork │ 11239 │ online │ 0       │ 0s     │ 0%  │ 2.5 MB   │ pi   │ disabled │
    │ omx_stream1 │ 1  │ N/A     │ fork │ 11224 │ online │ 10841   │ 0s     │ 0%  │ 2.7 MB   │ pi   │ disabled │
    └─────────────┴────┴─────────┴──────┴───────┴────────┴─────────┴────────┴─────┴──────────┴──────┴──────────┘
     Use `pm2 show <id|name>` to get more details about an app
    pi@raspberrypi:~/MagicMirror/config $ pm2 logs
    [TAILING] Tailing last 15 lines for [all] processes (change the value with --lines option)
    /home/pi/.pm2/pm2.log last 15 lines:
    PM2        | 2019-02-08T21:39:50: PM2 log: App [mm:0] online
    PM2        | 2019-02-08T21:39:53: PM2 log: App [omx_stream1:1] exited with code [1] via signal [SIGINT]
    PM2        | 2019-02-08T21:39:53: PM2 log: App [omx_stream1:1] starting in -fork mode-
    PM2        | 2019-02-08T21:39:53: PM2 log: App [omx_stream1:1] online
    PM2        | 2019-02-08T21:39:56: PM2 log: App [omx_stream1:1] exited with code [1] via signal [SIGINT]
    PM2        | 2019-02-08T21:39:56: PM2 log: App [omx_stream1:1] starting in -fork mode-
    PM2        | 2019-02-08T21:39:56: PM2 log: App [omx_stream1:1] online
    PM2        | 2019-02-08T21:40:00: PM2 log: Stopping app:omx_stream1 id:1
    PM2        | 2019-02-08T21:40:00: PM2 log: pid=11336 msg=failed to kill - retrying in 100ms
    PM2        | 2019-02-08T21:40:00: PM2 log: pid=11336 msg=failed to kill - retrying in 100ms
    PM2        | 2019-02-08T21:40:00: PM2 log: pid=11336 msg=failed to kill - retrying in 100ms
    PM2        | 2019-02-08T21:40:00: PM2 log: pid=11336 msg=failed to kill - retrying in 100ms
    PM2        | 2019-02-08T21:40:00: PM2 log: pid=11336 msg=failed to kill - retrying in 100ms
    PM2        | 2019-02-08T21:40:00: PM2 log: App [omx_stream1:1] exited with code [1] via signal [SIGINT]
    PM2        | 2019-02-08T21:40:00: PM2 log: pid=11336 msg=process killed
    
    /home/pi/.pm2/logs/omx-stream1-error.log last 15 lines:
    /home/pi/.pm2/logs/mm-error.log last 15 lines:
    /home/pi/.pm2/logs/mm-out.log last 15 lines:
    0|mm       | Module helper loaded: MMM-RTSPStream
    0|mm       | All module helpers loaded.
    0|mm       | Starting server on port 8080 ...
    0|mm       | Server started ...
    0|mm       | Connecting socket for: updatenotification
    0|mm       | Connecting socket for: calendar
    0|mm       | Starting node helper for: calendar
    0|mm       | Connecting socket for: newsfeed
    0|mm       | Starting module: newsfeed
    0|mm       | Connecting socket for: MMM-RTSPStream
    0|mm       | PM2: Stopping all OMXPlayer Streams...
    0|mm       | Sockets connected & modules started ...
    0|mm       | Launching application.
    0|mm       | PM2: Checking if omx_stream1 is running...
    0|mm       | PM2: Stopping omx_stream1...
    
    0|mm  | Create new calendar fetcher for url: http://www.calendarlabs.com/templates/ical/US-Holidays.ics - Interval: 300000
    0|mm  | Create new calendar fetcher for url: https://calendar.google.com/calendar/ical/vonarstonehelm%40gmail.com/public/basic.ics - Interval: 300000
    0|mm  | Create new news fetcher for url: http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml - Interval: 300000
    0|mm  | Starting stream stream1 using: omxplayer --avdict rtsp_transport:tcp --win 624,302,976,544 --live --video_queue 4 --fps 30 --no-osd rtsp://admin:jeffrey69@192.168.1.242
    0|mm  | Starting PM2 for omx_stream1
    PM2      | App [omx_stream1:1] starting in -fork mode-
    PM2      | App [omx_stream1:1] online
    0|mm     | PM2 started for omx_stream1
    1|omx_stream1  | have a nice day ;)
    PM2            | App [omx_stream1:1] exited with code [1] via signal [SIGINT]
    PM2            | App [omx_stream1:1] starting in -fork mode-
    PM2            | App [omx_stream1:1] online
    1|omx_stream1  | have a nice day ;)
    PM2            | App [omx_stream1:1] exited with code [1] via signal [SIGINT]
    PM2            | App [omx_stream1:1] starting in -fork mode-
    PM2            | App [omx_stream1:1] online
    

    Clearly there is an issue with omx, however I can’t seem to find a reason why it is quitting and restarting, and I can’t seem to find where omx sends its logs. I also know the stream works because I can copy/paste that into VLC and it plays just fine.

    Suggestions? Recommendations?

    Thank you in advance

    edit: double checked the stream in VLC and the codec is h264 - mpeg-4 avc (part 10) (h264). Not sure if this matters or not.

    1 Reply Last reply Reply Quote 0
    • E Offline
      evroom
      last edited by evroom Feb 9, 2019, 12:48 PM Feb 9, 2019, 12:46 PM

      @vonarstonehelm

      Hi,

      it is has been some time since I used MMM-RTSPStream, but you can try following and provide some more info.

      $ which omxplayer
      
      $ vcgencmd codec_enabled MPG2
      

      omxplayer only logs when asked for (–genlog).

      Try running omxplayer from the command line first:

      $ cd
      $ rm -f omxplayer.log
      
      $ omxplayer --genlog --win "0 0 800 480" rtsp://admin:*******@192.168.1.242
      
      or:
      
      $ omxplayer --genlog --avdict rtsp_transport:tcp --live --video_queue 4 --fps 30 --win "0 0 800 480" rtsp://admin:*******@192.168.1.242
      
      $ ls -als omxplayer.log
      
      $ sudo find . -name omxplayer.log
      

      And it appears you have a few mistakes / omitted parameters in your config.js:

      moduleWidth: 590,
      moduleHeight: 332,
      
      ffmpegPort: 9999,
      
      width: 590,
      height: 332,
      

      port: 9999, is not a valid parameter.

      Furthermore, your URL seems a bit basic, but that probably depends on the camera.
      For example, for my Axis camera I need this:

      rtsp://user:password@192.168.178.56/axis-media/media.amp?resolution=640x360
      

      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
      • B Offline
        BKeyport Module Developer
        last edited by Feb 11, 2019, 10:08 AM

        I suspect you’re not addressing the video correctly.

        https://www.ispyconnect.com/sources.aspx - check your camera model for full URLs.

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

        V 1 Reply Last reply Feb 13, 2019, 7:25 PM Reply Quote 1
        • V Offline
          vonarstonehelm @BKeyport
          last edited by Feb 13, 2019, 7:25 PM

          @bkeyport Actually found a workaround using iframe and a HLS stream from blue iris. Have a new issue now that I am trying to figure out.

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          1 / 1
          • First post
            3/4
            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