Is it possible to set file Format and encoder format for video while using native camera via Intent with flag ACTION_VIDEO_CAPTURE?
Asked
Active
Viewed 1,694 times
2
-
So is it not possible? If not then is there a way to provide the same video file format and codec format for all devices using native camera? – Michal W Jun 10 '13 at 08:38
-
It is possible, and quite easy. I added an answer to describe how. – Joshua Pinter Mar 15 '14 at 19:35
-
possible duplicate of [Video recording format(.3gp or mp4) in android?](http://stackoverflow.com/questions/5026207/video-recording-format-3gp-or-mp4-in-android) – Joshua Pinter Mar 15 '14 at 19:37
1 Answers
1
Yes
Set the MediaRecorder
's OutputFormat
to MPEG_4
, like so:
recorder = new MediaRecorder();
recorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
This other SO answer describes it perfectly, as well.

Community
- 1
- 1

Joshua Pinter
- 45,245
- 23
- 243
- 245