Git Product home page Git Product logo

mmm-rtspstream's Introduction

MMM-RTSPStream - Video Streaming from Live Feeds (Security Cameras)

This is a module for the MagicMirror².

This module will show a live RTSP video stream and/or periodic snapshots on the Magic Mirror from any IP Security Camera which supports the RTSP protocol and/or can serve a snapshot periodically.

⚠️ This module is no longer being actively developed. I will accept PRs and leave the repo active, but will not be directly supporting any issues. If anyone is interested in assuming ownership of the module, please contact @shbatm. ⚠️

Why?

  • I am no longer using this module on my own mirror. After several years, I found that I use the snapshots much more frequently than I streamed the actual cameras, which can be performed by much simpler modules and methods. To enable streaming, WebRTC (like MMM-HomeAssistant-WebRTC) is a newer and better standard with much lower server overhead and latency for delivering RTSP Streams to the frontend than any of the options used here, in the future, this will be the method I focus on and I will not try to shoehorn another technology into this module.
  • Update 5-Oct-2022: See alternative module MMM-RTSPtoWeb for a drastically simplified module relying on WebRTC and a backend server.

Features:

  • Supports single or multiple camera streams/snapshots
  • For multiple streams: supports rotating through streams in a single window or displaying multiple windows (with customizeable layout)
  • Supports fetching snapshots from a file or url when not actively streaming
  • Flexible configurations to limit resource use on Raspberry Pi --
    • Stops all streams when module is hidden
    • Option for AutoPlay or manual starting of stream
    • Plays one or all streams (when displaying multiple)
    • Note: 3 simultaneous streams on a RaspberryPi 3 is about the limit for usability.
  • Support for MMM-KeyBindings module for Play/Pause Remote Control and navigation of multiple streams
  • Hardware-Accelerated Playback on the main screen, with option to use software playback on a remote browser window.
  • When using omxplayer or vlc, double-clicking the play button (or longpressing PlayPause key if using MMM-KeyBindings) will play the video fullscreen. Click anywhere once (or Pause with MMM-KeyBindings) to exit.

Dependencies:

  • The following packages are required for the module to function fully and the installer will attempt to install them with apt:
    • ffmpeg, omxplayer, vlc, devilspie2, wmctrl
  • For hardware-accelerated streaming, vlc or omxplayer is required.
  • For manipulating VLC's windows, devilspie2 and wmctrl are used.
  • For software-decoded streaming and/or remote browser viewing:
    • Requires jsmpeg for front-end display of stream.
    • Requires node-rtsp-stream-es6 Node.js module and ffmpeg for backend.
    • Video flow using 'ffmpeg': Camera RTSP Stream → ffmpeg pre-processor → MM module's node_helper.js (via node-rtsp-stream-es6) → Web Socket (ws) → MagicMirror² (via jsmpeg)

Screenshot:

Installation:

Quick install

If you followed the default installation instructions for the Magic Mirror² project, you should be able to use the automatic installer. The following command will download the installer and execute it:

bash -c "$(curl -s https://raw.githubusercontent.com/shbatm/MMM-RTSPStream/master/scripts/installer.sh)"

Updating after a Module Update:

Re-run the installation script above, or do the following:

cd ~/MagicMirror/modules/MMM-RTSPStream
git pull
npm install

Using the module

To use this module, use the configuration builder tool included.

  1. Install the module (see above).
  2. Add the following to your config:
    {
        module: 'MMM-RTSPStream',
        position: 'middle_center',
        config: {
            initialSetup: true,
        }
    }
  1. Open a web-browser and navigate to: http://your-mirror-ip:8080/MMM-RTSPStream/config.html
  2. Use the tool to generate your config details.
  3. Copy the section you your MagicMirror config.js file.
  4. Restart the MagicMirror

Configuration options

It is highly recommended you use the tool included. Several sample configurations are available on this wiki page, detailed options are listed below.

