how to get amplitude of mp3 audio file?
조회 수: 11 (최근 30일)
이전 댓글 표시
I need to know the amplitude value of a mp3 file to calculate PSNR. Is there any function in matlab that can show the amplitude value of a mp3 file? May someone help me to answer my question please? thank you.
댓글 수: 0
채택된 답변
Jan
2017년 5월 21일
The command audioread imports an MP3 or WAV file to a matrix, which contains the amplitudes. This is not the amplitude of the original signal, but it is exactly, what you want: The amplitude of the signal stored in the file.
Steganography in an MP3 file requires to de-compress the file at first, embed the secret information, and re-compress the signal to a new MP3 file. Note that the process of un- and re-compressing will degrade the quality of the signal already, even without inserting additional information.
추가 답변 (1개)
Star Strider
2017년 5월 20일
The audioread function limits the amplitude of the output to ±1, so the original amplitude information will be lost unless you recorded a scaling value when you recorded it. You have to read the file in order to estimate the amplitude as a function of time.
댓글 수: 7
Walter Roberson
2017년 5월 21일
"If I use WAV, is there any function in matlab to know the amplitude of that WAV file?"
No.
Walter Roberson
2017년 5월 21일
You write asking about "amplitude", but you do not define what kind of amplitude you are talking about. Are you looking for Sound Pressure Level ?
"I need to compare the mp3 audio quality before and after embedding of steganography process."
Then why do you care about "amplitude" ? How are you measuring "audio quality" ? Is the measurement of audio quality something to do with Sound Pressure Level? Does it matter for your purposes whether the "amplitude" is a number from 0 to 1023, or a number from -512 to +511, or a number between -1 and +1 ? Is your quest for "audio quality" aided by knowing that the recording was a "line-in" level or at "mic level"?

참고 항목
카테고리
Help Center 및 File Exchange에서 Audio and Video Data에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!