Solved

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

Posted on 2008-06-16
4
667 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

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.
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

730 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