I was using ffmpeg to transfer the format of audio files, like from .wav to mp3. The transfer seemed fine and the audio sounds as expected. However when I check its waveform, I found that after the transfer,
A small portion of silent (and with some very tiny noise) is at the beginning of the output audio. The length is about 1 ms ~ 0.001 sec.
As the silent part is appended, the end of the audio is altered - the length of the output audio is longer than the input file. (my input is exactly 10 sec, now the output is around 10.1 sec.
Need the transfer precise because need to do further analysis frame by frame, and this situation could not go well. I used the following command to transfer a file.
ffmpeg -I ..\wav_1K_32bit_24576kbps_384000Hz_stereo.wav -vn -ar 12000 -ac 2 -ab 320000 -f MP3 MP3_12000Hz_32kbps_stereo_VBROff.MP3
Please refer to the screen crop of waveform view.
Beginning of audio, input (U) & output (L)
End of audio, input (U) & output (L)
Thank you!