• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
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.

Playing a local mp4 file as a module

Scheduled Pinned Locked Moved Troubleshooting
20 Posts 6 Posters 8.3k Views 6 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
    Sputnik
    last edited by Dec 26, 2017, 9:36 AM

    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 ?)?

    J 3 Replies Last reply Dec 4, 2018, 4:10 AM Reply Quote 0
    • R Offline
      remylpat
      last edited by Dec 1, 2018, 4:34 PM

      @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 Dec 1, 2018, 5:43 PM Reply Quote 0
      • R Offline
        Ramez @remylpat
        last edited by Dec 1, 2018, 5:43 PM

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

        R 1 Reply Last reply Dec 1, 2018, 5:46 PM Reply Quote 0
        • R Offline
          remylpat @Ramez
          last edited by Dec 1, 2018, 5:46 PM

          @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 Dec 3, 2018, 2:41 AM Reply Quote 0
          • R Offline
            Ramez @remylpat
            last edited by Dec 3, 2018, 2:41 AM

            @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 :D 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 Dec 3, 2018, 8:00 AM Reply Quote 0
            • R Offline
              remylpat @Ramez
              last edited by Dec 3, 2018, 8:00 AM

              @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 :-)

              L R 2 Replies Last reply Dec 3, 2018, 8:07 AM Reply Quote 0
              • L Offline
                lavolp3 Module Developer @remylpat
                last edited by Dec 3, 2018, 8:07 AM

                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 Offline
                  Ramez @remylpat
                  last edited by Dec 4, 2018, 2:52 AM

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

                  1 Reply Last reply Reply Quote 0
                  • J Offline
                    justjim1220 Module Developer @Sputnik
                    last edited by Dec 4, 2018, 4:10 AM

                    @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 Offline
                      remylpat
                      last edited by Dec 4, 2018, 9:40 AM

                      @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

                      J 2 Replies Last reply Dec 4, 2018, 9:51 PM 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 Sam, technical setup by Karsten.
                      This forum is using NodeBB as its core | Contributors
                      Contact | Privacy Policy