title: How is audio data stored in raw pcm format？
body: <p>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. </p>
  
  <p>I use ffmpeg in cmd:</p>
  
  <pre><code>ffmpeg -i test.wav -f s16le -acodec pcm_s16le output.dat
  </code></pre>
  
  <p>How are samples represented in the <code>output.dat</code> 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). </p>
  
  <p>I actually do not need any code but hope someone can explain raw pcm format in detail. </p>
  
  <p>Thanks a lot   </p>