Video recording format(.3gp or mp4) in android?

前端 未结 2 1364
后悔当初
后悔当初 2021-02-20 03:22

I use the Intent MediaStore.ACTION_VIDEO_CAPTURE video recording method.

By default, the recorded video is stored as a .3gp file.

相关标签:
2条回答
  • 2021-02-20 03:40

    Yes, you can have an mp4 output format, mp4 is just a container : see this to know what kind of data streams you can store in it.

    MPEG_4  MPEG4 media file format
    

    Also refer to this

    0 讨论(0)
  • 2021-02-20 03:46

    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.

    0 讨论(0)
提交回复
热议问题