MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    MMM-Mplayer video issues

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    12 Posts 4 Posters 498 Views 4 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S Offline
      sdetweil @ge
      last edited by sdetweil

      @ge pi memory is soldered on1/2/4/8. Not user adjustable

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      G 1 Reply Last reply Reply Quote 0
      • G Offline
        ge @sdetweil
        last edited by

        @sdetweil
        Just an update on this.
        I did find my pi 4 with 8gb of memory, after I ordered the pi5 with 8gb. Must have take the old pi 4 w 4Gb memory, out of my mirror, and stuck the old one back in again.
        I now have setup a fresh install of MM on the new pi5 and it is amazingly fast compared to the old 4. Installed MMM-Mplayer, and it works great for a few hours. After about six hours, the camera on MM is about 15 seconds behind. When that happens the video becomes choppy, and at times it stops for a few seconds, some video is lost. It never gets caught back up again until it is restarted. Letting it run longer, the issue continues to get worse. To figure this out, I have the video being timestamped from the camera.
        So when MM is started up, the clock on the video agrees ( about a second behind) with the clock on MM, which agrees with another computer displaying the stream. After time has passed, everything is still showing the correct/synced time, except for video in MMM-Mplayer.

        Processor temp 35-40c

        evroomE 1 Reply Last reply Reply Quote 0
        • evroomE Offline
          evroom @ge
          last edited by

          @ge

          A pity it does not work for you.
          Strange that is only happens after a several hours
          But mplayer is rather old, perhaps that is the primary issue.

          Still, I tried it on my Pi 3b with 1Gb RAM and it runs well.
          It is 3 to 5 seconds lagging.
          Like the stream on my P4b with 8Gb.
          It also does not seem very memory hungry.

          Pi 3b is steaming now for over 2 hours, so I will need to look later again to see if it got messed up.
          The Pi 4b is streaming for 2 weeks straight now, without issues.

          To me it looks more like a camera issue, but if you say that other players have no issues …
          Somehow mplayer does not like your rtsp stream, or it is a combination of factors.

          I have found that there is a config file, where you can set options.
          Try out some options (need to restart MagicMirror after every change).
          For example try nocache first.
          Then try cache=65536.
          The option nosound is always good (can be set in the MMM-Mplayer options too, if not already done so).
          The bandwidth option is just a shot in the dark.

          $ vi ~/.mplayer/config
          # Write your default config options here!
          
          # No cache
          nocache=yes
          
          # Cache size in kBytes (4MB / 8MB / 16MB / 64MB)
          # cache=4096
          # cache=8192
          # cache=16384
          # cache=65536
          
          # Do not play/encode sound
          nosound=yes
          
          # Bandwidth (10MB / 100MB / 1000MB)
          # bandwidth=80000000
          bandwidth=100000000
          # bandwidth=1000000000
          

          What also can be the case, is that the windowSize is not matching your stream resolution.
          This can cause issues as it needs to recode this portion.
          Try:

          windowSize: { width: 960, height: 540 },
          

          for a 1920x1080 (16:9) stream.

          That is all I can think of.
          Good luck.

          MagicMirror version: 2.33.0
          Raspberry Pi 4 Model B Rev 1.5 (8 GB RAM)
          Raspbian GNU/Linux 12 (bookworm)

          Test environment:
          MagicMirror version: v2.33.0
          Raspberry Pi 3 Model B Plus Rev 1.3 (1 GB RAM)
          Raspbian GNU/Linux 12 (bookworm)

          G 1 Reply Last reply Reply Quote 0
          • G Offline
            ge @evroom
            last edited by

            @evroom
            Perfect timing. Just sat down think of options to try next. And the first one I was going to try was setting the cache and see what happens. So that is where I will start, and go from there. I’m also going to dig more into the options for Mplayer I can see the command to start mplayer is

            mplayer rtsp://admin/camadmin@172.16.0.37:554/cam/realmonitor?channel=1&subtype=0 -vf rotate=-1 monitoraspect 0 -noborder -geometry 471:20 -x 990 -y 557 -rtsp-stream-over-tcp -prefer-ipv4 -vo xv,gl,gl_nosw,vdpau, -nosound
            

            Does not appear to be a memory issue. Starts at 74m, 24 hours later 80m. CPU averages from 12-25%, with a short jump to 40% for 1-2 seconds every 10 seconds on the Pi5. Much lower usage from the 4…so I expect there may be more going on with the 4. This 5 I setup from scratch, so no carryover from the 4.
            And maybe it is the camera. It got along with the omxplayer, but maybe there is something Omxplayer that it didn’t care about, and now Mplayer does.

            Thanks for the thoughts. I’ll continue to update this thread as I come across anything.

            G 1 Reply Last reply Reply Quote 0
            • G Offline
              ge @ge
              last edited by

              I’ve tried way to many settings with no change. I have even found an old china made camera no difference. Made this the only running module, let the resolution on the screen match the camera and still after a few hours it’s fallen behind and back to stuttering … no change seems to make any difference.

              So I’m going back to RSTP-Stream and see if I can get that to work. The video works using vlc , except I can’t get it top_center. It just likes running in the middle-center of the MagicMirror on the Pi5. The Pi4, it would only run on the top_left.

              1 Reply Last reply Reply Quote 0
              • 1
              • 2
              • 2 / 2
              • First post
                Last post
              Enjoying MagicMirror? Please consider a donation!
              MagicMirror created by Michael Teeuw.
              Forum managed by Sam, technical setup by Karsten.
              This forum is using NodeBB as its core | Contributors
              Contact | Privacy Policy