Option Description
autoStart Start the stream(s) automatically
Default: true
rotateStreams true: Rotate through all streams in a single window
false: Display an individual window for each stream
Default: true
rotateStreamTimeout Time (in sec) to show each stream when rotateStreams is true.
Default: 10
localPlayer Optional: Which player to use for local playback: vlc, ffmpeg or omxplayer.
Default: vlc for hardware acceleration.
remotePlayer Optional: Which player to use for remote browser playback: ffmpeg or none.
Default: ffmpeg. Set to none to disable remote playback.
remoteSnaps Optional: If true, module will continue to show snapshots for any remote browser windows while playing the stream locally. Using false will stop updating snapshots when playing locally. Use this option if you only use the local screen to save resources.
Default: true.
showSnapWhenPaused Whether or not to show snapshots when the stream(s) is paused.
Default: true
moduleWidth Width in px of the module.
Note: When rotateStreams is false and multiple streams are used, adjust this value to adjust the number of streams shown side by side. E.G. to show 2 streams side by side, this value should be = 2*(Stream Width + 2*1px (border) + 2*15px (margin))
Default: 354px
moduleHeight Similar (but less critical) to moduleWidth. Adjust to the number of streams high to ensure other modules clear.
Default: 240px
moduleOffset Only applies when using OMXPlayer. On some displays, the video does not properly line up with the box on the screen because of differences between JavaScript's reporting and the native display. Entering a pixel value will shift the video over by that amount.
Default: 0 Values: Any number (no units) by itself will adjust both top/left the same amount, or you can specify left & top adjustments separately (e.g. moduleOffset: { left: 10, top: -10 }
shutdownDelay The time delay (in sec) between when the last client disconnects and the ffmpeg or vlc stream actually stops. Once created, the websocket continues to run in the background; however, the ffmpeg process will only process the camera's stream while there are active connections on the socket (e.g. someone is watching the video on the frontend). When rotating through multiple streams this prevents closing the connection to a stream only to re-open a few seconds later when it comes back through the loop (which reduces the time delay when restarting a stream). To conserve resources on a slow device, you can set this to 0
Default: 11 (sec)
debug Set to true to show additional logging information.
streamX The individual stream configuration options. See table below for more details.

Stream Configuration Options

Each stream you would like to show should be added to the the configuration by adding a streamX section, where X is the number of the stream (e.g. stream1, stream2, stream3, etc.)

config: {
    // ... <other config options; see above> ...,
    stream1: {
        name: 'BigBuckBunny Test Stream',
        url: 'rtsp://184.72.239.149/vod/mp4:BigBuckBunny_115k.mov',
        // ... <additional stream options; see below> ...
    },
    stream2: {
        // ...
    },
    // ...
}
Option Description
name Required The name of the individual stream. Will be displayed when paused if snapshots are turned off.
url The url of the RTSP stream. See this list for paths for some common security cameras. Also see below for how to test for a valid url
Username and password should be passed in the url if required: rtsp://<username>:<password>@<hostname>:<port>/<path>
Default: A test stream at 'rtsp://184.72.239.149/vod/mp4:BigBuckBunny_115k.mov',
hdUrl Optional: The url for the "High-Def" stream to use when playing a full screen stream with OMXPlayer. If blank, regular url will be used.
protocol Protocol to use for receiving RTSP stream
Default: "tcp", valid options: "tcp" or "udp".
snapshotUrl A string with the path to the camera snapshot. This can either be a url to camera itself (if supported) or a file path to where the snapshot is stored every X seconds by the camera. Leave blank to show just the stream title when paused.
Username and password should be passed in the url if required: http://<username>:<password>@<hostname>:<port>/<path>
snapshotType The type of snapshot path given
Values: url or file
Default: url
snapshotRefresh How often to refresh the snapshot image (in sec).
Default: 10 (seconds)
frameRate Framerate to use for the RTSP stream. Must be a string.
Default: "30"
width The width in px of the stream.
height The height in px of the stream.
absPosition Only required for OMXPlayer Provide an absolute potiion to show the stream. This overrides the automatic window and moduleOffset settings.
Format: { top: XX, right: XX, bottom: XX, left: XX } where XX is the pixel position on the screen.
ffmpegPort Only required for ffmpeg Any available port to use for the ffmpeg websocket.
Notes: THIS IS NOT THE PORT FOR YOUR CAMERA Camera stream's port must be included in the URL above. This port must be unqiue for each stream added and cannot be used by another service on the server. This is a separate WebSocket from the the Socket.IO connection between the module's script and it's node_helper.js.
Default: 9999
hwAccel Only required for ffmpeg Attempt to use Hardware Accelerated Decoding with ffmpeg.
Default: false
muted Disable sound (OMXPlayer and VLC only)
Default: false
timeout Timeout for stalled file/network operations (OMXPlayer only)
Default: 10 (seconds)
rotateDegree Set orientation of video (OMXPlayer only)
Available values: 0, 90, 180 or 270
Default: 0
omxRestart Automatically restart the OMX Stream every X hours.
Default: 24 (hours).

Testing a camera feed

To test to make sure you have a working url for a camera feed: create a text file with the URL as the first and only line in the file. Save the file as <somename>.strm and open the file with a video player like VLC.

Advanced Stream Configurations

This module has been tested exclusively with streams for Hikvision (Swann) cameras. You may find that you need to adjust the ffmpeg settings that are used beyond just frame rate and size. The command line arguements for ffmpeg can be changed by editing Line 14 of the following file after install. The ffmpeg arguement list is passed as an array.

~/MagicMirror/modules/MMM-RTSPStream/node_modules/node-rtsp-stream-es6/src/mpeg1muxer.js

Controlling from other modules

The streams can be controlled on the main screen by sending a module notification. Examples:

this.sendNotification("RTSP-PLAY", "all"); // Play all streams (or current stream if rotating)
this.sendNotification("RTSP-PLAY", "streamX"); // Play a particular stream (when not rotating)
this.sendNotification("RTSP-PLAY-FULLSCREEN", "streamX"); // Play a particular stream fullscreen (when using OMXPLAYER)
this.sendNotification("RTSP-PLAY-WINDOW", { name:"streamX", box: { top: XX, right: XX, bottom: XX, left: XX } }); // Play a particular stream in a custom window (when using OMXPLAYER)
this.sendNotification("RTSP-STOP", "all"); // Stop the streams
this.sendNotification("RTSP-STOP", "streamX"); // Stop a particular stream

KeyBindings Configuration (Requires MMM-KeyBindings)

To change from the defaults, add changes to the end of the module's configuration section

Option Description
mode Default: "DEFAULT" - Will respond to a key press if no other module has the focus.
Note: - To enable this module to take focus, change this value and add a Focus key name below.
map The map between this module's key functions and the Keyboard / MMM-KeyBinding's key name that is sent (i.e. when the "MediaPlayPause" key is pressed, it will send a Play action to this module).
Previous/Next actions will cycle through the streams when rotateStreams is enabled, and will change which stream is selected when multiple streams are shown (red border will appear around selected stream).
keyBindings: {
    enabled: true,
    mode: "DEFAULT",
    map: {
        Play: "MediaPlayPause",
        Previous: "MediaPreviousTrack",
        Next: "MediaNextTrack",
    }
}

To-do

  • Add better touchscreen support (use an OnTouch method to play/pause instead of OnClick).
  • KNOWN ISSUE: snapshots can be stopped by another "instance" of the mirror running in a different window. Expected behavior: should only affect the local window.
  • KNOWN ISSUE: omxplayer will only play a certain maximum number of streams at a time. On a RPi3, this appears to be a max of 3. It won't error, it just won't play another stream. To fix: adjust the memory split of the GPU/CPU using the raspi-config command.

Experimentation

This section includes some untested options and configurations that may be useful in the future.

Use ffmpeg to capture snapshots from an RTSP Stream

// Grab a frame every x seconds and save as thumb.png:
ffmpeg -i {RTSP_SOURCE} -f image2 -vf fps=fps=1/{x} -update 1 thumb.png

// Grab the first frame from a stream and save as thumb.jpg
ffmpeg -i {RTSP_SOURCE} -ss 00:00:01.500 -f image2 -vframes 1 thumb.png

(source)

mmm-rtspstream's People

Contributors

landaisbenj avatar mohace avatar rk295 avatar shbatm avatar snyk-bot avatar thellekamp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mmm-rtspstream's Issues

Zoom/scale issue with the omxplayer

Hi,

I've noticed that if you set a certain zoom factor in MagicMirror config.js, the white square (of this module) where the video should be displayed shrinks (or expands), but the omxplayer video stays the samze size, making it impossible to overlay the video (omxplayer overlay) over the white square. Is there a way to multiply the size of the omx stream by this zoom factor before starting it so it will fit?

Thanks in advance.

RTSP Stream Blank, Test Link Audio Only

RSTP stream video does not appears however the testing link does play audio with no video.

{
module: "MMM-RTSPStream",
position: "bottom_right",
header: "Attached Garage",
config: {
autoStart: true,
rotateStreams: true,
rotateStreamTimeout: 5,
moduleWidth: 354,
moduleHeight: 240,
localPlayer: 'omxplayer',
remotePlayer: 'none',
showSnapWhenPaused: false,
remoteSnaps: true,
stream1: {
name: '1',
url: 'rtsp://184.72.239.149/vod/mp4:BigBuckBunny_115k.mov',
frameRate: 'undefined',
width: undefined,
height: undefined,
}
stream2: {
name: '2',
url: 'rtsp://184.72.239.149/vod/mp4:BigBuckBunny_115k.mov',
frameRate: 'undefined',
width: undefined,
height: undefined,
}
}
}

also connection problems of configuration

this is my configuration:
{
module: "MMM-RTSPStream",
position: "middle_center",
header: "cam",
config: {
autoStart: true,
rotateStreams: true,
rotateStreamTimeout: 10,
moduleWidth: 354,
moduleHeight: 240,
localPlayer: 'omxplayer',
remotePlayer: 'none',
showSnapWhenPaused: true,
remoteSnaps: true,
stream1: {
name: 'c1',
url: 'rtsp://admin:[email protected]/Streaming/Channels/1',
frameRate: 'undefined',
hdUrl: 'rtsp://admin:[email protected]/Streaming/Channels/1',
snapshotType: 'url',
snapshotRefresh: 10,
width: 354,
height: 240,
},
}
}

image
no response ,was it the problem of resolution,and how to configure that ,I tried many ways and still not success, and I can use my vlc to get the stream of the camera ,but was anything wrong with other configuration,no idea!
image

[Bug] omx_stream1 stopped

I'm using the MMM-Remote-control module to toggle the screen on and off, I'm running the development branch using the omxplayer. Video is working, but when the monitor is toggled off the pm2 omx_stream1 task stops, when toggling the monitor back on, the MMM-Remote-control module sends the User-Presence notification with a payload of true, but the playAll function doesnt seem to do anything, the omx_stream1 task remains stopped, I can manually restart the omx_stream1 task and video resumes at that point.

Loading MMM-RTSPStream

Hi all,
Please help me with below issue. Module is not showing a live RTSP video stream on my MM.
I can see just black screen..
screenshot from 2018-08-05 23-38-08

MMM-RTSPStream.js typo

MMM-RTSPStream.js

if (notification === 'RSTP-PLAY-WINDOW') line has a typo

It should be:
if (notification === 'RTSP-PLAY-WINDOW')

I did a PR.

How to hide the stream?

I was using Google Assistant to display content on Magic Mirror, the question is how to hide / show RTSP stream ? I have other contents to show beside CCTV streams.

BigBuckBunny Test Stream

I have MMM-RTSPStream working with my IP camera. However this BigBuckBunny Test Stream is also showing in my screen. So now I have 2 streams which is not defined in my config.js. How can I remove this BigBuckBunny Test Stream? See attached image.

            {
                    module: "MMM-RTSPStream",
                    position: "middle_center",
                    header: "CAMERA",
                    config: {
                    autoStart: true,
                    rotateStreams: false,
                    rotateStreamTimeout: 10,
                    moduleWidth: 800,
                    moduleHeight: 480,
                    moduleOffset: -5,
                    localPlayer: 'omxplayer',
                    remotePlayer: 'none',
                    showSnapWhenPaused: true,
                    remoteSnaps: true,
                    stream2: {
                    name: 'Cam',
                    url: 'rtsp://user:[email protected]:10/Streaming/Channels/2',
                    frameRate: '20',
                    hdUrl: 'rtsp://user:[email protected]:10/Streaming/Channels/1',
                    snapshotUrl: 'rtsp://user:[email protected]:10/Streaming/Channels/2/picture',
                    snapshotType: 'url',
                    snapshotRefresh: 10,
                    width: 800,
                    height: 480,
        }
    }

},

image

MagicMirror freezing, error logs show RTSP errors.

Hi guys,

So i recently switched back to oxmplayer on my Rpi3 running latest Raspbian Stretch w/ desktop. I left it to run since yesterday and came back to see that MM2 is frozen. I can't still access the Rpi via ssh so its not completely locked up. Below (last log) is after I tried restarting MagicMirror with
'pm2 MagicMirror restart' the mirror is still stuck and not closing/re-opening. Stream is also frozen from last night. Any idea what is causing this?

Uptime is:
16:34:22 up 1 day, 3:12, 3 users, load average: 3.48, 3.05, 2.88

Error Logs:

pi@raspberrypi:~/MagicMirror/modules/default/compliments $ 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-01-07T13:33:06: PM2 log: App [omx_stream1:1] starting in -fork mode-
PM2        | 2019-01-07T13:33:06: PM2 log: App [omx_stream1:1] online
PM2        | 2019-01-07T13:53:22: PM2 log: Stopping app:MagicMirror id:0
PM2        | 2019-01-07T13:53:23: PM2 log: pid=3567 msg=failed to kill - retrying in 100ms
PM2        | 2019-01-07T13:53:23: PM2 log: App [MagicMirror:0] exited with code [0] via signal [SIGINT]
PM2        | 2019-01-07T13:53:23: PM2 log: pid=3567 msg=process killed
PM2        | 2019-01-07T13:53:23: PM2 log: App [MagicMirror:0] starting in -fork mode-
PM2        | 2019-01-07T13:53:23: PM2 log: App [MagicMirror:0] online
PM2        | 2019-01-07T13:53:36: PM2 log: Stopping app:omx_stream1 id:1
PM2        | 2019-01-07T13:53:36: PM2 log: pid=3723 msg=failed to kill - retrying in 100ms
PM2        | 2019-01-07T13:53:36: PM2 log: pid=3723 msg=failed to kill - retrying in 100ms
PM2        | 2019-01-07T13:53:36: PM2 log: App [omx_stream1:1] exited with code [1] via signal [SIGINT]
PM2        | 2019-01-07T13:53:36: PM2 log: pid=3723 msg=process killed
PM2        | 2019-01-07T13:53:45: PM2 log: App [omx_stream1:1] starting in -fork mode-
PM2        | 2019-01-07T13:53:45: PM2 log: App [omx_stream1:1] online

/home/pi/.pm2/logs/omx-stream1-error.log last 15 lines:
1|omx_stre | /usr/bin/omxplayer: line 67: 15213 Aborted                 (core dumped) LD_LIBRARY_PATH="$OMXPLAYER_LIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" $OMXPLAYER_BIN "$@"
1|omx_stre | * failed to add service - already in use?
1|omx_stre | /usr/bin/omxplayer: line 67: 15247 Aborted                 (core dumped) LD_LIBRARY_PATH="$OMXPLAYER_LIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" $OMXPLAYER_BIN "$@"
1|omx_stre | * failed to add service - already in use?
1|omx_stre | /usr/bin/omxplayer: line 67: 15281 Aborted                 (core dumped) LD_LIBRARY_PATH="$OMXPLAYER_LIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" $OMXPLAYER_BIN "$@"
1|omx_stre | * failed to add service - already in use?
1|omx_stre | /usr/bin/omxplayer: line 67: 15315 Aborted                 (core dumped) LD_LIBRARY_PATH="$OMXPLAYER_LIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" $OMXPLAYER_BIN "$@"
1|omx_stre | * failed to add service - already in use?
1|omx_stre | /usr/bin/omxplayer: line 67: 15355 Aborted                 (core dumped) LD_LIBRARY_PATH="$OMXPLAYER_LIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" $OMXPLAYER_BIN "$@"
1|omx_stre | * failed to add service - already in use?
1|omx_stre | /usr/bin/omxplayer: line 67: 15409 Aborted                 (core dumped) LD_LIBRARY_PATH="$OMXPLAYER_LIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" $OMXPLAYER_BIN "$@"
1|omx_stre | * failed to add service - already in use?
1|omx_stre | /usr/bin/omxplayer: line 67: 15446 Aborted                 (core dumped) LD_LIBRARY_PATH="$OMXPLAYER_LIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" $OMXPLAYER_BIN "$@"
1|omx_stre | * failed to add service - already in use?
1|omx_stre | /usr/bin/omxplayer: line 67: 15496 Aborted                 (core dumped) LD_LIBRARY_PATH="$OMXPLAYER_LIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" $OMXPLAYER_BIN "$@"

/home/pi/.pm2/logs/MagicMirror-error.log last 15 lines:
0|MagicMir | ATTENTION: default value of option force_s3tc_enable overridden by environment.
0|MagicMir | [13988:0106/195336.292097:FATAL:bus.cc(1151)] D-Bus connection was disconnected. Aborting.
0|MagicMir | ATTENTION: default value of option force_s3tc_enable overridden by environment.
0|MagicMir | [1018:0107/114131.250034:FATAL:bus.cc(1151)] D-Bus connection was disconnected. Aborting.
0|MagicMir | ATTENTION: default value of option force_s3tc_enable overridden by environment.
0|MagicMir | ATTENTION: default value of option force_s3tc_enable overridden by environment.
0|MagicMir | ATTENTION: default value of option force_s3tc_enable overridden by environment.
0|MagicMir | ATTENTION: default value of option force_s3tc_enable overridden by environment.
0|MagicMir | ATTENTION: default value of option force_s3tc_enable overridden by environment.
0|MagicMir | ATTENTION: default value of option force_s3tc_enable overridden by environment.
0|MagicMir | ATTENTION: default value of option force_s3tc_enable overridden by environment.
0|MagicMir | ATTENTION: default value of option force_s3tc_enable overridden by environment.
0|MagicMir | ATTENTION: default value of option force_s3tc_enable overridden by environment.
0|MagicMir | ATTENTION: default value of option force_s3tc_enable overridden by environment.
0|MagicMir | ATTENTION: default value of option force_s3tc_enable overridden by environment.



Trying to restart via pm2 MagicMirror restart, MM does not restart:

`[TAILING] Tailing last 15 lines for [all] processes (change the value with --lines option)
/home/pi/.pm2/pm2.log last 15 lines:
PM2 | 2019-01-08T16:45:00: PM2 log: pid=6951 msg=failed to kill - retrying in 100ms
PM2 | 2019-01-08T16:45:00: PM2 log: pid=6951 msg=failed to kill - retrying in 100ms
PM2 | 2019-01-08T16:45:00: PM2 log: pid=6951 msg=failed to kill - retrying in 100ms
PM2 | 2019-01-08T16:45:00: PM2 log: pid=6951 msg=failed to kill - retrying in 100ms
PM2 | 2019-01-08T16:45:00: PM2 log: pid=6951 msg=failed to kill - retrying in 100ms
PM2 | 2019-01-08T16:45:00: PM2 log: pid=6951 msg=failed to kill - retrying in 100ms
PM2 | 2019-01-08T16:45:00: PM2 log: pid=6951 msg=failed to kill - retrying in 100ms
PM2 | 2019-01-08T16:45:00: PM2 log: pid=6951 msg=failed to kill - retrying in 100ms
PM2 | 2019-01-08T16:45:01: PM2 log: pid=6951 msg=failed to kill - retrying in 100ms
PM2 | 2019-01-08T16:45:01: PM2 log: pid=6951 msg=failed to kill - retrying in 100ms
PM2 | 2019-01-08T16:45:01: PM2 log: Process with pid 6951 still alive after 1600ms, sending it SIGKILL now...
PM2 | 2019-01-08T16:45:01: PM2 log: App [MagicMirror:0] exited with code [0] via signal [SIGKILL]
PM2 | 2019-01-08T16:45:01: PM2 log: pid=6951 msg=process killed
PM2 | 2019-01-08T16:45:01: PM2 log: App [MagicMirror:0] starting in -fork mode-
PM2 | 2019-01-08T16:45:01: PM2 log: App [MagicMirror:0] online

/home/pi/.pm2/logs/omx-stream1-error.log last 15 lines:
1|omx_stre | /usr/bin/omxplayer: line 67: 15213 Aborted (core dumped) LD_LIBRARY_PATH="$OMXPLAYER_LIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" $OMXPLAYER_BIN "$@"
1|omx_stre | * failed to add service - already in use?
1|omx_stre | /usr/bin/omxplayer: line 67: 15247 Aborted (core dumped) LD_LIBRARY_PATH="$OMXPLAYER_LIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" $OMXPLAYER_BIN "$@"
1|omx_stre | * failed to add service - already in use?
1|omx_stre | /usr/bin/omxplayer: line 67: 15281 Aborted (core dumped) LD_LIBRARY_PATH="$OMXPLAYER_LIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" $OMXPLAYER_BIN "$@"
1|omx_stre | * failed to add service - already in use?
1|omx_stre | /usr/bin/omxplayer: line 67: 15315 Aborted (core dumped) LD_LIBRARY_PATH="$OMXPLAYER_LIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" $OMXPLAYER_BIN "$@"
1|omx_stre | * failed to add service - already in use?
1|omx_stre | /usr/bin/omxplayer: line 67: 15355 Aborted (core dumped) LD_LIBRARY_PATH="$OMXPLAYER_LIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" $OMXPLAYER_BIN "$@"
1|omx_stre | * failed to add service - already in use?
1|omx_stre | /usr/bin/omxplayer: line 67: 15409 Aborted (core dumped) LD_LIBRARY_PATH="$OMXPLAYER_LIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" $OMXPLAYER_BIN "$@"
1|omx_stre | * failed to add service - already in use?
1|omx_stre | /usr/bin/omxplayer: line 67: 15446 Aborted (core dumped) LD_LIBRARY_PATH="$OMXPLAYER_LIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" $OMXPLAYER_BIN "$@"
1|omx_stre | * failed to add service - already in use?
1|omx_stre | /usr/bin/omxplayer: line 67: 15496 Aborted (core dumped) LD_LIBRARY_PATH="$OMXPLAYER_LIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" $OMXPLAYER_BIN "$@"

/home/pi/.pm2/logs/MagicMirror-error.log last 15 lines:
0|MagicMir | ATTENTION: default value of option force_s3tc_enable overridden by environment.
0|MagicMir | [13988:0106/195336.292097:FATAL:bus.cc(1151)] D-Bus connection was disconnected. Aborting.
0|MagicMir | ATTENTION: default value of option force_s3tc_enable overridden by environment.
0|MagicMir | [1018:0107/114131.250034:FATAL:bus.cc(1151)] D-Bus connection was disconnected. Aborting.
0|MagicMir | ATTENTION: default value of option force_s3tc_enable overridden by environment.
0|MagicMir | ATTENTION: default value of option force_s3tc_enable overridden by environment.
0|MagicMir | ATTENTION: default value of option force_s3tc_enable overridden by environment.
0|MagicMir | ATTENTION: default value of option force_s3tc_enable overridden by environment.
0|MagicMir | ATTENTION: default value of option force_s3tc_enable overridden by environment.
0|MagicMir | ATTENTION: default value of option force_s3tc_enable overridden by environment.
0|MagicMir | ATTENTION: default value of option force_s3tc_enable overridden by environment.
0|MagicMir | ATTENTION: default value of option force_s3tc_enable overridden by environment.
0|MagicMir | ATTENTION: default value of option force_s3tc_enable overridden by environment.
0|MagicMir | ATTENTION: default value of option force_s3tc_enable overridden by environment.
0|MagicMir | ATTENTION: default value of option force_s3tc_enable overridden by environment.

Stream only appears after reload of MM

Hi,

after testing several IP-Cams I finally found one that works for me, but somehow only with ffmpeg and not omxplayer. Haven't found any further info on using VLC that I fully understand.

The highres-stream only works for some time, so I am using the lowres-stream instead which is fine with me.

My issue is that MM doesn't display the stream when starting up. Only after I reload it (Ctrl+R) the stream appears as wanted. Is there something wrong with my config or maybe a way to automaically reload MM after 5 seconds of initial start?

Here my config for RTSPStream:

module: "MMM-RTSPStream",
position: "top_center",
config: {
autoStart: true,
rotateStreams: true,
rotateStreamTimeout: 10,
moduleWidth: 640,
moduleHeight: 480,
localPlayer: 'ffmpeg',
remotePlayer: 'none',
showSnapWhenPaused: true,
remoteSnaps: true,
stream1: {
name: 'Garten',
url: 'rtsp://xxx:[email protected]:554/streaming/channels/102
frameRate: '25',
snapshotType: 'url',
snapshotRefresh: 10,
width: 640,
height: 480,
ffmpegPort: 9999,
shutdownDelay: 10000,
hideFfmpegOutput: true,
},
}

I am willing to try VLC or omxplayer again, since I soon would like to add further cams to my setup.

Thanks in advance for your support and best regards,
Stephan

Module position in relation to Newsfeed

(using wip branch)
I use the player in the bottom left corner. I have the standard newsfeed in the bottom center.
When a two line News is displayed the Border of the Module is display perfectly in line with the video feed. But when the Newsfeed changes to a oneliner the modules "jumps" also down so that the video is out of place.

Any idea how we can fix this? I'm happy to submit a PR if I would have any clue how to fix it.

How do you adjust resolution ?

I’m using Amcrest cameras.

When I use MMMRTSP it looks good but not OMG crisp.

When I look through the amcrest IOS app or via my laptop or directly connected to the NVR it looks super HD. Ideas?

Header and Cameraframe Alignment

Hi, the Module works quite good with rotating snapshots of 5 cams on a Pi2. But there is a mismatch of the alignment of the header line and cameraframe. The camerapicture and frame is matching very good in automode. But how can I align the header and frame?
20180618_225435

OMXPlayer video positioning =(

Ok, so for the life of me I cannot get this video stream to position. I've tried absPosition (video just expands and seems to take up half the screen for some reason), moduleOffset, height, width etc.

I initially treid OMXplayer but couldn't get any video stream, then tried VLC but the right side of my stream was cut off no matter what I did and then came back to omxplayer. Initially when I switched back to omx from vlc everything seemed to position fine however my stream and magicmirror kept freezing every 12 hours or so. I had a feeling it had something to do with glibc as I remembered manually trying to get it to compile when going to the VLC route so I decided to just do a fresh install.

Now the issue is, I cannot get the video to align. Before reinstalling it was fine with the same configuration values so I am not sure what is going on here.

I'm really hoping to get this module working once and for all. I've put several hours into it and probably wouldn't be anywhere close if it weren't for your help, so Thank you! =)

I just wanted to know if i'm missing something or if you had any 'quick fix' ? Is there a setting I can change directly in the css file or something?

Please see attached photo. Thanks again!

photo jan 23 1 37 44 pm

Typing Error

@shbatm - Hi, great modul! I'm testing your modul with a ctronics camera and it is working fine with omxplayer. Using the JSMpeg player causes an issue as there is a typing error in the port assignment in line 359 of MMM-RTSPstream (ffpmegPort --> ffmpegPort).

359    var sUrl = `ws://${document.location.hostname}:${this.config[stream].ffpmegPort}`;

MagicMirror freezing with errors

Hey,

Sorry to bother you again. I made sure I switched to Legacy drivers after your last response:

It appears you have the OpenGL drivers enabled -- OMXPlayer is not working with the OpenGL driver enabled on the newest version of Raspbian. You'll need to switch to VLC or switch to the Legacy driver until they resolve this issue.

However, the magicmirror is still locking up within an hour of me restarting. I can't even pm2 restart, I still have access to SSH but magicmirror wont restart at all. Its just stuck on the MM layout with time, video, date, etc frozen. PM2 logs shows the following:

`pi@raspberrypi:~/MagicMirror/modules/MMM-RTSPStream $ 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-01-11T16:39:06: PM2 log: Current arch : arm
PM2 | 2019-01-11T16:39:06: PM2 log: PM2 home : /home/pi/.pm2
PM2 | 2019-01-11T16:39:06: PM2 log: PM2 PID file : /home/pi/.pm2/pm2.pid
PM2 | 2019-01-11T16:39:06: PM2 log: RPC socket file : /home/pi/.pm2/rpc.sock
PM2 | 2019-01-11T16:39:06: PM2 log: BUS socket file : /home/pi/.pm2/pub.sock
PM2 | 2019-01-11T16:39:06: PM2 log: Application log path : /home/pi/.pm2/logs
PM2 | 2019-01-11T16:39:06: PM2 log: Process dump file : /home/pi/.pm2/dump.pm2
PM2 | 2019-01-11T16:39:06: PM2 log: Concurrent actions : 2
PM2 | 2019-01-11T16:39:06: PM2 log: SIGTERM timeout : 1600
PM2 | 2019-01-11T16:39:06: PM2 log: ===============================================================================
PM2 | 2019-01-11T16:39:06: PM2 log: [Watch] Start watching MagicMirror
PM2 | 2019-01-11T16:39:06: PM2 log: App [MagicMirror:0] starting in -fork mode-
PM2 | 2019-01-11T16:39:06: PM2 log: App [MagicMirror:0] online
PM2 | 2019-01-11T16:40:41: PM2 log: App [omx_stream1:1] starting in -fork mode-
PM2 | 2019-01-11T16:40:41: PM2 log: App [omx_stream1:1] online

/home/pi/.pm2/logs/omx-stream1-error.log last 15 lines:
1|omx_stre | /usr/bin/omxplayer: line 67: 15213 Aborted (core dumped) LD_LIBRARY_PATH="$OMXPLAYER_LIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" $OMXPLAYER_BIN "$@"
1|omx_stre | * failed to add service - already in use?
1|omx_stre | /usr/bin/omxplayer: line 67: 15247 Aborted (core dumped) LD_LIBRARY_PATH="$OMXPLAYER_LIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" $OMXPLAYER_BIN "$@"
1|omx_stre | * failed to add service - already in use?
1|omx_stre | /usr/bin/omxplayer: line 67: 15281 Aborted (core dumped) LD_LIBRARY_PATH="$OMXPLAYER_LIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" $OMXPLAYER_BIN "$@"
1|omx_stre | * failed to add service - already in use?
1|omx_stre | /usr/bin/omxplayer: line 67: 15315 Aborted (core dumped) LD_LIBRARY_PATH="$OMXPLAYER_LIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" $OMXPLAYER_BIN "$@"
1|omx_stre | * failed to add service - already in use?
1|omx_stre | /usr/bin/omxplayer: line 67: 15355 Aborted (core dumped) LD_LIBRARY_PATH="$OMXPLAYER_LIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" $OMXPLAYER_BIN "$@"
1|omx_stre | * failed to add service - already in use?
1|omx_stre | /usr/bin/omxplayer: line 67: 15409 Aborted (core dumped) LD_LIBRARY_PATH="$OMXPLAYER_LIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" $OMXPLAYER_BIN "$@"
1|omx_stre | * failed to add service - already in use?
1|omx_stre | /usr/bin/omxplayer: line 67: 15446 Aborted (core dumped) LD_LIBRARY_PATH="$OMXPLAYER_LIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" $OMXPLAYER_BIN "$@"
1|omx_stre | * failed to add service - already in use?
1|omx_stre | /usr/bin/omxplayer: line 67: 15496 Aborted (core dumped) LD_LIBRARY_PATH="$OMXPLAYER_LIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" $OMXPLAYER_BIN "$@"

/home/pi/.pm2/logs/MagicMirror-error.log last 15 lines:
0|MagicMir | ATTENTION: default value of option force_s3tc_enable overridden by environment.
0|MagicMir | ATTENTION: default value of option force_s3tc_enable overridden by environment.
0|MagicMir | ATTENTION: default value of option force_s3tc_enable overridden by environment.
0|MagicMir | ATTENTION: default value of option force_s3tc_enable overridden by environment.
0|MagicMir | ATTENTION: default value of option force_s3tc_enable overridden by environment.
0|MagicMir | ATTENTION: default value of option force_s3tc_enable overridden by environment.
0|MagicMir | ATTENTION: default value of option force_s3tc_enable overridden by environment.
0|MagicMir | ATTENTION: default value of option force_s3tc_enable overridden by environment.
0|MagicMir | ATTENTION: default value of option force_s3tc_enable overridden by environment.
0|MagicMir | ATTENTION: default value of option force_s3tc_enable overridden by environment.
0|MagicMir | ATTENTION: default value of option force_s3tc_enable overridden by environment.
0|MagicMir | ATTENTION: default value of option force_s3tc_enable overridden by environment.
0|MagicMir | ATTENTION: default value of option force_s3tc_enable overridden by environment.
0|MagicMir | [926:0111/163854.258245:FATAL:bus.cc(1151)] D-Bus connection was disconnected. Aborting.
0|MagicMir | ATTENTION: default value of option force_s3tc_enable overridden by environment.
`

npm installation failed

Hi Thank you for making RTSP module really looking forward towards using this !!!!

I am unable to run the cmd npm install and gives me the following error code

npm ERR! Linux 4.4.34-v7+
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v6.9.5
npm ERR! npm v3.10.10
npm ERR! file /home/pi/MagicMirror/modules/MMM-RTSPStream/package.json
npm ERR! code EJSONPARSE

npm ERR! Failed to parse json
npm ERR! Trailing comma in object at 21:1
npm ERR! }
npm ERR! ^
npm ERR! File: /home/pi/MagicMirror/modules/MMM-RTSPStream/package.json
npm ERR! Failed to parse package.json data.
npm ERR! package.json must be actual JSON, not just JavaScript.
npm ERR!
npm ERR! This is not a bug in npm.
npm ERR! Tell the package author to fix their package.json file. JSON.parse

