[Libav-user] ffmpeg wav VS raw

ReSearchIT Eng re.search.it.eng at gmail.com
Tue Apr 8 13:58:54 CEST 2014


Hi,

I've noticed something which I think it's a strange behavior of ffmpeg
command line.
Encoding the same file, once treating it as a wav, 2nd time as a raw file
(simply removing the wav header), it behaves differently.

Case 1 - encoding a wav as input (44wav head plus the actual PCM data):
./ffmpeg.exe -loglevel debug -y -vn -f s16le -ac 1 -ar 16000 -acodec
pcm_s16le -sample_fmt s16 -i *684.wav *-ac 1 -ab 23850 -ar 16000 -f amr
-acodec libvo_amrwbenc -sample_fmt s16 640bytes_fromwav.awb

(and wav has correct header: samplerate:803e (aka 16000), byterate: 007d
(aka 256k)
and I get an output which audio is the same, but binary different from the
2nd case:

Case 2: I put same data as above, but this times without the 44bytes wav
header:
./ffmpeg.exe -loglevel debug -y -vn -f s16le -ac 1 -ar 16000 -acodec
pcm_s16le -sample_fmt s16 -i *640.raw* -ac 1 -ab 23850 -ar 16000 -f amr
-acodec libvo_amrwbenc -sample_fmt s16 640bytes.awb

Note: I compared the debug reports of both commands and on the details that
come on screen are identical, but the resulting data is totally different
when I do bit by bit comparison.

What I am doing wrong, or what is the issue? It is supposed to be the same
thing, no? I tried for even longer data files (few kbytes, there are always
binary differences between the wav treatment and raw treatment).

Regards,
Sebastian.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20140408/4e5a1ace/attachment.html>


More information about the Libav-user mailing list