PHP & sound system

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • w33bster@googlemail.com

    PHP & sound system

    Hello,

    I want to build a php based webserver that can act as a playlist
    editor and play mp3's through the sound system on the server through
    an itrip like device that will allow it to be picked up on fm radios
    around the house.

    I've got the whole thing sorted apart from the minor point of
    accessing the sound system!?!

    I'm guessing I will have to have some third party app that can act as
    a go between the php and the sound system but I can't seem to find
    anything that will do this.

    I thought about writing the lot in .net but I was wanting to keep it
    cross-platform if possible....

    Anyone got any ideas.

    W33B

  • Toby A Inkster

    #2
    Re: PHP & sound system

    w33bster wrote:
    I'm guessing I will have to have some third party app that can act as
    a go between the php and the sound system but I can't seem to find
    anything that will do this.
    Assuming that the audio is stored in files on the server. (e.g. MP3s,
    OGGs, etc) you could use the PHP system() function to launch command-line
    programs to play the files. There are various non-interactive command-line
    audio players available, such as mpg123, ogg123, etc.

    --
    Toby A Inkster BSc (Hons) ARCS
    Fast withdrawal casino UK 2025 – Play now & cash out instantly! Discover the top sites for rapid, secure payouts with no delays.

    Geek of ~ HTML/SQL/Perl/PHP/Python/Apache/Linux

    Comment

    • C.

      #3
      Re: PHP & sound system

      On 1 May, 09:50, w33bs...@google mail.com wrote:
      Hello,
      >
      I want to build a php based webserver that can act as a playlist
      editor and play mp3's through the sound system on the server through
      an itrip like device that will allow it to be picked up on fm radios
      around the house.
      >
      I've got the whole thing sorted apart from the minor point of
      accessing the sound system!?!
      >
      I suspect it may be easier to attach a player to a streaming source
      generated with php than trying to control the player via PHP (but I
      believe mplayer and amarok do provide runtime control APIs). A quick
      googloe suggests lots of prewritten stuff.

      HTH

      C.

      Comment

      • Hadron

        #4
        Re: PHP & sound system

        Toby A Inkster <usenet200703@t obyinkster.co.u kwrites:
        w33bster wrote:
        >
        >I'm guessing I will have to have some third party app that can act as
        >a go between the php and the sound system but I can't seem to find
        >anything that will do this.
        >
        Assuming that the audio is stored in files on the server. (e.g. MP3s,
        OGGs, etc) you could use the PHP system() function to launch command-line
        programs to play the files. There are various non-interactive command-line
        audio players available, such as mpg123, ogg123, etc.
        Which would ruin his desire for cross platform I think?

        Comment

        • Toby A Inkster

          #5
          Re: PHP &amp; sound system

          Toby A Inkster wrote:
          Assuming that the audio is stored in files on the server. (e.g. MP3s,
          OGGs, etc) you could use the PHP system() function to launch command-line
          programs to play the files. There are various non-interactive command-line
          audio players available, such as mpg123, ogg123, etc.
          PS: See also http://tobyinkster.co.uk/article/jukebox/

          It's a Linux/GTK2 media player written in Perl. Only supports OGG files,
          but adding support for other formats wouldn't be too difficult.

          More to the point though, it provides a TCP/IP interface, so your PHP
          script could open a connection to localhost:5853 and send commands like:

          list
          (retrieves list of available songs, each with a number)
          play 55
          (plays number 55 from above list)
          vdown
          (lower volume 10%)

          --
          Toby A Inkster BSc (Hons) ARCS
          Fast withdrawal casino UK 2025 – Play now & cash out instantly! Discover the top sites for rapid, secure payouts with no delays.

          Geek of ~ HTML/SQL/Perl/PHP/Python/Apache/Linux

          Comment

          • rf

            #6
            Re: PHP &amp; sound system

            <w33bster@googl email.comwrote in message
            news:1178009444 .415531.76030@p 77g2000hsh.goog legroups.com...
            Hello,
            >
            I want to build a php based webserver that can act as a playlist
            editor and play mp3's through the sound system on the server
            You want to play sound on the server? There is nobody there in the rack room
            to listen to it.
            I thought about writing the lot in .net but I was wanting to keep it
            cross-platform if possible....
            If it is on the server then cross-platform is irrelevant.

            --
            Richard.


            Comment

            • shimmyshack

              #7
              Re: PHP &amp; sound system

              On May 1, 1:07 pm, Toby A Inkster <usenet200...@t obyinkster.co.u k>
              wrote:
              Toby A Inkster wrote:
              Assuming that the audio is stored in files on the server. (e.g. MP3s,
              OGGs, etc) you could use the PHP system() function to launch command-line
              programs to play the files. There are various non-interactive command-line
              audio players available, such as mpg123, ogg123, etc.
              >
              PS: See alsohttp://tobyinkster.co. uk/article/jukebox/
              >
              It's a Linux/GTK2 media player written in Perl. Only supports OGG files,
              but adding support for other formats wouldn't be too difficult.
              >
              More to the point though, it provides a TCP/IP interface, so your PHP
              script could open a connection to localhost:5853 and send commands like:
              >
              list
              (retrieves list of available songs, each with a number)
              play 55
              (plays number 55 from above list)
              vdown
              (lower volume 10%)
              >
              --
              Toby A Inkster BSc (Hons) ARCShttp://tobyinkster.co. uk/
              Geek of ~ HTML/SQL/Perl/PHP/Python/Apache/Linux
              mplayer is a cross platform and command line.
              vlc has remote control support via a few methods, telnet etc... and is
              virtually what you want already. A streaming player that can sit on
              the server, and broadcast anywhere else, via UDP TCP etc... or just
              play locally for your itrip to pick up.
              a quick exec or system call, or telnet session and your there. whether
              you have written a pure php web server, or are writing code that will
              be running as a module in apache/iss etc..

              Comment

              • Toby A Inkster

                #8
                Re: PHP &amp; sound system

                rf wrote:
                w33bster@google mail.com wrote:
                >
                >I want to build a php based webserver that can act as a playlist
                >editor and play mp3's through the sound system on the server
                >
                You want to play sound on the server? There is nobody there in the rack
                room to listen to it.
                It is more sensible than you think. I have written such a thing -- see the
                link I posted earlier -- though mine uses a telnet interface, not a
                browser based one.

                The server isn't kept in a rack room -- it's kept in your living room,
                with big speakers attached. You can queue songs up on the playlist from
                any device with a TCP/IP connection and a telnet client. This can include
                mobile phones, wireless laptops, etc.

                w33bster goes one step further by then having his server broadcast its
                sound on a very short-range FM signal, so that he can tune radios in other
                rooms in his house into the same music. Sounds like a cool idea to me!

                --
                Toby A Inkster BSc (Hons) ARCS
                Fast withdrawal casino UK 2025 – Play now & cash out instantly! Discover the top sites for rapid, secure payouts with no delays.

                Geek of ~ HTML/SQL/Perl/PHP/Python/Apache/Linux

                Comment

                Working...