npm ERR! Please include the following file with any support request:
npm ERR! /home/pi/MagicMirror/modules/MMM-RTSPStream/npm-deb

Simple plain HTML code to show onvif Cameras on browser

Hi
I'm currently using this module and it works perfectly.
The problem is, this module is way too complicated for me to tweak or even understand.

I'm turning the Magic Mirror into an home automation device and I'm running a web server on it so that I can control the lights and curtains via the web server. I want to add a feature to my web page to watch RTSP cameras.
I've done a lot of research and the closest thing I found was how to watch the camera via VLC mediaplayer, but I want the frame to be inside the HTML code.

So, what I'm asking is, can you please give me a simple plain code to put on my webpage so I can watch live streams from cameras?
something like this:

As you have done this before for this module.

Thank you very much
Pooya Sajjadi

Installation not working

Hello,
During the installation I get the following error message:
http-server: command not found

what am I doing wrong?

thanks

HIKVISION cam not working?

Hi,

Just installed this module for MM2 to view an RTSP stream from my Hikvision IP camera (DS-2CD2185FWD-I). I use the following config:

            {
                    module: "MMM-RTSPStream",
                    position: "top_center",
                    header: "Voordeur",
                    config: {
                                    autoStart: true,
                                    rotateStreams: false,
                                    rotateStreamTimeout: 10,
                                    moduleWidth: 640,
                                    moduleHeight: 480,
                                    localPlayer: 'omxplayer',
                                    stream1: {
                                                           name: 'Voordeur',
                                                           url: 'rtsp://username:[email protected]:554/Streaming/Channels/101/',

// url: 'rtsp://184.72.239.149/vod/mp4:BigBuckBunny_115k.mov',
snapshotType: '',
snapshotRefresh: 10,
width: 640,
height: 480,
framerate: "30",
},
}
},

