Ask for help:
My job requirement is to generate a waveform diagram of a MP3 file.
My idea is to first generate a WAV file MP3, and then use the WAV file to generate a waveform diagram.
All the process will not, ask for help.
Originally, I want to exec (lame ...) This converts the MP3 into WAV, but finds that sometimes the conversion fails.
Later, some experts pointed out that this is related to the MP3 file format, may need to first step MP3 standardization.
The whole process, then, could be three steps:
1.mp3 standardization
2.mp3 Convert to WAV
3. Generate waveform Diagram
The three-step code or related information.
Reply to discussion (solution)
This is very difficult, I have to look at.
Write a mp3 to WAV DLL file in C + +, PHP call this DLL to implement your so-called conversion, this is the best practice!
I wrote a time ago to convert the txt text into MP3, and I might have some help with the idea.
First, the user with the web-side of the PHP program lost txt text content to the server side, the server side I wrote a monitoring program to monitor whether users have lost the latest content to come over, if someone lost the txt text content come over, the monitoring side open installed in the server above the language pass, Then load the txt text and convert it to a MP3 file, and then leave the download address of MP3 to the user so that he can download the mp3 file.
But, if you have to have a server yourself.
Thank you for your help, busy mess, reply later, please forgive me.
PHP does not understand, recently just in the study of this aspect of things,
1. Standardization I do not understand, is probably related to the sampling rate?
There is a Libmad open source Library on the 2.c++ that can decode mp3.
3. Draw the horizontal axis according to the sampling frequency, and read the decoded data to draw the ordinate (presumably this way).
How to read the decoded data also depends on whether the audio is mono or two channels.
The relevant data is digital signal processing bar.
Only silly B will use PHP to do this kind of thing, and this silly B I also met. Or is one of our wooden club leaders. Every day impropriety do not know the kind of technical fooling, is busy every day to die
Did you solve the problem?