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

  • SEARCH
  • Home
  • 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 4607534
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T00:43:00+00:00 2026-05-22T00:43:00+00:00

I try to record video using MediaRecorder Class. However I find out that I

  • 0

I try to record video using MediaRecorder Class.

However I find out that I failed to lower the framerate of the video stream.

I’m using H.264 as my Video Encoder and AAC as my Audio Encoder(yes, it is supported in API LEVEL 10 and above, AKA Android 2.3.3+)
The main source is as follows.

recorder = new MediaRecorder(); 
recorder.setPreviewDisplay(surfaceHolder.getSurface());
recorder.setVideoSource(MediaRecorder.VideoSource.CAMERA); 
recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
//set the Output Format
recorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);  
//set the Video Size
recorder.setVideoSize(176,144);   
//set the Frame rate
recorder.setVideoFrameRate(15);

//Set the Video Encoder
recorder.setVideoEncoder(MediaRecorder.VideoEncoder.H264); 
//Set the Audio Encoder
recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AAC);          
recorder.setOutputFile(myRecAudioFile.getAbsolutePath());
recorder.prepare();
recorder.start();

However I got the debug info that:

03-22 22:39:41.120: WARN/StagefrightRecorder(662): Intended video encoding frame rate (15 fps) is too small and will be set to (27 fps)

Weird enough that I also got a error message that:

03-22 22:39:41.380: ERROR/VENC_ENC(662): Bitrate 192000

In the end, i got a mp4 file whose frame rate is nearly 28fps.


I also tried to use the lowest CamcorderProfile which is

recorder = new MediaRecorder(); 
recorder.setPreviewDisplay(surfaceHolder.getSurface());
recorder.setVideoSource(MediaRecorder.VideoSource.CAMERA); 
recorder.setAudioSource(MediaRecorder.AudioSource.MIC);

//replacement
CamcorderProfile cpLow = CamcorderProfile.get(CamcorderProfile.QUALITY_LOW);
recorder.setProfile(cpLow);

recorder.setOutputFile(myRecAudioFile.getAbsolutePath());
recorder.prepare();  
recorder.start();

and comment the verbose configuration of the recorder.

As the book Pro Android Media is Page 242 said I would got the video file with 15fps. However, I once again got a video file with about 27fps.


So how to lower the frame rate of a video? I’m building a live system so lowering bitrate got to be quite important to me.
Thank you for your time!

  • 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-22T00:43:01+00:00Added an answer on May 22, 2026 at 12:43 am

    I have just ran into this too. From the docs (bold mine):

    On some devices that have auto-frame rate, this sets the maximum frame rate, not a constant frame rate. Actual frame rate will vary according to lighting conditions.

    So it looks like you can’t really control the frame rate. The number you set is used like a hint.

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

Sidebar

Related Questions

Using a try-catch-finally construction to retrieve a database record, it seems that I need
I'm trying to use android.media.MediaRecorder to record video, and no matter what I do
I try to record audio using android ndk. people say I can use frameworks/base/media/libmedia/AudioRecord.cpp.
I try to add a record to SQLServer db table using LINQ to SQL
I am using hibernate and whenever I try to add a record it drops
Using Lift Record, when I try to retrieve the MongoDB entry below, a NullPointerException
I’m developing an application, which allows to record video from web camera. (using visual
When I try to insert a new record into the database using SQLAlchemy and
public static void record(Message message)//Message is a class { try { BufferedOutputStream buf=new BufferedOutputStream(new
I have the following table. When i try to insert records using LINQ 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.