Read the statement by Michael Teeuw here.
[MMM-RTSPStream] - Video Streaming from Live Feeds & Security Cameras
-
@evroom said in [MMM-RTSPStream] - Video Streaming from Live Feeds & Security Cameras:
Will revert back to the master branch and try again.
Yes, the omx_stream1 is created the first time you play a stream with the module.
Please use the develop branch with omxplayer. It was working on my machine the last time I started.
-
@shbatm things are doing waaaay better now! :grinning_face_with_smiling_eyes:
With omxplayer stream switching is almost OK if it wasn’t that it doesn’t select the wanted stream.
Ie. I want stream3 therefore I give the voice command, but then it starts playing the wrong stream (and always random).
Voice recognition is 100% correct as I always have a textual confirmation of command on screen.With vlc it’s a mess as multiple streams ALWAYS start at the same time after a voice command.
At this point I don’t care who will be the chosen player as long as we get everything working so omxplayer would be fair enough if running properly. :smiling_face_with_open_mouth_smiling_eyes: :smiling_face_with_open_mouth_cold_sweat:
-
@shbatm said in [MMM-RTSPStream] - Video Streaming from Live Feeds & Security Cameras:
Yes, the omx_stream1 is created the first time you play a stream with the module.
Please use the develop branch with omxplayer. It was working on my machine the last time I started.
Back on develop branch again.
No change.
Now the “pm2 remove omx_stream1” looks to be a major mistake, as I cannot get the stream running again.
I do not see the module trying to start a new stream anymore.What would be the command line for starting the stream and having it appear under “pm2 list” ?
In other words, what does the module do in order to achieve this ? -
@evroom said in [MMM-RTSPStream] - Video Streaming from Live Feeds & Security Cameras:
Back on develop branch again.
Please send me your config in a chat.
-
@cr4z33 said in [MMM-RTSPStream] - Video Streaming from Live Feeds & Security Cameras:
With omxplayer stream switching is almost OK if it wasn’t that it doesn’t select the wanted stream.
I can’t replicate this issue. Directly sending notifications: of the form
notification: "RTSP-PLAY", payload: "streamX"
works as expected and switches to the correct stream when usingautoStart: false, rotateStreams: true, rotateStreamTimeout: 0
.How many streams do you have again? Is it less than 10?
@cr4z33 said in [MMM-RTSPStream] - Video Streaming from Live Feeds & Security Cameras:
With vlc it’s a mess as multiple streams ALWAYS start at the same time after a voice command.
I think this is related to the fact that VLC doesn’t close the streams automatically when switching, it puts the window in the background until it times out, then it closes. Try adding a
shutdownDelay: 0
to your module config to make the VLC stream close immediately on hiding. Same thing with omxplayer though, switching appears to work as expected on my end.Please also make sure you have the latest version of PM2:
sudo npm install -g pm2
-
did develop update now, both streams are on stop and error messages :(
PM2 | App [omx_stream2:1] online 0|mm | Initializing new module helper ... 0|mm | Module helper loaded: newsfeed 2|omx_stream1 | * failed to add service - already in use? 2|omx_stream1 | Video codec omx-mjpeg width 352 height 288 profile -99 fps 30.000000 2|omx_stream1 | Subtitle count: 0, state: off, index: 1, delay: 0 2|omx_stream1 | /usr/bin/omxplayer: Zeile 67: 1221 Abgebrochen (Speicherabzug geschrieben) LD_LIBRARY_PATH="$OMXPLAYER_LIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" $OMXPLAYER_BIN "$@" PM2 | App [omx_stream1:2] exited with code [134] via signal [SIGINT] PM2 | App [omx_stream1:2] starting in -fork mode- PM2 | App [omx_stream1:2] online 1|omx_stream2 | * failed to add service - already in use? 1|omx_stream2 | Video codec omx-mjpeg width 352 height 288 profile -99 fps 30.000000 1|omx_stream2 | Subtitle count: 0, state: off, index: 1, delay: 0 1|omx_stream2 | /usr/bin/omxplayer: Zeile 67: 1244 Abgebrochen (Speicherabzug geschrieben) LD_LIBRARY_PATH="$OMXPLAYER_LIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" $OMXPLAYER_BIN "$@" PM2 | App [omx_stream2:1] exited with code [134] via signal [SIGINT] PM2 | App [omx_stream2:1] starting in -fork mode- PM2 | App [omx_stream2:1] online 2|omx_stream1 | * failed to add service - already in use? 2|omx_stream1 | Video codec omx-mjpeg width 352 height 288 profile -99 fps 30.000000 2|omx_stream1 | Subtitle count: 0, state: off, index: 1, delay: 0 2|omx_stream1 | /usr/bin/omxplayer: Zeile 67: 1287 Abgebrochen (Speicherabzug geschrieben) LD_LIBRARY_PATH="$OMXPLAYER_LIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" $OMXPLAYER_BIN "$@" PM2 | App [omx_stream1:2] exited with code [134] via signal [SIGINT] PM2 | App [omx_stream1:2] starting in -fork mode- PM2 | App [omx_stream1:2] online 0|mm | Initializing new module helper ... 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: MMM-Fuel 0|mm | Starting module helper: MMM-Fuel 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 ... 1|omx_stream2 | * failed to add service - already in use? 1|omx_stream2 | Video codec omx-mjpeg width 352 height 288 profile -99 fps 30.000000 1|omx_stream2 | Subtitle count: 0, state: off, index: 1, delay: 0 1|omx_stream2 | /usr/bin/omxplayer: Zeile 67: 1320 Abgebrochen (Speicherabzug geschrieben) LD_LIBRARY_PATH="$OMXPLAYER_LIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" $OMXPLAYER_BIN "$@" PM2 | App [omx_stream2:1] exited with code [134] via signal [SIGINT] PM2 | App [omx_stream2:1] starting in -fork mode- PM2 | App [omx_stream2:1] online 2|omx_stream1 | * failed to add service - already in use? 2|omx_stream1 | Video codec omx-mjpeg width 352 height 288 profile -99 fps 30.000000 2|omx_stream1 | Subtitle count: 0, state: off, index: 1, delay: 0 2|omx_stream1 | /usr/bin/omxplayer: Zeile 67: 1349 Abgebrochen (Speicherabzug geschrieben) LD_LIBRARY_PATH="$OMXPLAYER_LIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" $OMXPLAYER_BIN "$@" PM2 | App [omx_stream1:2] exited with code [134] via signal [SIGINT] PM2 | App [omx_stream1:2] starting in -fork mode- PM2 | App [omx_stream1:2] online 1|omx_stream2 | * failed to add service - already in use? 1|omx_stream2 | Video codec omx-mjpeg width 352 height 288 profile -99 fps 30.000000 1|omx_stream2 | Subtitle count: 0, state: off, index: 1, delay: 0 1|omx_stream2 | /usr/bin/omxplayer: Zeile 67: 1399 Abgebrochen (Speicherabzug geschrieben) LD_LIBRARY_PATH="$OMXPLAYER_LIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" $OMXPLAYER_BIN "$@" PM2 | App [omx_stream2:1] exited with code [134] via signal [SIGINT] PM2 | App [omx_stream2:1] starting in -fork mode- PM2 | App [omx_stream2:1] online 2|omx_stream1 | * failed to add service - already in use? 2|omx_stream1 | Video codec omx-mjpeg width 352 height 288 profile -99 fps 30.000000 2|omx_stream1 | Subtitle count: 0, state: off, index: 1, delay: 0 2|omx_stream1 | /usr/bin/omxplayer: Zeile 67: 1422 Abgebrochen (Speicherabzug geschrieben) LD_LIBRARY_PATH="$OMXPLAYER_LIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" $OMXPLAYER_BIN "$@" PM2 | App [omx_stream1:2] exited with code [134] via signal [SIGINT] PM2 | App [omx_stream1:2] starting in -fork mode- PM2 | App [omx_stream1:2] online 0|mm | Launching application. 0|mm | libGL error: MESA-LOADER: failed to retrieve device information ^C pi@raspberrypi:~ $ pm2 status ┌─────────────┬────┬──────┬────────┬─────────┬─────┬────────┬──────────┐ │ Name │ id │ mode │ status │ ↺ │ cpu │ memory │ ├─────────────┼────┼──────┼────────┼─────────┼─────┼────────┼──────────┤ │ mm │ 0 │ N/A │ fork │ online │ 0 │ 0% │ 2.5 MB │ │ omx_stream1 │ 2 │ N/A │ fork │ stopped │ 9 │ 0% │ 0 B │ │ omx_stream2 │ 1 │ N/A │ fork │ stopped │ 9 │ 0% │ 0 B │ └─────────────┴────┴──────┴────────┴─────────┴─────┴────────┴──────────┘ Use `pm2 show <id|name>` to get more details about an app pi@raspberrypi:~ $
can you undo that somehow?
-
@djuscha said in [MMM-RTSPStream] - Video Streaming from Live Feeds & Security Cameras:
both streams are on stop and error messages
This looks like the same error I got when I tried to use omxplayer with the OpenGL driver enabled inraspi-config
. You’ll have to use the legacy driver if you want to use omxplayer on the most recent version of Raspbian.EDIT 10-Jan-19: Use the latest
develop
branch version. omxplayer requires the--no-osd
flag to work properly with the OpenGL (Fake KMS) driver. -
@shbatm I can confirm that I followed the whole instructions properly and I am using
notification: "RTSP-PLAY", payload: "streamX"
indeed for my 7 different streams (so yes less than 10).All I can say is that it is NOT working as intended. :winking_face:
Anyway I always forgot to post the (latest version) PM2 log so here it is if you can find anything helpful?
I wish I could do more, but again I am not skilled enough sorry… :smiling_face_with_open_mouth_cold_sweat: -
@cr4z33 @evroom the last things I can suggest to try:
- @Cr4z33 Make sure you have
autoStart: false
in your config. @evroom yours should betrue
. - Update the module one more time:
cd ~/MagicMirror/modules/MMM-RTSPStream git fetch --al && git pull rm -R node_modules/ npm install
- Nuke and update your pm2:
pm2 kill rm ~/.pm2/dump.pm2 sudo npm i -g pm2
- Restart the MM script (you’ll have to redo
pm2 save
BEFORE you run any streams if you want the MM to start on boot).
- @Cr4z33 Make sure you have
-
@shbatm I feel sorry, but nothing has improved. :disappointed_face: