For Programmers: Free Programming Magazines  


Home > Archive > PHP Programming > July 2007 > Php based app and mp3's









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Php based app and mp3's
Chuck Anderson

2007-07-23, 9:59 pm

This is off topic, as I'm sure what I'm looking for is not Php based,
but I thought someone here may know how I can work with mp3's from the
Windows command line (using Php exec, system, ...). I want to write a
web based app (for use on my own PC) to play mp3s ... a custom juke box
sort of thing with features that I can add as I see fit.

Basically, all I want to do is play them through my sound card, and be
able to display (perhaps edit) comment and label fields in the mp3 "header."

I see that Winamp has an API that will probably play audio files, but I
wondered if there was something more generic.

I have Googled for this information using phrases in many different
permutations, but I am not getting any useful results.

Any pointers would be very much appreciated.

--
*****************************
Chuck Anderson • Boulder, CO
http://www.CycleTourist.com
*****************************
Jerry Stuckle

2007-07-23, 9:59 pm

Chuck Anderson wrote:
> This is off topic, as I'm sure what I'm looking for is not Php based,
> but I thought someone here may know how I can work with mp3's from the
> Windows command line (using Php exec, system, ...). I want to write a
> web based app (for use on my own PC) to play mp3s ... a custom juke box
> sort of thing with features that I can add as I see fit.
>
> Basically, all I want to do is play them through my sound card, and be
> able to display (perhaps edit) comment and label fields in the mp3
> "header."
>
> I see that Winamp has an API that will probably play audio files, but I
> wondered if there was something more generic.
>
> I have Googled for this information using phrases in many different
> permutations, but I am not getting any useful results.
>
> Any pointers would be very much appreciated.
>


You'll get a much better answer from a newsgroup dedicated to windows
and/or mp3s.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Rik

2007-07-23, 9:59 pm

On Tue, 24 Jul 2007 03:31:49 +0200, Chuck Anderson
<websiteaddress@seemy.sig> wrote:
> Basically, all I want to do is play them through my sound card, and be
> able to display (perhaps edit) comment and label fields in the mp3
> "header."
>
> I see that Winamp has an API that will probably play audio files, but I
> wondered if there was something more generic.


Hmmz, snd123 (<http://nanocrew.net/software/snd123/>, .NET required) or
mplayer an option?
--
Rik Wasmus
Chuck Anderson

2007-07-24, 3:59 am

Jerry Stuckle wrote:
> Chuck Anderson wrote:
>
>
> You'll get a much better answer from a newsgroup dedicated to windows
> and/or mp3s.
>
>


You're right. I took my inquiry to comp.os.ms.programmers.win32.

I still want to ask her, though, about Php scripts to read the "header
and label" information in mp3 files. Does anyone know of any scripts or
classes that can do that?

--
*****************************
Chuck Anderson • Boulder, CO
http://www.CycleTourist.com
*****************************
Chuck Anderson

2007-07-24, 3:59 am

Rik wrote:
> On Tue, 24 Jul 2007 03:31:49 +0200, Chuck Anderson
> <websiteaddress@seemy.sig> wrote:
>
>
> Hmmz, snd123 (<http://nanocrew.net/software/snd123/>, .NET required) or
> mplayer an option?
>


The first thing I noticed about mplayer (if it's the same one) was that
it is 7MBs and plays video files, as well. It seems to me that there
ought to be a more basic little program that simply plays audio files.
I'll check it out some more, though.

I have also asked about this in a win32 programmers group, so we shall see.

I'm still interested in knowing if there is a Php script or class that
can read all the mp3 label and header data.

--
*****************************
Chuck Anderson • Boulder, CO
http://www.CycleTourist.com
*****************************
Michael Fesser

2007-07-24, 3:59 am

..oO(Chuck Anderson)

>I still want to ask her, though, about Php scripts to read the "header
>and label" information in mp3 files. Does anyone know of any scripts or
>classes that can do that?


Try a Google search for "php mp3 id3" or something like that. There are
some classes available.

Micha
Sanders Kaufman

2007-07-24, 3:59 am

Chuck Anderson wrote:

> I still want to ask her, though, about Php scripts to read the "header
> and label" information in mp3 files. Does anyone know of any scripts or
> classes that can do that?


You can binary read any old file with PHP.
If you know the MP3 structure, you can parse out the tags.

Here's how one fellow did it:
http://www.phpclasses.org/trackback...ackage/112.html
Adam Harvey

2007-07-24, 3:59 am

On Mon, 23 Jul 2007 21:49:52 -0600, Chuck Anderson wrote:
> I'm still interested in knowing if there is a Php script or class that
> can read all the mp3 label and header data.


PEAR has a couple of packages that might help: MP3_Id and MP3_IDv2.

Adam

--
To e-mail: don't make an example out of me!
Toby A Inkster

2007-07-24, 8:00 am

Chuck Anderson wrote:

> This is off topic, as I'm sure what I'm looking for is not Php based,
> but I thought someone here may know how I can work with mp3's from the
> Windows command line (using Php exec, system, ...). I want to write a
> web based app (for use on my own PC) to play mp3s ... a custom juke box
> sort of thing with features that I can add as I see fit.


I've written something similar in the past: a jukebox app with GUI and
telnet interfaces. Then I wrote a little PHP wrapper around the telnet
interface. Very nice.

I used Perl as CPAN has some really good modules for dealing with MP3s and
OGGs. I'd recommend switching languages for your project.

--
Toby A Inkster BSc (Hons) ARCS
[G of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.12-12mdksmp, up 33 days, 12:28.]

Parsing an HTML Table with PEAR's XML_HTTPSax3
http://tobyinkster.co.uk/blog/2007/...-table-parsing/
Chuck Anderson

2007-07-25, 7:00 pm

Michael Fesser wrote:
> .oO(Chuck Anderson)
>
>
> Try a Google search for "php mp3 id3" or something like that. There are
> some classes available.
>
> Micha
>


Okay. I've done some looking around and have decided that getid3() -
http://www.getid3.org/ - is the mp3 id tag reading/writing program I
like best.

It's a sourceforge project - written in Php - is all encompassing (id3v1
and id3v2 - audio and video files) - and it has great demos and
documentation. The demos make it very easy to understand.

It should be pretty simple to write a script to build a database of my
mp3 collection now.

Playing the mp3's, on the other hand, does not look like a simple matter
(unless I use the Winamp API).

--
*****************************
Chuck Anderson • Boulder, CO
http://www.CycleTourist.com
*****************************
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2010 codecomments.com