title: AWS Rekognition InvalidImageFormatException when jpeg source is mjpeg stream
body: <p>I'm pulling jpg frames out of a mjpg stream. These are valid jpg files and work in any image tool I've tried; however, Rekognition will not accept them either when sending it as Bytes, or when I move them to S3 and try that route.</p>
  
  <p>I've made a few versions (<a href="https://dl.dropboxusercontent.com/u/16969955/test-images.zip" rel="nofollow noreferrer">attached here</a>), all from the same source jpg (I would include them inline but I don't want image optimization code to alter them)</p>
  
  <p><code>test.jpg</code> - original frame</p>
  
  <p><code>test-photoshop.jpg</code> - opened in Photoshop, "save for web"d</p>
  
  <p><code>test-imageoptim.jpg</code> - run through ImageOptim (which I believe compresses with jpegtran)</p>
  
  <p>Looking at these in a hex editor, the only difference I can't see is more exif data (using exiftool). When I run exiftool on the original, it still reports back all the basic details of the frame.</p>
  
  <p>I'm assuming this is a bug with Rekognition, or there is some specific exif bit it's looking for that my mjpeg stream extraction is omitting. Maybe someone has information on why pulling jpeg frames from mjpeg isn't possible by just attaching the right start and end frame bytes.</p>