Android video frame processing

I am working on application that does some real time image processing on camera frames. For that, I use preview callback’s method onPreviewFrame.
This works fine for cameras that support preview frames that have resolution at least 640×480 or larger. But when camera does not support such large camera preview resolution, application is programmed to refuse processing such frames. Now, the problem I have is with phones like Sony Xperia Go. It is a very nice device that can record video up to resolution 1280×720, but unfortunately maximum camera preview size is 480×320, which is too small for my needs.

What I would like to know is how to obtain these larger camera frames (up to 1280×720 or more)? Obviously it has to be possible because camera application has the ability to record videos in that resolution – therefore this application somehow must be able to access those larger frames. How to do the same from my application?

Application has to support Android 2.1 and later, but I would be very happy even if I find the solution for my problem only for Android 4.0 or newer.

This question is similar to http://stackoverflow.com/questions/8839109/processing-android-video-frame-by-frame-while-recording, but I don’t need to save the video – I only need those high resolution video frames…

Answer

It seems the only thing you can do is decoding frames from MediaRecoder data.
You may use ffmpeg to decode recoreder data from LocalSocket.

Hope the following open source projects may help:

ipcamera-for-android: https://code.google.com/p/ipcamera-for-android/

spydroid-ipcamera: https://code.google.com/p/spydroid-ipcamera/