Read the statement by Michael Teeuw here.
[MMM-RTSPStream] - Video Streaming from Live Feeds & Security Cameras
-
Hello Sam,
with 0.0.0.0.8080/MMM-rtspStream I was able to open the module configurator.evroom said:
And see
https://github.com/shbatm/MMM-RTSPStream
“Using the module” on the config.html part I was referring to.
The IP there, is the MM IP, or localhost, not your cam IP.It means the mirror id is not the raspberry pi?
where can I find the mm id? -
When you run MM locally on your Pi, then your MM IP is your Pi IP.
IP being the IP address, not an id.When you are able to open the RTSPStream configurator using 0.0.0.0.8080/MMM-rtspStream, then that’s fine.
Continue with step 2 from this post:
https://forum.magicmirror.builders/topic/2743/mmm-rtspstream-video-streaming-from-live-feeds-security-cameras/379 -
@Number_5 said in [MMM-RTSPStream] - Video Streaming from Live Feeds & Security Cameras:
It means the mirror id is not the raspberry pi?
I don’t see that (mirror id) in the doc for this module
i do see this for testing the camera connection
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 .strm and open the file with a video player like VLC.unfortuantely I can’t use this module on my dev system as there is no omxplayer…
-
One more thing to try. Just leave out the port altogether.
I use it without specifying the port.omxplayer --genlog --avdict rtsp_transport:tcp --win 786,424,1138,666 --live --video_queue 4 --fps 30 --no-osd 'rtsp://admin:roland!?1971@192.168.2.108/cam/realmonitor?channel=2&subtype=0' -
@sdetweil said in [MMM-RTSPStream] - Video Streaming from Live Feeds & Security Cameras:
create a text file
Hallo Sam,
- i have created a textfile wit this line:
rtsp://admin:roland!?1971@192.168.2.108:80/cam/realmonitor?channel=1&subtype=02 )opend in vlc player direct on raspberry
3) query answered user:admin passwort:roland!?1971
4) saw the stream thats working finertsp://User:Passwort@IP:PORT/cam/realmonitor?channel=1&subtype=0here i inserted the user, passwort , Ip and port, channel from the camera.
-
Hello evroom,
thats the result. Error after debug the file.
pi@raspberrypi:~/MagicMirror $ pm2 stop 1
[PM2] Applying action stopProcessId on app [1](ids: 1)
[PM2] omx_stream1 ✓┌─────┬────────────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
│ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user │ watching │
├─────┼────────────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
│ 0 │ MagicMirror │ default │ 2.10.0 │ fork │ 0 │ 0 │ 0 │ stopped │ 0% │ 0b │ pi │ disabled │
│ 1 │ omx_stream1 │ default │ N/A │ fork │ 0 │ 0 │ 30 │ stopped │ 0% │ 0b │ pi │ disabled │
└─────┴────────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘pi@raspberrypi:~/MagicMirror $ omxplayer --genlog --avdict rtsp_transport:tcp --win 786,424,1138,666 --live --video_queue 4 --fps 30 --no-osd 'rtsp://admin:roland!?1971@192.168.2.108/cam/realmonitor?channel=2&subtype=0' have a nice day ;) pi@raspberrypi:~/MagicMirror $ more omxplayer.log 20:10:50 T:18446744072147623537 DEBUG: DllBcm: Using omx system library 20:10:50 T:18446744072147624751 DEBUG: DllOMX: Using omx system library 20:10:50 T:18446744072147625400 DEBUG: DllAvFormat: Using libavformat system library 20:10:50 T:18446744072147626711 DEBUG: DBus connection succeeded 20:10:50 T:18446744072147627442 DEBUG: Keyboard: DBus connection succeeded 20:10:50 T:18446744072147627591 DEBUG: OMXThread::Create - Thread with id -1387290944 started 20:10:50 T:18446744072147627696 DEBUG: DllAvUtilBase: Using libavutil system library 20:10:50 T:18446744072147627719 DEBUG: DllAvCodec: Using libavcodec system library 20:10:50 T:18446744072147627738 DEBUG: DllAvFormat: Using libavformat system library 20:10:50 T:18446744072147628026 DEBUG: COMXPlayer::OpenFile - avformat_open_input rtsp://admin:roland!?1971@192.168.2.108/cam/realmonitor?channel=2&subtype=0 20:10:50 T:18446744072147628457 ERROR: COMXPlayer::OpenFile - avformat_open_input rtsp://admin:roland!?1971@192.168.2.108/cam/realmonitor?channel=2&subtype=0 20:10:50 T:18446744072147647754 DEBUG: OMXThread::Run - Exited thread with id -1387290944 20:10:50 T:18446744072147648005 DEBUG: OMXThread::StopThread - Thread stopped -
Hello evroom
thats my config.jsvar config = { address: "0.0.0.0", // Address to listen on, can be: // - "localhost", "127.0.0.1", "::1" to listen on loopback interface // - another specific IPv4/6 to listen on a specific interface // - "", "0.0.0.0", "::" to listen on any interface // Default, when address config is left out, is "localhost" port: 8080, ipWhitelist: [], // Set [] to allow all IP addresses// { // module: 'MMM-RTSPStream', // position: 'middle_center', // config: { // initialSetup: true, // } // },{ module: "MMM-RTSPStream", position: "middle_center", config: { autoStart: true, rotateStreams: true, rotateStreamTimeout: 10, moduleWidth: 354, moduleHeight: 240, localPlayer: 'ffmpeg', remotePlayer: 'none', showSnapWhenPaused: true, remoteSnaps: true, shutdownDelay: 12, stream1: { name: '', url: 'rtsp://admin:roland!?1971@192.168.2.140.2.108:554/cam/realmonitor?channel=2&subtype=0', frameRate: 'undefined', snapshotType: 'url', snapshotRefresh: 10, width: undefined, height: undefined, ffmpegPort: 9999, }, } },- pm2 flush
pi@raspberrypi:~ $ pm2 flush [PM2] Flushing /home/pi/.pm2/pm2.log [PM2] Flushing: [PM2] /home/pi/.pm2/logs/MagicMirror-out.log [PM2] /home/pi/.pm2/logs/MagicMirror-error.log [PM2] Flushing: [PM2] /dev/null [PM2] /home/pi/.pm2/logs/omx-stream1-error.log [PM2] Logs flushed pi@raspberrypi:~ $in this case i have took the ;
url: ‘rtsp://admin:roland!?1971@192.168.2.140.2.108:554/cam/realmonitor?channel=2&subtype=0’,
User, passwot from camera, id from raspberry, port as suggested, but with port 80 the real port its also not working.
rtsp://Benutzer:Passwort@IP:PORT/cam/realmonitor?channel=1&subtype=0 -
@Number_5 said in [MMM-RTSPStream] - Video Streaming from Live Feeds & Security Cameras:
- query answered
Did vlc player come with this query for user and password?
The reason for supplying it in the URL is to not have to supply user and password.
So, perhaps omxplayer has the same issue, but it will not ask for user and password like vlc player does.
When vlc did not ask for the user and password, then we know the URL is correct, or at least can be parsed correct. -
yes, thats correct, querry follows after confirmation the url. then the stream follows
thanks for your help.
-
@Number_5 said in [MMM-RTSPStream] - Video Streaming from Live Feeds & Security Cameras:
User, passwot from camera, id from raspberry, port as suggested,
I suggested to NOT use a port, so to ditch the :80 or :554.
And when using the omxplayer command, you will need to supply the cam IP.
Does your spelling check change the word IP in id??
I know it can be confusing, but you will need to read things right in order for us (the community) to be able to help you. He says in a friendly tone and manner :-) -
@evroom he did that
pi@raspberrypi:~/MagicMirror $ omxplayer --genlog --avdict rtsp_transport:tcp --win 786,424,1138,666 --live --video_queue 4 --fps 30 --no-osd 'rtsp://admin:roland!?1971@192.168.2.108/cam/realmonitor?channel=2&subtype=0'no port specified, has camera ip that worked with vlc.
-
@Number_5 said in [MMM-RTSPStream] - Video Streaming from Live Feeds & Security Cameras:
yes, thats correct, querry follows after confirmation the url. then the stream follows
Then we might have a parsing issue with your URL.
I think your password may cause a problem.
The ! an ? may cause a problem as they have meaning for your bash shell.
Have to think on that … -
@sdetweil said in [MMM-RTSPStream] - Video Streaming from Live Feeds & Security Cameras:
he did that
Sorry, then I misread.
I read:url: ‘rtsp://admin:roland!?1971@192.168.2.140.2.108:554/cam/realmonitor?channel=2&subtype=0’,So now I am confused :-)
-
@Number_5 said in [MMM-RTSPStream] - Video Streaming from Live Feeds & Security Cameras:
thats my config.js
So it means you were able to get the RTSP config to open?
And when you entered the URL for your cam, did it show you a video stream from your cam?
I forgot if it does do that, or just builds the config part for config.js. -
@sdetweil said in [MMM-RTSPStream] - Video Streaming from Live Feeds & Security Cameras:
no port specified, has camera ip that worked with vlc.
What bothers me, is the fact that vlc did not take the supplied user and password, but queried again for it.
omxplayer will not do that; will just fail to open. -
@evroom i was looking at the standalone omxplayer commandline we asked him to execute, not the
config -
i have done 2 things.
a) create the textfile and opened it in the vlc player on raspberry - then answered the querry (user and id)j, so i could saw the camerastream
b) followed your steps:
step 6
Add the module to the config.js (replace the initial one):
vi ~/MagicMirror/config/config.js
after execute the commando "vi ~/MagicMirror/config/config.js " in commandline , the config.js openend -
Could you please change your admin password of your cam to something without characters like
!and&?
When really needed, use+and/or_.Perhaps omxplayer has a parsing problem.
Even tough we use single quotes to avoid this.
I get the same error when using?.Then try (with the changed password):
omxplayer --genlog --avdict rtsp_transport:tcp --win 786,424,1138,666 --live --video_queue 4 --fps 30 --no-osd 'rtsp://admin:roland_1971@192.168.2.108/cam/realmonitor?channel=2&subtype=0'You can also try the vlc player ‘trick’.
IMHO it should not ask for user & password.Also try to play with the port.
Either nothing, or :80 or :554.Btw, 192.168.2.140.2.108 is not a valid IP address.
It is either 192.168.2.108 or 192.168.2.140.
I guess 192.168.2.140 is your MM / Rasperry Pi IP and 192.168.2.108 is your Dahua cam IP.Good luck.
-
ok, sorry,
a) create the textfile and opened it in the vlc player on raspberry - then answered the querry **(user and password),not id !!!so i could saw the camerastream
-
@Number_5 said in [MMM-RTSPStream] - Video Streaming from Live Feeds & Security Cameras:
after execute the commando "vi ~/MagicMirror/config/config.js " in commandline , the config.js openend
Yes, sorry about that, vi is a text editor.
Close it with:q!or[ESC]:q!(where [ESC] is the escape key)
Then use the editor of your choice, like nano.nano ~/MagicMirror/config/config.js
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login