When starting MM2 I get the following output for the IP cam:

Starting stream stream1 with args: [
"--avdict",
"rtsp_transport:tcp",
"--win",
"608, 107, 1248, 587",
"--live",
"--video_queue",
"4",
"--fps",
"30",
"rtsp://192.168.1.217:554/Streaming/Channels/101/"
]
PM2: omx_stream1 already running. Stopping old instance...
Starting PM2 for omx_stream1
PM2 started for omx_stream1

In MM2 I see the placeholder, but the screen is black. When using the demo URL, everything works fine. Also in VNC Viewer both demo URL as well as my own URL work fine.

Can you please help me in setting this up correctly?

Patrick

Grey Screen - Default or any video not playing

Hello, I have followed the instructions and have done the solutions on the other closed issues. I am still having trouble with the screen box not showing anything at all. This is the MM Error log output:

ffmpeg version 3.1.1 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.9.2 (Raspbian 4.9.2-10)
configuration: --prefix=/usr --enable-gpl --enable-libx264 --enable-nonfree --enable-shared --disable-static
libavutil 55. 28.100 / 55. 28.100
libavcodec 57. 48.101 / 57. 48.101
libavformat 57. 41.100 / 57. 41.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 47.100 / 6. 47.100
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 1.100 / 2. 1.100
libpostproc 54. 0.100 / 54. 0.100
[RTSP demuxer @ 0x114d9e0] [Eval @ 0x7eb0ea4c] Undefined constant or missing '(' in 'undefined'
[RTSP demuxer @ 0x114d9e0] Unable to parse option value "undefined"
[RTSP demuxer @ 0x114d9e0] Error setting option rtsp_transport to value undefined.
rtsp://184.72.239.149/vod/mp4:BigBuckBunny_115k.mov: Invalid argument

Thanks in advance.

MMM-RTSPStream only displays a Loading message

MM starts and I only get a Loading message for RTSPStream. This is what is displaying in the terminal:
Whoops! There was an uncaught exception... TypeError: portor aserver must be provided at new WebSocketServer (/home/pi/MagicMirror/modules/MMM-RTSPStream/node_modules/node-rtsp-stream-es6/node_modules/ws/lib/WebSocketServer.js:44:11) at VideoStream.startListener (/home/pi/MagicMirror/modules/MMM-RTSPStream/node_modules/node-rtsp-stream-es6/src/videoStream.js:32:24) at Class.startListener (/home/pi/MagicMirror/modules/MMM-RTSPStream/node_helper.js:49:32) at Class.socketNotificationReceived (/home/pi/MagicMirror/modules/MMM-RTSPStream/node_helper.js:257:22) at Socket. (/home/pi/MagicMirror/modules/node_modules/node_helper/index.js:113:11) at emitTwo (events.js:106:13) at Socket.emit (events.js:191:7) at /home/pi/MagicMirror/node_modules/socket.io/lib/socket.js:513:12 at _combinedTickCallback (internal/process/next_tick.js:67:7) at process._tickCallback (internal/process/next_tick.js:98:9)

My config was generated by the web interface and is as follows:
{ module: "MMM-RTSPStream", position: "bottom_right", config: { autoStart: true, rotateStreams: true, rotateStreamTimeout: 30, moduleWidth: 354, moduleHeight: 240, localPlayer: 'omxplayer', remotePlayer: 'ffmpeg', showSnapWhenPaused: false, remoteSnaps: false, stream1: { name: 'Front Door', url: 'rtsp://Administrator:[email protected]:88/videoSub', frameRate: 'undefined', width: undefined, height: undefined, }, } },

I can play the stream via VLC without any issue. Not sure where or how to correct the error.

Thanks....

Grey screen

Hello
I have try your module and it's working with Big Bunny stream. but when I change the URL to my local IP cam : rtsp://192.168.0.100:554/onvif1
then I get just a grey square where I should have the video.
the URL is working well with VLC from my Iphone and laptop.
any idea ?
I'm using a SRICAM SP009
thanks

Turn sound off?

Hi,

Is there an option to turn off the micro of the webcam?
I'm using omxplayer

Improvements with Pi 4?

Out of curiosity - is there any known improvements to this with the Pi4, or is everything relying on other parts to optimize (OMX/ffMpeg, etc)

VLC Player issues

Thank you again for updating and yes, I chose to go the VLC route :)

Ok, so I decided to create an issue here just to keep things neat and easier to track for anyone in the future having these issues. I apologize in advance for the messy post, Ive been posting all over today, lol.

So initially I was attempting to configure omxplayer but you said there may have been something broken in the master branch so I could either downgrade? or try the new VLC player configuration.

I had a fresh install of Raspbian (Nov 2018) with the latest MagicMirror2. Followed all the instructions from the forum post.

First of all, I know I initially was getting some permission errors when running 'npm install' in the RTSP directory. Also, I have a 4MP Dahua camera, is there a way to stream the highest resolution in the little box on my MagicMirror instead or would this not work and I have to used Sub stream?

The major issues I have noticed while trying to get this to run right:

  • I cannot get the stream to size correctly in the box. I've played with ALL of the height/width settings and there always seems to be a black space on the right side no matter what I do. I was trying to get it from end to end and larger if I could to have a cleaner look.

img_2406

  • MMM-GoogleMapsTraffic: When this module is added to the config, for some reason RTSP shows no video. I can see it attempting to load and can see the box but nothing ever loads. In order for to play I have to comment out or remove GoogleMapsTraffic from the config.js file. RTSP seems to be the only module that I notice an issue with. All other modules seem to play fine with GMT. Please see picture below. I have also attached logs WITH GoogleMapsTraffic enabled and WITHOUT GoogleMapsTraffic enabled just in case it can help decipher what's going on. When GMT is enabled I do notice RTSP doesn't even attempt to start the VLC player:

img_2409

With GoogleMapsTraffic ENABLED (apologize for the lengthiness)

