Solved

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

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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Suggested Solutions

The purpose of this article is to demonstrate how we can use conditional statements using Python.
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

861 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

23 Experts available now in Live!

Get 1:1 Help Now