MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord

    Playing a local mp4 file as a module

    Troubleshooting
    6
    20
    4642
    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
      Sputnik last edited by

      I have been trying to play a locally stored mp4 file within a module.
      I used the existing config.js file and placed the mp4 in the same folder on my Raspberry Pi3. Is it possible to include just a player command within an existing module e.g. Alerts or Compliments ot see the video ?
      Or do I need to create an entirely new module for this purpose, if Yes how would that look like (do I use omxplayer ?)?

      justjim1220 3 Replies Last reply Reply Quote 0
      • R
        remylpat last edited by

        @sputnik said in Playing a local mp4 file as a module:

        a module.
        I used the existing config.js file and placed the mp4 in the same folder on my Raspberry Pi3. Is it possible to include just a player command within an existing module e.g. Alerts or Compliments ot see the video ?
        Or do I need to create an entirely new module for this purpose, if Ye

        Did you find a solution ?

        R 1 Reply Last reply Reply Quote 0
        • R
          Ramez @remylpat last edited by

          @remylpat a lot of solutions out there, it depends on how noob you’re 🙂

          R 1 Reply Last reply Reply Quote 0
          • R
            remylpat @Ramez last edited by

            @ramez I am noob on magic mirror
            I am trying to set up something simple for my wife to use (WAF) but I can go deeper on the config
            Any pointer really apreciated

            R 1 Reply Last reply Reply Quote 0
            • R
              Ramez @remylpat last edited by

              @remylpat great so first thing need to know is that your module will consist of 2 files the YOUR_MODULE_NAME.js and node_helper.js and maybe third file called YOUR_MODULE_NAME.css, The short brief description of thoses files is:

              1- your_module_name.js file builds you module and communicate with other modules “like alerts and voice commands module…etc”
              2- node_helper.js file communicate with OS itself "where you would ask it to play MP4 files or songs or send and Email or even shutdown the whole system!
              3- your_module_name.css builds the shape of your module and how it look like on the mirror “I think you don’t really need it as your module idea is to take an alert or command from other modules then run omxplayer or vlc”

              Excuse me I don’t know what is WAF? also do you run your mirror with voice commands? I mean how you really wanna to play the MP4 file by telling the mirror or setting it to play at exact time in the day? or even play it when the weather becomes raining! and the most important question…do you’ve time to read 🙂 here is The full desc. on how to make a module if you’re lazy like me 😃 so here is a great module MMM-voiceradio that you can simply edit it to best suite your needs, so it’s main MMM-Myvoiceradio.js just take a command (which is called a notification in our mirror) from voice module and pass it to the node_helper.js to run some system files, what you need to edit here is the notification that make your module intialized and the exec command to play your file.

              Do some progress I’m waiting for your next question (^_^)

              R 1 Reply Last reply Reply Quote 0
              • R
                remylpat @Ramez last edited by

                @ramez Thx a lot.
                I’ll play with that later today and let you know.
                Just to let you know I am building the smart mirror in order to have it as an Advertisement mirror and I would like to trigger by myself some video through a remote or button on it.
                I’ll try your recommandations and let you know where I land 🙂

                WAF : Woman Acceptance Factor (the most important thing that drive your life 🙂

                lavolp3 R 2 Replies Last reply Reply Quote 0
                • lavolp3
                  lavolp3 Module Developer @remylpat last edited by

                  WAF : Woman Acceptance Factor (the most important thing that drive your life 🙂

                  Ha! Great!

                  Isn’t there already at least one video player module out?
                  Can’t you use that one for your purpose.
                  Have a look into the 3rd party modules section at the MM github site.

                  How to troubleshoot modules
                  MMM-soccer v2, MMM-AVStock

                  1 Reply Last reply Reply Quote 0
                  • R
                    Ramez @remylpat last edited by

                    @remylpat nice, you may have to check those 2 modules MMM-Buttons and capacitve touch buttons fork

                    1 Reply Last reply Reply Quote 0
                    • justjim1220
                      justjim1220 Module Developer @Sputnik last edited by

                      @sputnik

                      Are you wanting something to play a single mp4 file or several (like in a playlist) or to be given a choice to play from of a list of files stored in a local directory?

                      "Life's Too Short To Dance With Ugly People"
                      Jim Hallock - 1995

                      1 Reply Last reply Reply Quote 0
                      • R
                        remylpat last edited by

                        @justjim1220 said in Playing a local mp4 file as a module:

                        g something to play a single mp4 file or several (like in a playlist) or to be given a choice to play from of a list of files stored in a local directory?

                        My target is having like 5 files and 1 button per file to launch each of them.
                        I want mirror to diplay a video when I click on a remote then back to normal state (no video / minimal display) then click again (on another button for example) and the other video launch.
                        The mirror is to be used on a shop like a haircut

                        justjim1220 2 Replies Last reply Reply Quote 0
                        • 1
                        • 2
                        • 1 / 2
                        • First post
                          Last post
                        Enjoying MagicMirror? Please consider a donation!
                        MagicMirror created by Michael Teeuw.
                        Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
                        This forum is using NodeBB as its core | Contributors
                        Contact | Privacy Policy