MagicMirror² v2.14.0 is available! For more information about this release, check out this topic.

MMM-RTSPStream snapshots

  • I’d like to use MMM-RTSPStream to display a snapshot of my Wyze camera’s RTSP stream every 5 minutes. I can manually generate a .jpg snapshot using the following console command:

    ffmpeg -y -i rtsp://#myUsername#:#myPassword#@ -vframes 1 /home/pi/image.jpg

    However, I can’t get this file created or displayed on my MM2 screen using MMM-RTSPStream. All I see on my MM2 screen is a dark-gray area surrounded by a white frame in the bottom-right corner of the screen. Based on my reading of the module’s instructions, I should be able to do this. Below is the MMM-RTSPStream section of my MM2 config.js file. Maybe someone can spot my error(s) that’s keeping this from working properly??? Thanks for any help provided.

        module: "MMM-RTSPStream",
        position: "bottom_right",
        config: {
            autoStart: true,
            rotateStreams: false,
            rotateStreamTimeout: 10,
            moduleWidth: 354,
            moduleHeight: 250,
            localPlayer: 'ffmpeg',
            remotePlayer: 'ffmpeg',
            showSnapWhenPaused: true,
            remoteSnaps: true,
            shutdownDelay: 12,
            stream1: {
                name: 'DWBPanCam',
                url: 'rtsp://#myUsername#:#myPassword#@',
                frameRate: '15',
                hdUrl: 'rtsp://#myUsername#:#myPassword#@',
    	    snapshotUrl: '/home/pi',
    	    snapshotType: 'file',
    	    snapshotRefresh: 60,
    	    protocol: 'tcp',
                width: undefined,
                height: undefined,
                ffmpegPort: 554,

  • @dwburger please use the code block around config info

    select text and press the </> button to wrap the selected text in a code block…

    please edit and correct

  • @sdetweil Done. Learned something new today.

  • @dwburger thank you… so much more helpful!!

  • I believe I’ve found a solution. I decided to use ffmpeg from the RPi4 command line to save an image from the RTSP stream every 5 minutes. Every 5 minutes the new image overwrites the previous one, thus using the same filename. Then, I’m using mykle1’s MMM-EyeCandy module to display that sole image that’s housed in the /pix folder for that module. So, after several hours, ffmpeg continues to run (although it throws lots of “missed packet” errors), but it doesn’t abort. I’ll put ffmpeg under pm2 control next. Now, using MMM-EyeCandy, I’m getting a new image from my Wyze camera in the lower-right corner of my MM2 every 5 minutes. This is all I needed to stay reasonably up-to-date with what’s happening in front of that camera.

Log in to reply