PM2 | Stopping app:MagicMirror id:0
0|MagicMirror | Shutting down server...
0|MagicMirror | Stopping module helper: updatenotification
PM2 | pid=25411 msg=failed to kill - retrying in 100ms
PM2 | App [MagicMirror:0] exited with code [0] via signal [SIGINT]
PM2 | pid=25411 msg=process killed
PM2 | App [MagicMirror:0] starting in -fork mode-
PM2 | App [MagicMirror:0] online
0|MagicMirror | > [email protected] start /home/pi/MagicMirror
0|MagicMirror | > sh run-start.sh
0|MagicMirror | Starting MagicMirror: v2.6.0
0|MagicMirror | Loading config ...
0|MagicMirror | Loading module helpers ...
0|MagicMirror | No helper found for module: alert.
0|MagicMirror | Initializing new module helper ...
0|MagicMirror | Module helper loaded: updatenotification
0|MagicMirror | No helper found for module: clock.
0|MagicMirror | Initializing new module helper ...
0|MagicMirror | Module helper loaded: calendar
0|MagicMirror | Initializing new module helper ...
0|MagicMirror | Module helper loaded: MMM-GoogleMapsTraffic
0|MagicMirror | Initializing new module helper ...
0|MagicMirror | Module helper loaded: MMM-MyCommute
0|MagicMirror | Initializing new module helper ...
0|MagicMirror | Module helper loaded: MMM-RTSPStream
0|MagicMirror | No helper found for module: currentweather.
0|MagicMirror | No helper found for module: weatherforecast.
0|MagicMirror | Initializing new module helper ...
0|MagicMirror | Module helper loaded: newsfeed
0|MagicMirror | All module helpers loaded.
0|MagicMirror | Starting server on port 8080 ...
0|MagicMirror | Server started ...
0|MagicMirror | Connecting socket for: updatenotification
0|MagicMirror | Connecting socket for: calendar
0|MagicMirror | Starting node helper for: calendar
0|MagicMirror | Connecting socket for: MMM-GoogleMapsTraffic
0|MagicMirror | Starting node_helper for module: MMM-GoogleMapsTraffic
0|MagicMirror | Connecting socket for: MMM-MyCommute
0|MagicMirror | ====================== Starting node_helper for module [MMM-MyCommute]
0|MagicMirror | Connecting socket for: MMM-RTSPStream
0|MagicMirror | PM2: Stopping all OMXPlayer Streams...
0|MagicMirror | Connecting socket for: newsfeed
0|MagicMirror | Starting module: newsfeed
0|MagicMirror | Sockets connected & modules started ...
0|MagicMirror | Launching application.
0|MagicMirror | libGL error: MESA-LOADER: failed to retrieve device information
0|MagicMirror | MESA-LOADER: failed to retrieve device information
0|MagicMirror | MESA-LOADER: failed to retrieve device information
0|MagicMirror | ATTENTION: default value of option force_s3tc_enable overridden by environment.
0|MagicMirror | Create new calendar fetcher for url: http://www.calendarlabs.com/templates/ical/US-Holidays.ics - Interval: 300000
0|MagicMirror | Working notification system. Notification: MMM-GOOGLE_MAPS_TRAFFIC-GET payload: { style: 'black' }
0|MagicMirror | Create new news fetcher for url: http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml - Interval: 300000

With GoogleMapsTraffic DISABLED

M2 | Stopping app:MagicMirror id:0
0|MagicMirror | Shutting down server...
0|MagicMirror | Stopping module helper: updatenotification
PM2 | pid=25411 msg=failed to kill - retrying in 100ms
PM2 | App [MagicMirror:0] exited with code [0] via signal [SIGINT]
PM2 | pid=25411 msg=process killed
PM2 | App [MagicMirror:0] starting in -fork mode-
PM2 | App [MagicMirror:0] online
0|MagicMirror | > [email protected] start /home/pi/MagicMirror
0|MagicMirror | > sh run-start.sh
0|MagicMirror | Starting MagicMirror: v2.6.0
0|MagicMirror | Loading config ...
0|MagicMirror | Loading module helpers ...
0|MagicMirror | No helper found for module: alert.
0|MagicMirror | Initializing new module helper ...
0|MagicMirror | Module helper loaded: updatenotification
0|MagicMirror | No helper found for module: clock.
0|MagicMirror | Initializing new module helper ...
0|MagicMirror | Module helper loaded: calendar
0|MagicMirror | Initializing new module helper ...
0|MagicMirror | Module helper loaded: MMM-GoogleMapsTraffic
0|MagicMirror | Initializing new module helper ...
0|MagicMirror | Module helper loaded: MMM-MyCommute
0|MagicMirror | Initializing new module helper ...
0|MagicMirror | Module helper loaded: MMM-RTSPStream
0|MagicMirror | No helper found for module: currentweather.
0|MagicMirror | No helper found for module: weatherforecast.
0|MagicMirror | Initializing new module helper ...
0|MagicMirror | Module helper loaded: newsfeed
0|MagicMirror | All module helpers loaded.
0|MagicMirror | Starting server on port 8080 ...
0|MagicMirror | Server started ...
0|MagicMirror | Connecting socket for: updatenotification
0|MagicMirror | Connecting socket for: calendar
0|MagicMirror | Starting node helper for: calendar
0|MagicMirror | Connecting socket for: MMM-GoogleMapsTraffic
0|MagicMirror | Starting node_helper for module: MMM-GoogleMapsTraffic
0|MagicMirror | Connecting socket for: MMM-MyCommute
0|MagicMirror | ====================== Starting node_helper for module [MMM-MyCommute]
0|MagicMirror | Connecting socket for: MMM-RTSPStream
0|MagicMirror | PM2: Stopping all OMXPlayer Streams...
0|MagicMirror | Connecting socket for: newsfeed
0|MagicMirror | Starting module: newsfeed
0|MagicMirror | Sockets connected & modules started ...
0|MagicMirror | Launching application.
0|MagicMirror | libGL error: MESA-LOADER: failed to retrieve device information
0|MagicMirror | MESA-LOADER: failed to retrieve device information
0|MagicMirror | MESA-LOADER: failed to retrieve device information
0|MagicMirror | ATTENTION: default value of option force_s3tc_enable overridden by environment.
0|MagicMirror | Create new calendar fetcher for url: http://www.calendarlabs.com/templates/ical/US-Holidays.ics - Interval: 300000
0|MagicMirror | Working notification system. Notification: MMM-GOOGLE_MAPS_TRAFFIC-GET payload: { style: 'black' }
0|MagicMirror | Create new news fetcher for url: http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml - Interval: 300000
PM2 | Change detected on path config/config.js for app MagicMirror - restarting
PM2 | Stopping app:MagicMirror id:0
0|MagicMirror | Shutting down server...
PM2 | pid=25866 msg=failed to kill - retrying in 100ms
PM2 | App [MagicMirror:0] exited with code [0] via signal [SIGINT]
PM2 | pid=25866 msg=process killed
PM2 | App [MagicMirror:0] starting in -fork mode-
PM2 | App [MagicMirror:0] online
0|MagicMirror | > [email protected] start /home/pi/MagicMirror
0|MagicMirror | > sh run-start.sh
0|MagicMirror | Starting MagicMirror: v2.6.0
0|MagicMirror | Loading config ...
0|MagicMirror | Loading module helpers ...
0|MagicMirror | No helper found for module: alert.
0|MagicMirror | Initializing new module helper ...
0|MagicMirror | Module helper loaded: updatenotification
0|MagicMirror | No helper found for module: clock.
0|MagicMirror | Initializing new module helper ...
0|MagicMirror | Module helper loaded: calendar
0|MagicMirror | Initializing new module helper ...
0|MagicMirror | Module helper loaded: MMM-MyCommute
0|MagicMirror | Initializing new module helper ...
0|MagicMirror | Module helper loaded: MMM-RTSPStream
0|MagicMirror | No helper found for module: currentweather.
0|MagicMirror | No helper found for module: weatherforecast.
0|MagicMirror | Initializing new module helper ...
0|MagicMirror | Module helper loaded: newsfeed
0|MagicMirror | All module helpers loaded.
0|MagicMirror | Starting server on port 8080 ...
0|MagicMirror | Server started ...
0|MagicMirror | Connecting socket for: updatenotification
0|MagicMirror | Connecting socket for: calendar
0|MagicMirror | Starting node helper for: calendar
0|MagicMirror | Connecting socket for: MMM-MyCommute
0|MagicMirror | ====================== Starting node_helper for module [MMM-MyCommute]
0|MagicMirror | Connecting socket for: MMM-RTSPStream
0|MagicMirror | PM2: Stopping all OMXPlayer Streams...
0|MagicMirror | Connecting socket for: newsfeed
0|MagicMirror | Starting module: newsfeed
0|MagicMirror | Sockets connected & modules started ...
0|MagicMirror | Launching application.
0|MagicMirror | libGL error: MESA-LOADER: failed to retrieve device information
0|MagicMirror | MESA-LOADER: failed to retrieve device information
0|MagicMirror | MESA-LOADER: failed to retrieve device information
0|MagicMirror | ATTENTION: default value of option force_s3tc_enable overridden by environment.
0|MagicMirror | Create new calendar fetcher for url: http://www.calendarlabs.com/templates/ical/US-Holidays.ics - Interval: 300000
0|MagicMirror | Create new news fetcher for url: http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml - Interval: 300000
0|MagicMirror | Starting stream stream1 using VLC with args --width 352 --height 242 -I dummy --no-video-deco --no-embedded-video --video-title=stream1 rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=1...
0|MagicMirror | DP2: Running window resizers...
0|MagicMirror | DP2: Running window resizers...

Blank Screen

Hello,

Thank you very much for this module! I was hoping something like this existed as I want to add my front door camera to my MagicMirror! I followed all instructions however I cant get video to display.

My camera model is: Dahua IPC-HDW4431C-A-V2 IP Camera.
Usually I have the resolution on the camera set to 2592x1520 but changed it to 1080p just in case that was the issue but still no go.

I have followed everything step by step, using FFMPEG on the rpi i was able to connect and create a thumb.png file.

I've also done the following but no go:

Confirm you're looking at the actual display connected to the Pi, not over VLC.
Check the PM2 log for errors--(use pm2 log mm from ssh to stream the log or look in ~/.pm2/logs/)
change frameRate: 'undefined' to frameRate: undefined.
Try Channel 2 on the camera (lower res) and see if that works. Sometimes OMX chokes on the high-res (change the 1 to a 2 at the end of the url).
Try increasing the GPU memory split in raspi-config
Make sure the Pi is connecting to the camera correctly--set autoStart: false and add snapshotUrl: 'http://XXXX:[email protected]:80//Streaming/Channels/2/picture', below the url.

