Announcement

Collapse
No announcement yet.

Need to play MP3 files

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Need to play MP3 files

    I have a need to have a HS event play a rather long (3 minutes) MP3 file. Questions:

    1. I see that HS can play a .wav file. Is that literally all HS can play or would it also play an MP3 file?

    2. If HS can play an MP3 file, would it wait for then entire 3 minutes the file is playing? In other words, would HS be "hung" while the file is playing, or would it be able to process other events?

    3. If HS alone cannot do this, do I need the Windows Media Player plug-in?

    Thanks.

    #2
    Wav file processing is done with mcsAudrey and it does have a Homeseeer resource burden to pay. Winamp is the best choice for quick startup and play. CDJ and WMP have their libraries to process during startup. mcsMusic will let you do this from a virtual device or script, but you can also do the same thing with a little script using winampcom activeX control. I also know SeerAMP has a strong scripting interface.

    Comment


      #3
      You might want to try to create a playlist (Play1.wpl) with that single MP3 song in it and just use the sendkeys to play it.

      hs.launch "C:\MP3\My Playlists\Play1.wpl"

      --------------------------------------------------
      **** Do You "Cocoon"? ****

      Comment


        #4
        Try this, It should load the mp3 file with the program that plays mp3s on your system.
        Attached Files

        Comment


          #5
          That's it! That's all I had to do. I was thinking it was going to be much more involved. The only problem (and I'm not sure it's even a problem) is that when the MP3 finishes playing, Windows Media Player is still open. Unless that's a security problem, or it uses system resources even when it's not really doing anything, I guess it won't hurt for it to be open all the time.

          Thanks!

          Comment


            #6
            To exit media player you could:

            sub main()
            hs.keys "%{F4}", "Windows Media Player", 1
            end sub

            but you would have to figure out a way to trigger this after the song was finished.

            [This message was edited by Brave Sir Robbin on Mon, 22 December 2003 at 11:33 PM.]
            --------------------------------------------------
            **** Do You "Cocoon"? ****

            Comment


              #7
              Originally posted by DC
              That's it! That's all I had to do. I was thinking it was going to be much more involved. The only problem (and I'm not sure it's even a problem) is that when the MP3 finishes playing, Windows Media Player is still open. Unless that's a security problem, or it uses system resources even when it's not really doing anything, I guess it won't hurt for it to be open all the time.

              Thanks!
              .
              I do a similar thing with the "Launch Application" but use K-Lite's (FREE ) lean and fast and tiny player.

              My command line is:

              "C:\Program Files\K-Lite Codec Pack\Media Player Classic\mplayerc.exe" /minimized /play "C:\Sounds\Any Old Sound File.mp3" /close

              It loads MediaPlayerClassic minimized so you don't see it, plays the mp3 file, then closes down the player.

              Comment


                #8
                If its only one file, and that's the only one you need, you could convert it from mp3 to .wav, and use PlayWAVFileEx in an event to play it.

                You could set it to play in background (so HS wouldn't sit and wait for it to finish.)

                That would eliminate having to open winamp and then figure out how to close it when its done.

                Also I'm curious - with your current winamp setup does it open a new instance of winamp each time its played?

                Steve C.

                Comment


                  #9
                  DC, try putting " /close" at the end of the command line.

                  Comment

                  Working...
                  X