how to get amplitude of mp3 audio file?

조회 수: 11 (최근 30일)
Rini Indrayani
Rini Indrayani 2017년 5월 20일
댓글: Star Strider 2017년 5월 21일
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.

채택된 답변

Jan
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.
  댓글 수: 2
Rini Indrayani
Rini Indrayani 2017년 5월 21일
Actually, i had done steganography using homogenous frame from mp3 file. I had used audioread function to get the amplitude value to compare both of mp3 audio files (before and after steganography process). But i got the same value for all amplitudes from both mp3 audio files. So when i used that amplitudo values to calculate PSNR, the value is infinite. Because the difference value between both audio files is zero.that's why i am not sure about is it the true way to get amplitude or not.
Star Strider
Star Strider 2017년 5월 21일
My point, exactly.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Star Strider
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
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
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 CenterFile Exchange에서 Audio and Video Data에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by