Solved

program to detect bit rate and sample rate of an audio file

Posted on 2008-06-16
4
665 Views
Last Modified: 2013-11-18
I am creating a way for users to upload their audio voice message using php and I could not find a php function that can give more information about an audio file.
Users are required to upload a .WAV file of 16 Bit 8kHz mono.
Therefore, after the file is uploaded I have to make sure it is in this correct format.

I am wondering if there is a stable linux audio program that I can run via command line and have it output the details of an audio file.
Then I could parse the output and extract the type of information I need to determine if the audio file is in the proper format.
It will be on a production server, so the program has to be well known for stability.

Any suggestions?



OS: CentOS 5 64-bit
0
Comment
Question by:ray-solomon
  • 2
4 Comments
 
LVL 84

Expert Comment

by:ozo
ID: 21798799
file *.wav
0
 
LVL 18

Expert Comment

by:Matthew Kelly
ID: 21798938
A modified version of this would let you do it right in PHP:

http://articles.techrepublic.com.com/5100-10878_11-5810215.html
0
 
LVL 18

Accepted Solution

by:
Matthew Kelly earned 500 total points
ID: 21798961
If that doesn't work there is a PHP sourceforge project to do it as well called getID3:

http://sourceforge.net/projects/getid3/

That might be more stable but not as simplistic.
0
 
LVL 10

Author Closing Comment

by:ray-solomon
ID: 31467821
works perfectly. Thanks.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now