Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7308491
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T23:33:52+00:00 2026-05-28T23:33:52+00:00

I want to record video only in android with MPEG4 format. I want the

  • 0

I want to record video only in android with MPEG4 format. I want the container and codec to be MPEG4. So here is what I have done for that.

Thread video = new Thread(new Runnable() {
    public void run() {
        videoRecorder = new MediaRecorder();
        videoRecorder.setPreviewDisplay(surfaceView.getHolder().getSurface());
        videoRecorder.setVideoSource(MediaRecorder.VideoSource.DEFAULT);
        videoRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
        videoRecorder.setVideoEncodingBitRate(56 * 8 * 1024);
        videoRecorder.setVideoSize(176, 144);
        videoRecorder.setVideoFrameRate(12);
        videoRecorder.setVideoEncoder(MediaRecorder.VideoEncoder.MPEG_4_SP);
        videoRecorder.setOutputFile("/sdcard/video.m4e");
        try {
            videoRecorder.prepare();
        } catch (IllegalStateException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
        videoRecorder.start();
    }
});
video.start();

Now, after recording, I got the video recorded into video.m4e file. But when I check its information, I got the following:

enter image description here

At the same time I used the following to record audio:

Thread audio = new Thread(new Runnable() {              
    public void run() {
        audioRecorder = new MediaRecorder();
        audioRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);
        audioRecorder.setOutputFormat(MediaRecorder.OutputFormat.RAW_AMR);
        audioRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
        audioRecorder.setOutputFile("/sdcard/audio.amr");
        try {
            audioRecorder.prepare();
        } catch (IllegalStateException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
        audioRecorder.start();
    }
});
audio.start();

and I got the container format and codec as AMR as I intended:

enter image description here

So, what causes MediaRecorder to record video in 3GP format? I haven’t specified 3GP anywhere in my program. I am testing this code on my Samsung Galaxy tab running Android 2.2

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T23:33:53+00:00Added an answer on May 28, 2026 at 11:33 pm

    MPEG-4 is a method of defining compression of audio and visual (AV) digital data.

    A file format for storing time-based media content. It is a general format forming the basis for a number of other more specific file formats (e.g. 3GP, Motion JPEG 2000, MPEG-4 Part 14).

    So there is no conspiracy in the result you got, the compression method (OR “Codec”) you used was MPEG4 and the video format generated by your phone is 3gp, which in actual is a part of the video formats of the suite of the MPEG4 compression scheme for the media.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We want to build an application that allows the user to record a video
I want to record video with new iPhone SDK available on 3GS without user
I have a UIImagePickerController which I use to record video. now i want to
I want to record the Voice on my android mobile and I have no
I created an application for android. Now, I want to record a video on
I want to record the client that browse my web page, So I do
I want to record what various sources have to say about a historical figure.
Is the svnadmin dump format documented somewhere? I want to record a datastructure containing
I'm maintaining a web app that has performance problems. I want to record a
I want to record screen casts and video lectures, upto one hour each to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.