title: Java: How do I create a movie from an array of images?
body: <p>I basically have an matrix of bytes. Each row (meaning byte[]) represents an image. How do I create a movie out of that (any format - avi, mpeg, whatever), and save it as a file? 
  Each image can be one of the following:</p>
  
  <pre><code>int JPEG    Encoded formats.
  int NV16    YCbCr format, used for video.
  int NV21    YCrCb format used for images, which uses the NV21 encoding format.
  int RGB_565 RGB format used for pictures encoded as RGB_565.
  int YUY2    YCbCr format used for images, which uses YUYV (YUY2) encoding format.
  int YV12    Android YUV format: This format is exposed to software decoders and applications.
  </code></pre>
  
  <p>I can choose the format to whatever I like, as long as I get to create the movie.</p>
  
  <pre><code>public void createMovie(byte[][] images) {
    // and ideas on what to write here?
  }
  </code></pre>
  
  <p>I don't need the actual implementation, just let me know the idea and what external libraries I need (if I need any).</p>
  
  <p>I also need to edit some of the images (the byte stream) before I create the movie (to add some text). How can I do that?</p>
  
  <p>The solution needs to be "Java only"! No external programs, no external commands (but I can use external jars).</p>
  
  <p>Thanks!</p>