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_RTSPStream & ffmpeg

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    2 Posts 2 Posters 59 Views 2 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.
    • G Offline
      ge
      last edited by

      A bit of history first. I had a Pi3B 32 bit that ran MM and MMM_RTSPStream using omxplayer that worked well. However, it was a bit outdated and upgraded to a Pi4 8Gb, and changed to 64bit. Found out omxplayer was supported under 64bit. Tried to get it to work but was very unstable with ffmpeg & vlc. Go I gave up. Now I have some time to get back to it again.
      Installed latest ffmpeg, vlc, MM, & MMM-RTSPStream. Vlc multiple issues, ffmpeg I got to somewhat work, and seems reliable - not crashing or locking up. However the video is very choppy, and lags 12-15 seconds. So at this point, digging around a bit, I found some issues that may help point to where the problem is.
      First item here is the string being passed to ffmpeg:

      ffmpeg -rtsp_transport tcp -i rtsp://admin:Campassword@172.16.0.37:554/cam/realmonitor?channel=1&subtype=0&unicast=true -pix_fmt yuv420p -f mpegts -codec:v mpeg1video -codec:a mp2 -r 30 -rtsp_transport tcp -

      I have not researched this yes, just looking for someone that may be able to say that looks good, or something is wrong.

      The second item, which should probably be the first.
      As soon as ffmpeg loads, all four cores on the processor sit in the +90% usage constantly. Now this is the same camera that ran on the old Pi without issue. I have changed resolution down to 648x480, bit rates to 512 variable and constant, frame intervals will only go down to 30, and still when started the processor maxes out.

      So maybe I’m going down a rabbit hole looking at he issue being ffmpeg. If anyone has any thoughts, they are appreciated.

      MM-1.jpg

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

        @ge see https://github.com/evroom/MMM-MPlayer

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 1
        • 1 / 1
        • 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