• 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.

A model that play a video or mp3 file from local drive, based on a Google Assistant command ?

Scheduled Pinned Locked Moved Development
14 Posts 2 Posters 3.5k 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.
  • A Offline
    alexmann
    last edited by Dec 26, 2023, 12:45 PM

    Ah, Now I uderstand , acutally yes, It open the vlc have a look

    
    r:~/MagicMirror$ vlc
    VLC media player 3.0.16 Vetinari (revision 3.0.13-8-g41878ff4f2)
    [0000555bf0104640] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
    [0000555bf01a52d0] main playlist: playlist is empty
    
    
    
    S 1 Reply Last reply Dec 26, 2023, 1:22 PM Reply Quote 0
    • S Offline
      sdetweil @alexmann
      last edited by Dec 26, 2023, 1:22 PM

      @alexmann that didn’t answer the question.

      does the whole command you have in the recipe work

      vlc -f file:///home/MagicMirror/video1.mp4
      

      or the cvlc command as it suggests

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      1 Reply Last reply Reply Quote 0
      • A Offline
        alexmann
        last edited by Dec 26, 2023, 1:47 PM

        @sdetweil said in A model that play a video or mp3 file from local drive, based on a Google Assistant command ?:

        vlc -f file:///home/MagicMirror/video1.mp4

        Thank you, Sam,

        Actually , It worked, the command execute the mp4 file,

        S 1 Reply Last reply Dec 26, 2023, 1:52 PM Reply Quote 0
        • S Offline
          sdetweil @alexmann
          last edited by Dec 26, 2023, 1:52 PM

          @alexmann ok, then you have to work on the front side making sure the voice phrase is recognized

          Jarvis (or whatever hot word you picked)
          “I’m back home”

          words with contractions (“I’m”) are particularly hard to match

          start w something simple, “play video”

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          1 Reply Last reply Reply Quote 0
          • A Offline
            alexmann
            last edited by Dec 26, 2023, 3:30 PM

            Well, Finally worked, :)
            here is my recipe for others to try

            var recipe = {
                transcriptionHooks: {
                    "imBackHome": {
                        pattern: "I am back home",
                        command: "playVideo"
                    }
                },
            
                commands: {
                    "playVideo": {
                        shellExec: {
                        exec: "vlc --play-and-exit -f /path_to_file/modules/recipe/video1.mp4",
                            // This command will play the video using VLC.
                        }
                    }
                }
            };
            
            exports.recipe = recipe;
            
            

            If you want the vlc to just play the video without exiting, just remove " --play-and-exit".

            Happy mirroring,

            S 1 Reply Last reply Dec 26, 2023, 3:33 PM Reply Quote 1
            • S Offline
              sdetweil @alexmann
              last edited by Dec 26, 2023, 3:33 PM

              @alexmann great news… thanks for the feedback.

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              1 Reply Last reply Reply Quote 1
              • 1
              • 2
              • 2 / 2
              2 / 2
              • First post
                13/14
                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