Solved

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

Posted on 2008-06-16
4
662 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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to count occurrences of each item in an array.

762 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

18 Experts available now in Live!

Get 1:1 Help Now