Below is the config file. I am running the latest Raspbian on Rpi3 w/ the latest version of MM2. Please forgive me if i forgot anything.

modules: [
{
module: "MMM-RTSPStream",
position: "middle_center",
header: "LIVE FEED",
config: {
autoStart: true,
rotateStreams: true,
rotateStreamTimeout: 20,
moduleWidth: 354,
moduleHeight: 240,
localPlayer: 'omxplayer',
remotePlayer: 'none',
showSnapWhenPaused: false,
remoteSnaps: true,
stream1: {
name: 'ENTRANCE',
url: 'rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=1',
// autoStart: false,
// snapshotUrl: 'rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=1',
frameRate: undefined,
hdUrl: 'rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=1',
width: undefined,
height: undefined,
}
}
},

-bash: http-server: command not found

Hi all,
After installation of MMM-RTSPStream module i'm not able to configure it.
Could you please help me someone?! See below.
default

Thanks in advance,

Blackscreen Video not playing

Hi Everyone,
I am able to play the Sricam SP012 P2P HD IP Camera in rasbian vlc player using the url below

rtsp://192.168.1.212:554/onvif2 - Low quality
rtsp://192.168.1.212:554/onvif1 - HD

however i am just getting a white outline box no stream on the MagicMirror, can someone please advise me what am i doing wrong.I have tried everything to my knowledge

I have changed the protocol to UDP (however still no luck)
below is the message from tiny cam android APK to configure camera and find network details hope this helps

Parameters used by tinyCam Monitor app to access camera "http://192.168.1.212:80" Name: Sricam (192.168.1.212) Vendor: Sricam Model: SP012 Hostname: 192.168.1.212 Web port: 80 Protocol: RTSP over UDP RTSP port: 554 HTTPS: no Username: 938310 Password: ----- tinyCam Monitor - complete solution for mobile surveillance for Android https://tinycammonitor.com

#####config.js#####
{
module: "MMM-RTSPStream",
position: "middle_center",
config: {
autoStart: true,
rotateStreams: false,
moduleWidth: 640,
moduleHeight: 320,
localPlayer: 'omxplayer',
remotePlayer: 'none',
showSnapWhenPaused: false,
remoteSnaps: false,
stream1: {
name: 'FRONT',
url: "rtsp://192.168.1.212:554/onvif1",
frameRate: undefined,
width: 640,
height: 320,
}
},
},

#####PM2 Logs#####

Starting stream stream1 with args: [
"--avdict",
"rtsp_transport:tcp",
"--win",
"643, 368, 1283, 688",
"--live",
"--video_queue",
"4",
"--fps",
"30",
"rtsp://192.168.1.212:554/onvif1"
]
Starting PM2 for omx_stream1
PM2 started for omx_stream1
Stopping stream stream1
Stopping PM2 process: omx_stream1
Starting stream stream1 with args: [
"--avdict",
"rtsp_transport:tcp",
"--win",
"643, 368, 1283, 688",
"--live",
"--video_queue",
"4",
"--fps",
"30",
"rtsp://192.168.1.212:554/onvif1"
]
Starting PM2 for omx_stream1
PM2 started for omx_stream1
Stopping stream stream1
Stopping PM2 process: omx_stream1
Starting stream stream1 with args: [
"--avdict",
"rtsp_transport:tcp",
"--win",
"643, 368, 1283, 688",
"--live",
"--video_queue",
"4",
"--fps",
"30",
"rtsp://192.168.1.212:554/onvif1"
]
Starting PM2 for omx_stream1
PM2 started for omx_stream1
Stopping stream stream1
Stopping PM2 process: omx_stream1
Starting stream stream1 with args: [
"--avdict",
"rtsp_transport:tcp",
"--win",
"643, 368, 1283, 688",
"--live",
"--video_queue",
"4",
"--fps",
"30",
"rtsp://192.168.1.212:554/onvif1"
]
Starting PM2 for omx_stream1
PM2 started for omx_stream1

After some minutes the video disappears

(using wip)
Hey,

after some minutes of successfully displaying the video it just disappears.
It will only come back if I restart pm2/electron.

The log does not show anything when it disappears. Any idea?

Greets

Connection Problem

H there,

I am having difficulties connecting to my IP-Cam.

The test-stream does work, the adress functions in VLC on Win10, but not on Raspi and therefore the video-section stays blank.

Here my config:
{
module: "MMM-RTSPStream",
position: "middle_center",
config: {
autoStart: true,
rotateStreams: true,
rotateStreamTimeout: 10,
moduleWidth: 354,
moduleHeight: 240,
localPlayer: 'omxplayer',
remotePlayer: 'none',
showSnapWhenPaused: true,
remoteSnaps: false,
stream1: {
name: 'GartenCAM',
url: 'rtsp://xxx:[email protected]:554/live/ch0',
frameRate: 'undefined',
snapshotType: 'url',
snapshotRefresh: 10,
width: 354,
height: 240,
},
}
},

I tried several different configs and URL's and can't figure out why the above URL works in Win, but not on Raspi VLC.

Thanks in advance for your support and best regards,
Stephan

[Bug] Another "Blank screen" problem :(

Describe the bug
Unable to get the stream to show on the screen. Works perfectly in VLC etc.
Using dev branch and installed thru:
bash -c "$(curl -s https://raw.githubusercontent.com/shbatm/MMM-RTSPStream/develop/scripts/installer.sh)"

Configuration
Please include:

Tried multiple different configs, but here is the one I'm using now:

{
module: "MMM-RTSPStream",
position: "middle_center",
header: "Cam",
config: {
autoStart: true,
rotateStreams: false,
rotateStreamTimeout: 10,
moduleWidth: 354,
moduleHeight: 240,
localPlayer: 'vlc',
remotePlayer: 'ffmpeg',
showSnapWhenPaused: true,
remoteSnaps: true,
shutdownDelay: 12,
stream1: {
name: 'Cam',
url: 'rtsp://USER:[email protected]:10554/udp/av0_0',
frameRate: 'undefined',
hdUrl: 'rtsp://USER:[email protected]:10554/udp/av0_0',
snapshotUrl: 'http://172.16.200.51/snapshot.cgi?user=USER&pwd=PASSWD',
snapshotType: 'url',
snapshotRefresh: 10,
width: undefined,
height: undefined,
ffmpegPort: 9999,
},
}
},

Logs
If applicable, please include the relevant logs to help explain your problem.
+ From the console or ~/.pm2/logs/

MMM-RTSPStream { Error: Parse Error
at Socket.socketOnData (_http_client.js:440:20)
at emitOne (events.js:116:13)
at Socket.emit (events.js:211:7)
at addChunk (_stream_readable.js:263:12)
at readableAddChunk (_stream_readable.js:250:11)
at Socket.Readable.push (_stream_readable.js:208:10)
at TCP.onread (net.js:594:20) bytesParsed: 37, code: 'HPE_INVALID_HEADER_TOKEN' }

Additional context
Video is blank on both local screen and on remote web.
Using Raspberry-Pi 3.
GPU has been set to 128 in raspi-config.

Browser Hangs when restarting stopped stream

I am running MM as a service on a main server in a docker and viewing the page remotely from a RasPi-W from a browser.
I set up FFMPEG on the server and when I just start up the MM on the page it works fine. But if I hide the stream for longer than the timeout (causing the stream to stop) the browser (Both Chrome and FF) will hang and eventually crash when I restart it.

Do you have any insight as to why that would happen? If this isn't an issue related to your module, go ahead and close this. I just can't find any answer elsewhere.

Thanks.

This is all I get from ffmpeg:

`018-09-01T18:21:36.652219429Z ffmpeg version N-46739-gaeb73c73e-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2018 the FFmpeg developers
2018-09-01T18:21:36.652278768Z built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516
2018-09-01T18:21:36.652290797Z configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc-6 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg

2018-09-01T18:21:36.652329801Z libavutil 56. 19.100 / 56. 19.100

2018-09-01T18:21:36.652340630Z libavcodec 58. 27.100 / 58. 27.100

2018-09-01T18:21:36.652350133Z libavformat 58. 17.103 / 58. 17.103

2018-09-01T18:21:36.652359480Z libavdevice 58. 4.101 / 58. 4.101

2018-09-01T18:21:36.652368868Z libavfilter 7. 26.100 / 7. 26.100

2018-09-01T18:21:36.652377947Z libswscale 5. 2.100 / 5. 2.100

2018-09-01T18:21:36.652387128Z libswresample 3. 2.100 / 3. 2.100

2018-09-01T18:21:36.652396324Z libpostproc 55. 2.100 / 55. 2.100

2018-09-01T18:21:38.751986167Z Input #0, rtsp, from 'rtsp://192.168.0.X:554/XXXXXXXXXchannel=1_stream=0.sdp?real_stream':
2018-09-01T18:21:38.752959066Z Metadata:

2018-09-01T18:21:38.752984408Z title : RTSP Session

2018-09-01T18:21:38.752995249Z Duration: N/A, start: 0.400000, bitrate: N/A

2018-09-01T18:21:38.753005344Z Stream #0:0: Video: h264 (Main), yuvj420p(pc, bt709, progressive), 1920x1080, 15 fps, 15 tbr, 90k tbn, 30 tbc

2018-09-01T18:21:38.753675293Z Stream mapping:

2018-09-01T18:21:38.753691767Z Stream #0:0 -> #0:0 (h264 (native) -> mpeg1video (native))

2018-09-01T18:21:38.753704217Z Press [q] to stop, [?] for help

2018-09-01T18:21:38.804833792Z [swscaler @ 0x631b3c0] deprecated pixel format used, make sure you did set range correctly

2018-09-01T18:21:38.820471363Z Output #0, mpegts, to 'pipe:':

2018-09-01T18:21:38.820542022Z Metadata:

2018-09-01T18:21:38.820551155Z title : RTSP Session

2018-09-01T18:21:38.820561521Z encoder : Lavf58.17.103

2018-09-01T18:21:38.820568843Z Stream #0:0: Video: mpeg1video, yuv420p, 1920x1080, q=2-31, 200 kb/s, 24 fps, 90k tbn, 24 tbc

2018-09-01T18:21:38.820577047Z Metadata:

2018-09-01T18:21:38.820584941Z encoder : Lavc58.27.100 mpeg1video

2018-09-01T18:21:38.820604783Z Side data:

2018-09-01T18:21:38.820613131Z cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
`

rtsp protocol slow lag issue

Hi shbatm,

Thank you making this awesome module, now i can add stream to my magic mirror,
my only question is i am using cheap ebay $30 usd camera they supports rtsp,
camera specs
2 mp
1920 x 1080 video quality decent image quality

when i stream rtsp url on vlc or my phone the lag is very minimum or none
however on raspberry pi its way to much (5 to 8 sec) i was wondering it is the module it self or the protocol

Thank you

RTSP Feed not working

Using an amcrest based setup. RTSP URL works fine in VLC. Module configuration generated via the http server using the bunny.mov file works great. Using omxplayer local on a rasp pi 3.

However when I swap out the bunny mov RTSP URL for my camera’s RTSP it doesn’t work. I get a blank screen. Same config with bunny url works fine
I’ve tried both tcp and udp

I’ve tried hardcoding frame rates. Nothing works. Any ideas? Dying to get this to work.

Black Screen

Hello, I am having an issue trying to display my HikVision cameras (DS-2CD2342WD-1). I am able to see the module but it's black screen and nothing loads. The sample url doesn't load either. Pm2 omxstream is online and running. Below is my config. Any help would be greatly appreciated.

{
module: "MMM-RTSPStream",
position: "middle_center",
config: {
autoStart: true,
rotateStreams: true,
rotateStreamTimeout: 10,
moduleWidth: 354,
moduleHeight: 240,
localPlayer: 'omxplayer',
remotePlayer: 'none',
showSnapWhenPaused: true,
remoteSnaps: true,
stream1: {
name: 'Driveway',
url: 'rtsp://XXXX:[email protected]:10554//Streaming/Channels/1',
frameRate: 'undefined',
snapshotType: 'url',
snapshotRefresh: 10,
width: undefined,
height: undefined,
},
}
},

Black Display

I'm trying to get this up and working using the default information in the config which I verified the RTSP stream still works prior to loading. When I load though it comes up blank. I think it has something to do with ffmpeg but I'm a complete noob and have no idea what to do. This is the error I'm seeing in red when I try to launch magic mirror which I think is the issue. I've tried a couple times to install ffmpeg but still getting this same error.

WARNING! Could not load config file. Starting with default configuration. Error found: Error: Cannot find module 'datauri'

Do you have any idea what I can do? Is there a way we can grab like 1 frame a second so I can run like 8 cameras on it around the outside of the mirror?

Thanks for all your help and this awesome project! Its the whole reason I started trying to build a mirror.

The streams doesnt work...

I'm using motion on another rpi with the pi camera, but the stream never starts on the mirror, the place where the stream is supposed to be just appears as a grey box... Here is my motion config file and my config.js configuration : (P.S : I'm using magic mirror without a mirror, I setup all via ssh and my mirror runs on my web browser, so I think I need to use "remotePlayer".
motion.txt

config.txt

RTSPStream and music background

Hello
I'm using MPC and MPD as music client/server to have webradio on my mirror. If I have a live stream on your module playing and then run MPC to play a webradio URL, MPC is playing but there is no sound.
If I stop MPC, then pause the stream from your module and re run MPC then I get sound, I can also play the RTSPStream once the radio is playing.

Do you have any idea why there is no sound ? My wife want to have the radio and I would like to have the RTSPStream ... so today I have radio and no rtspstream as it block the radio ;-)

Thanks for your help

Default RTSP Video Not Displaying

EDIT: Added version number

I haven't been able to get the video to display on the MagicMirror. Everything appears to have installed correctly. No errors during the install process. I tested the feed using the VLC process outlined in the README. Feed played just fine. The MagicMirror log shows a constant "Waiting for connections..".

mm-out-0.log output
Starting MagicMirror: v2.1.1 Loading config ... Loading module helpers ... Initializing new module helper ... Module helper loaded: MMM-RTSPStream All module helpers loaded. Starting server on port 8080 ... Starting server op port 8080 ... Server started ... Connecting socket for: MMM-RTSPStream Sockets connected & modules started ... Launching application. Starting WebSocket server on port 9999. Waiting for connections...

config.js
{ module: 'MMM-RTSPStream', postion: 'middle_center', config: { autoStart: true, rotateStreams: false, rotateStreamTimeout: 10, showSnapWhenPaused: false, moduleWidth: 354, moduleHeight: 240, stream1: { name: 'BBB Test', url: 'rtsp://184.72.239.149/vod/mp4:BigBuckBunny_115k.mov', snapshotUrl: '', snapshotRefresh: 10, // Seconds frameRate: "30", port: 9999, } } },

[Bug] No stream with VLC or OMXPlayer, FFMpeg works - random errors in Log

Describe the bug
unable to get picture/stream from VLC or OMXPlayer on master branch. While debugging other module, I noticed a whole bunch of errors in log.

To Reproduce
Run MagicMirror with RTSP-Stream configured.

Expected behavior
Stream from Camera.

Configuration
{
module: "MMM-RTSPStream",
position: "top_right",
config: {
autoStart: true,
rotateStreams: false,
moduleWidth: 640,
moduleHeight: 360,
localPlayer: 'omxplayer', // Or localPlayer: 'vlc',
remotePlayer: 'ffmpeg',
showSnapWhenPaused: false,
remoteSnaps: false,
omxRestart: 2,
stream1: {
name: 'Front Camera',
url: 'rtsp://user:pass@address/h264Preview_01_main', // Edited for privacy
protocal: "ucp",
width: 640,
height: 360,
ffmpegPort: 10002,
shutdownDelay: 0,
muted: true,
},
}
},

Logs
0|mm | TypeError: Cannot convert undefined or null to object
0|mm | at Function.keys ()
0|mm | at stopProcs (/home/pi/MagicMirror/modules/MMM-RTSPStream/node_helper.js:469:32)
0|mm | at pm2.list (/home/pi/MagicMirror/modules/MMM-RTSPStream/node_helper.js:498:17)
0|mm | at /home/pi/MagicMirror/modules/MMM-RTSPStream/node_modules/pm2/lib/API.js:606:19
0|mm | at /home/pi/MagicMirror/modules/MMM-RTSPStream/node_modules/pm2-axon-rpc/lib/client.js:45:10
0|mm | at Parser. (/home/pi/MagicMirror/modules/MMM-RTSPStream/node_modules/pm2-axon/lib/sockets/req.js:67:8)
0|mm | at Parser.emit (events.js:182:13)
0|mm | at Parser._write (/home/pi/MagicMirror/modules/MMM-RTSPStream/node_modules/amp/lib/stream.js:91:16)
0|mm | at doWrite (_stream_writable.js:410:12)
0|mm | at writeOrBuffer (_stream_writable.js:394:5)
Additional context
Add any other context about the problem here.

If you are not comfortable posting the logs or configuration on a public place, you may also send @shbatm a private chat on the MagicMirror² Forum or send an e-mail to [email protected]. E-mails asking general questions or without an accompanying Issue will not be answered.

Websocket exception

I have configured the URL in Config.js
like this

url: 'resp://192.168.1.22',

So at start i get the following error.
I Hope you could help me.
Greets kaumi

image

never connected

hi,
thanks for your module it works great with my dahua cam but i have 1 problem

  • when i start my MM no problem my camera work great stream is good but when the mirror go to sleep with my pir sensor, after wake up the camera the time is stop and cam is freeze .
    one issue stop MM and restart it ?
    have an idea ?
    sorry for my terrible english.

blank display

for some reason i cant get the stream to display. Mine or the default one. Ive tested both in VLC and they both work. checked and everything is up to date. any help you can give would be greatly appreciated. thanks

[Bug] FFMPeg stuck on loading.

I'm unable to get this module to load and run with FFMPeg anymore - as of 3PM 1/4/19 (Pacific Time (Seattle))

Update was applied as of that time.

I don't know how to retrieve logs.

Configuration:
{
module: "MMM-RTSPStream",
position: "bottom_right",
config: {
autoStart: true,
rotateStreams: false,
rotateStreamTimeout: 10,
moduleWidth: 370,
moduleHeight: 245,
localPlayer: 'ffmpeg',
remotePlayer: 'none',
showSnapWhenPaused: false,
remoteSnaps: false,
stream1: {
name: 'Front Camera',
url: 'rtsp://user:pass@FrontCam/h264Preview_01_sub',
ffmpegPort: 9999,
shutdownDelay: 10000,
hideFfmpegOutput: true,
},
}
},

I do have some custom CSS in play in my mirror to maximize space:

body {
margin: 4px;
height: calc(100vh - 10px);
width: calc(100vw - 5px);
}
.MMM-RTSPStream .innerWrapper {
border: 0;
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.