Search code examples
androidandroid-camerah.264video-encodingandroid-mediacodec

Can I record video on Android device and encode it in h.264 (Baseline profile) on it?


I need to determine how can I record video in Android device and encode it in h.264 Baseline profile in mp4 container. I can't find information about this because smartphone manufacturers usually don't show it. All I know is that Sony Z3 encodes all recorded video in H.264 High Profile (L3-L6), HTC One M8 - H.264 Baseline, Samsung Galaxy S3 - partially in High and Baseline.


Solution

  • It helps me: http://writingminds.github.io/ffmpeg-android-java/ I used this ready-made solution because I had problems with compiling ffmpeg libs with Cygwin64 and Android NDK on Windows 7.