title: How can I capture low resolution video on Android reliably across a range of devices?
body: <p>Hello Android video experts :)</p>
  
  <p>I am developing an Android application which allows the user to capture video and upload it to a remote server (it's more involved than that but the rest of the app is not important). Because of the upload requirement, it is important that the video is of a reasonable size, so not super high resolution. Let's say a max of 680x480 or 10Mb/minute. This is no problem on Apple devices.</p>
  
  <p>I have had what can only be described as a complete nightmare trying to capture video at a reasonably low bitrate reliably across a range of Android devices.</p>
  
  <p>As I understand it there are two ways of capturing video on Android:</p>
  
  <p>1) Using the Media Recorder/Camera API</p>
  
  <p>2) Using an Intent to open the cameras video capture application</p>
  
  <p>Option 1) gives the most flexibility and allows us to easily change the capture resolution. However the Android Camera API is NOT reliable across a range of devices, and I have very good information (including from someone who liaised with Google on this issue) that if you capture video using this API then it will crash on a good 50% of the devices out there. There is a reason that Zoom Camera FX uses an Intent for video capture. Zoom Camera (different app) seems to use Media Recorder, but has lots of bad reviews for video crashing or not working.</p>
  
  <p>Option 2) works well across a range of devices, as it uses the in built application on the device. The trouble is you have no control whatsoever on the resolution, there is a quality hint on the Intent but the camera app will normally ignore this. My Samsung Galaxy S3 records video by default at about 2Mb/s. This is way too high resolution. The built in application can of course change the resolution, but this relies on action by the user which is difficult to control.</p>
  
  <p>I understand that I could use a library such as ffmpeg to change the resolution of the video after capture. However this requires me to compile the library for Android, and also I have been informed that in order to legally use the decode/encode codecs on the device you have to pay license fees that amount to about $1 per copy of the app. Since this app will be free to use, this is not an option.</p>
  
  <p>So that's where I'm at. I've searched long and high for answers, but I can't figure out how to capture low resolution video reliably using Android.</p>
  
  <p>Any help very much appreciated!</p>
  
  <p>Matthew</p>