title: How to encode pixels from buffer to h.264 or VP8
body: <p>I have a application (qt c++) that reads data from USB-device, decodes that data into 24bit RGB pixels which are stored in a uchar array.</p>
  
  <p>Framerate is ~10 FPS. Framesize is 128x4096.</p>
  
  <p>Question is: How to encode these frames into VP8 or h.264 video in real time?</p>
  
  <p>No external processes are allowed, everything needs to run inside my application.</p>
  
  <p>ffmpeg is an option but how to include it to my project and use it? Documentation is rather bad to say the least. Also x264 could be an option but same question as to ffmpeg. And it's also quite expensive, 1$ for unit and minimum of 10000.</p>
  
  <p>Simple guide would be helpful but I doubt there exists one.</p>
  
  <p>Application should run in Windows and Linux. </p>