I am writing an app to manipulate audio where i need to convert a file (wav, MP3, etc) to raw data (samples are presented as float) at the first place.
I use ffmpeg in cmd:
ffmpeg -i test.wav -f s16le -acodec pcm_s16le output.dat
How are samples represented in the output.dat file? I know one sample needs two bytes under S16, and dual channel means it is stored as L1 R1 L2 R2 ... But does this file come with a frame presentation or all the byte in the dat file are sample values? The converted files' size of test.wav via two methods is not identical. One is via libav using example code on ffmpeg website, another one is what mentioned above, directly using ffmpeg.exe in cmd, the former method give me a slightly smaller file size.I am confused when i find someone says pcm use a frame presentation (2048 samples a frame).
I actually do not need any code but hope someone can explain raw pcm format in detail.
Thanks a lot

-f s16leproduces a raw samples dump with no header/trailer or any metadata. So, it is simplyL1 R1 C1 L2 R2 C2...where L R C represent 3 channels.When ffmpeg reads such a file, it will read and frame 1024 samples from each channel at a time, unless
sampling rate/25is less than 1024, in which case, it will read and packetize those many samples e.g. for a stream of 16000 Hz,sampling rate/25=640, which is less than1024. So, ffmpeg will packetize640x2=1280samples for such a stereo stream.