• 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.
  • D Offline
    dwburger
    last edited by Jun 24, 2020, 6:08 PM

    Updating didn’t solve the problem. Just wondering…I’ve seen recent references to using OMXplayer independent of MM2. Does this mean that the OMXplayer window is on top of the MM2 screen or somehow incorporated into it. Could someone give me a little push into understanding this?

    1 Reply Last reply Reply Quote 0
    • E Offline
      evroom
      last edited by Jun 24, 2020, 7:21 PM

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

      Could someone give me a little push

      When using the module or not, omxplayer always will be an overlay on top of your MM display.

      Test if it works at all (example for an Axis IP camera):

      $ omxplayer --avdict rtsp_transport:tcp --live --video_queue 4 --fps 30 --win "0 625 590 957" rtsp://user:password@192.168.178.56/axis-media/media.amp?resolution=640x360
      

      With log:

      $ omxplayer --genlog --avdict rtsp_transport:tcp --live --video_queue 4 --fps 30 --win "0 0 640 360" rtsp://user:password@192.168.178.56/axis-media/media.amp?resolution=640x360
      

      The positioning of the stream can be a bit of a pain.
      Size of video stream:
      (x2 - x1) x (y2 - y1) = 640 x 360

      To use it under control of pm2 (iso of vi you also can use nano):

      $ cd /home/pi
      $ vi axis.sh
      #!/bin/bash
      echo "Starting Axis stream ..."
      
      # No rotation
      omxplayer --avdict rtsp_transport:tcp --live --video_queue 4 --fps 30 --win "0 625 590 957" rtsp://user:password@192.168.178.56/axis-media/media.amp?resolution=640x360
      
      $ pm2 start axis.sh
      $ pm2 save
      

      To see it run:

      $pm2 status
      

      To restart it:

      $ pm2 restart axis
      

      To stop it:

      $ pm2 stop axis
      

      To remove it from pm2:

      $ pm2 delete axis
      

      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)

      D 1 Reply Last reply Jun 24, 2020, 7:50 PM Reply Quote 0
      • D Offline
        dwburger @evroom
        last edited by Jun 24, 2020, 7:50 PM

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

        omxplayer --genlog --avdict rtsp_transport:tcp --live --video_queue 4 --fps 30 --win “0 0 640 360” rtsp://user:password@192.168.178.56/axis-media/media.amp?resolution=640x360

        I’m just getting the “have a nice day” error. What would the most basic omxplayer command be? I just want to see the Wyze rtsp stream anywhere on the RPi 4 screen. I’ve tried: omxplayer rtsp://:@IP address and I get the “have a nice day” error.

        1 Reply Last reply Reply Quote 0
        • E Offline
          evroom
          last edited by Jun 24, 2020, 8:39 PM

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

          I’m just getting the “have a nice day” error.

          Can you see if the omxplayer.log gives a clue?
          And what would your VLC url look like?

          It can be that your cam or codec is not supported.

          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)

          D 1 Reply Last reply Jun 24, 2020, 11:18 PM Reply Quote 0
          • B Offline
            BKeyport Module Developer
            last edited by Jun 24, 2020, 9:07 PM

            @dwburger Try this:

            https://www.ispyconnect.com/man.aspx?n=Wyzecam

            get a URL from them, then use that URL directly in OMXPlayer…

            omxplayer [URL]

            No other options, YET.

            once you get that going, you can position and set FPS, etc.

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

            1 Reply Last reply Reply Quote 0
            • D Offline
              dwburger @evroom
              last edited by Jun 24, 2020, 11:18 PM

              @evroom I ran the following command via SSH to a headless RPi 4. I stopped MM2 via PM2 so the RPi4 GUI desktop is all I see.

              omxplayer -g rtsp://admin:admin@192.168.1.20/live

              The omxplayer.log file looks like this:

              23:13:40 T:18446744072105597939 DEBUG: DllBcm: Using omx system library
              23:13:40 T:18446744072105599016 DEBUG: DllOMX: Using omx system library
              23:13:40 T:18446744072105599609 DEBUG: DllAvFormat: Using libavformat system library
              23:13:40 T:18446744072105600891 DEBUG: DBus connection succeeded
              23:13:40 T:18446744072105601616 DEBUG: Keyboard: DBus connection succeeded
              23:13:40 T:18446744072105601755 DEBUG: OMXThread::Create - Thread with id -1387290944 started
              23:13:40 T:18446744072105601853 DEBUG: DllAvUtilBase: Using libavutil system library
              23:13:40 T:18446744072105601872 DEBUG: DllAvCodec: Using libavcodec system library
              23:13:40 T:18446744072105601888 DEBUG: DllAvFormat: Using libavformat system library
              23:13:40 T:18446744072105602188 DEBUG: COMXPlayer::OpenFile - avformat_open_input rtsp://admin:admin@192.168.1.20/live
              23:13:43 T:18446744072108706892 DEBUG: COMXPlayer::OpenFile - avformat_open_input enabled SEEKING
              23:13:43 T:18446744072108707062 ERROR: COMXPlayer::OpenFile - avformat_open_input rtsp://admin:admin@192.168.1.20/live
              23:13:43 T:18446744072108717572 DEBUG: OMXThread::Run - Exited thread with id -1387290944
              23:13:43 T:18446744072108718100 DEBUG: OMXThread::StopThread - Thread stopped

              D 1 Reply Last reply Jun 24, 2020, 11:24 PM Reply Quote 0
              • D Offline
                dwburger @dwburger
                last edited by Jun 24, 2020, 11:24 PM

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

                rtsp://admin:admin@192.168.1.20/live

                I see I made an error with the rtsp URL. Here’s the correct one for my Wyze cam masking the username and password:

                rtsp://d____:b____@192.168.1.117/live

                D 1 Reply Last reply Jun 24, 2020, 11:26 PM Reply Quote 0
                • D Offline
                  dwburger @dwburger
                  last edited by Jun 24, 2020, 11:26 PM

                  @dwburger It took several seconds, but entering the correct rtsp URL got my camera’s video stream onto the RPi4 screen (full-screen). I’ll follow it a while to see how stable it is.

                  1 Reply Last reply Reply Quote 0
                  • D Offline
                    dwburger
                    last edited by Jun 24, 2020, 11:57 PM

                    OK…I’ve got it displaying my Wyze rtsp live stream on the screen while MM2 is running. The live stream seems to start and stop so I’ll work on that. Also, I need to position it in the correct place (lower-right corner).

                    B 1 Reply Last reply Jun 25, 2020, 1:11 AM Reply Quote 0
                    • B Offline
                      BKeyport Module Developer @dwburger
                      last edited by Jun 25, 2020, 1:11 AM

                      @dwburger Looks like you’re on the way. Good luck to you!

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

                      D 1 Reply Last reply Jun 25, 2020, 1:13 AM Reply Quote 0
                      • 1
                      • 2
                      • 50
                      • 51
                      • 52
                      • 53
                      • 54
                      • 60
                      • 61
                      • 52 / 61
                      52 / 61
                      • First post
                        512/602
                        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