difference between audacity and libsndfile

I used both audacity and ffmpeg (also libsndfile, which is the underlining conversion software audacity uses) to convert mp3 files to wav, both using PCM encoding with same encoding, sample rate, bit width and so on, so the header information for these 2 files are exactly the same; there are only slight defences between the two, the file generated by audacity has a little bit more frames (detailed info is attached at the end of the email).

My situation is, the software I am using can only recognize the wav file exported by audacity GUI but not the one by converted by ffmpeg (or libsndfile’s sndfile-convert.exe). I also used mplayer, soX and some other tools to convert to WAV files, all have the same problem as ffmpeg. Our goal is to use a command line tool to do the conversion while audacity doesn’t support command line operations so we can’t use it. Do you know what is the differences between the wav files generated by these 2 different tools? What does audacity do extra before or after using libsndfile to export as WAV file?

Below are the difference between the files generated by ffmpeg(wanted.wav, the one with problem) and exported by audacity(wanted-au.wav, the one that works):

C:testlibsndfile-1_0_17>sndfile-info.exe wanted.wav

Version : libsndfile-1.0.17

========================================
File : wanted.wav
Length : 4804048
RIFF : 4804040
WAVE
fmt : 16
Format : 0x1 => WAVE_FORMAT_PCM
Channels : 1
Sample Rate : 16000
Block Align : 2
Bit Width : 16
Bytes/sec : 32000
data : 4804004
End


Sample Rate : 16000
Frames : 2402002
Channels : 1
Format : 0x00010002
Sections : 1
Seekable : TRUE
Duration : 00:02:30.125
Signal Max : 18141 (-5.14 dB)


C:testlibsndfile-1_0_17>sndfile-info.exe wanted-au.wav

Version : libsndfile-1.0.17

========================================
File : wanted-au.wav
Length : 4806188
RIFF : 4806180
WAVE
fmt : 16
Format : 0x1 => WAVE_FORMAT_PCM
Channels : 1
Sample Rate : 16000
Block Align : 2
Bit Width : 16
Bytes/sec : 32000
data : 4806144
End


Sample Rate : 16000
Frames : 2403072
Channels : 1
Format : 0x00010002
Sections : 1
Seekable : TRUE
Duration : 00:02:30.192
Signal Max : 16892 (-5.76 dB)

Perhaps your software (what’s that?) requires different metatags?