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 4048100
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T13:46:29+00:00 2026-05-20T13:46:29+00:00

I have an HTC MyTouch 3G Slide (Android 2.1, API level 7). I am

  • 0

I have an HTC MyTouch 3G Slide (Android 2.1, API level 7). I am trying to write a program to record 320×240 h.264 video at 15fps, but I have 2 major problems. I would be grateful for a solution to either issue. Here is what I am doing:

mediaRecorder = new MediaRecorder();
mediaRecorder.setCamera(camera);
mediaRecorder.setAudioSource(MediaRecorder.AudioSource.DEFAULT);
mediaRecorder.setVideoSource(MediaRecorder.VideoSource.DEFAULT);
mediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
mediaRecorder.setMaxDuration(600000);
mediaRecorder.setOutputFile("/sdcard/test.mp4");
mediaRecorder.setVideoFrameRate(15);
mediaRecorder.setVideoSize(320, 240);
mediaRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
mediaRecorder.setVideoEncoder(MediaRecorder.VideoEncoder.H264);
mediaRecorder.setPreviewDisplay(holder.getSurface());
mediaRecorder.setMaxFileSize(maxFileSizeInBytes);
mediaRecorder.prepare();
mediaRecorder.start();

Problem 1) H263 and MPEG_4_SP work fine, but H264 does not. On the call to prepare(), the logcat is filled with the errors below:

E/PackageInstallationReceiver(  209): Remove /data/local/tmp/com.helios.apk Fail!
E/mm-camera 7x-vfe( 2496): Received VFE start ACK!!! This is a user preview start.
E/audio_input( 2496): unsupported parameter: x-pvmf/media-input-node/cap-config-interface;valtype=key_specific_value
E/audio_input( 2496): VerifyAndSetParameter failed
E/CameraInput( 2496): Unsupported parameter(x-pvmf/media-input-node/cap-config-interface;valtype=key_specific_value)
E/CameraInput( 2496): VerifiyAndSetParameter failed on parameter #0
E/PVOMXEncNode( 2496): PVMFOMXEncNode-Audio_AMRNB::DoPrepare(): Got Component OMX.PV.amrencnb handle 
E/PVOMXEncNode( 2496): PVMFOMXEncNode-Video_AVC::DoPrepare(): Cannot get component OMX.PV.avcenc handle, try another component if available
E/AuthorDriver( 2496): Command 13 completed with error -17
E/MediaRecorder( 3221): prepare failed: -17
E/Helios  ( 3221): prepare failed.
E/AndroidRuntime( 3221): Uncaught handler: thread main exiting due to uncaught exception
E/AndroidRuntime( 3221): java.lang.RuntimeException: unlock failed
E/AndroidRuntime( 3221):    at android.hardware.Camera.unlock(Native Method)
E/AndroidRuntime( 3221):    at com.helios.ActivityLauncher.startRecording(ActivityLauncher.java:268)
E/AndroidRuntime( 3221):    at com.helios.ActivityLauncher.onLongClick(ActivityLauncher.java:223)
E/AndroidRuntime( 3221):    at com.helios.ActivityLauncher.onClick(ActivityLauncher.java:203)
E/AndroidRuntime( 3221):    at android.view.View.performClick(View.java:2361)
E/AndroidRuntime( 3221):    at android.view.View.onTouchEvent(View.java:4176)
E/AndroidRuntime( 3221):    at android.view.View.dispatchTouchEvent(View.java:3706)
E/AndroidRuntime( 3221):    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:924)
E/AndroidRuntime( 3221):    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:924)
E/AndroidRuntime( 3221):    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:924)
E/AndroidRuntime( 3221):    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:924)
E/AndroidRuntime( 3221):    at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1696)
E/AndroidRuntime( 3221):    at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1117)
E/AndroidRuntime( 3221):    at android.app.Activity.dispatchTouchEvent(Activity.java:2068)
E/AndroidRuntime( 3221):    at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1680)
E/AndroidRuntime( 3221):    at android.view.ViewRoot.handleMessage(ViewRoot.java:1707)
E/AndroidRuntime( 3221):    at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 3221):    at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 3221):    at android.app.ActivityThread.main(ActivityThread.java:4702)
E/AndroidRuntime( 3221):    at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 3221):    at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime( 3221):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
E/AndroidRuntime( 3221):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
E/AndroidRuntime( 3221):    at dalvik.system.NativeStart.main(Native Method)
E/dalvikvm( 3221): Unable to open stack trace file '/data/anr/traces.txt': Permission denied
E/JavaBinder(   78): !!! FAILED BINDER TRANSACTION !!!
E/ActivityManager(   78): fail to set top app changed!
E/audio_input( 2496): unsupported parameter: x-pvmf/media-input-node/cap-config-interface;valtype=key_specific_value
E/audio_input( 2496): VerifyAndSetParameter failed
E/CameraInput( 2496): Unsupported parameter(x-pvmf/media-input-node/cap-config-interface;valtype=key_specific_value)
E/CameraInput( 2496): VerifiyAndSetParameter failed on parameter #0
E/CameraService( 2496): getClientFromCookie: client appears to have died
E/mm-camera( 2496): +++ DELETING LEAKED MEMORY AT 0x33f48 (2 REMAINING)
E/mm-camera( 2496):      6 0xa942ba5c
E/mm-camera( 2496):      5 0xa940bfc2
E/mm-camera( 2496):      4 0xa940d774
E/mm-camera( 2496):      3 0xa940d28a
E/mm-camera( 2496):      2 0xafe100c4
E/mm-camera( 2496):      1 0xafe0fb98
E/mm-camera( 2496): +++ DELETING LEAKED MEMORY AT 0x20dc8 (1 REMAINING)
E/mm-camera( 2496):      6 0xa942ba5c
E/mm-camera( 2496):      5 0xa940bfc2
E/mm-camera( 2496):      4 0xa940d774
E/mm-camera( 2496):      3 0xa940d28a
E/mm-camera( 2496):      2 0xafe100c4
E/mm-camera( 2496):      1 0xafe0fb98

When using H.263 (which works), the error log only contains:

E/CameraInput(   58): Unsupported parameter(x-pvmf/media-input-node/cap-config-interface;valtype=key_specific_value)
E/CameraInput(   58): VerifiyAndSetParameter failed on parameter #0
E/PVOMXEncNode(   58): PVMFOMXEncNode-Audio_AMRNB::DoPrepare(): Got Component OMX.PV.amrencnb handle 
E/OMXVenc (   58): component_init::359 Initializing component OMX.qcom.video.encoder.h263
E/PVOMXEncNode(   58): PVMFOMXEncNode-Video_H263::DoPrepare(): Got Component OMX.qcom.video.encoder.h263 handle 
E/OMXVenc (   58): set_parameter::1104 set_parameter : output buffer size = 76800
E/OMXVenc (   58): set_parameter::1104 set_parameter : output buffer size = 76800
E/OMXVenc (   58): get_parameter::1007 unsupported index 100663301
E/OMXVenc (   58): set_parameter::1240 unsupported index 100663301
E/OMXVenc (   58): get_parameter::1007 unsupported index 100663302
E/OMXVenc (   58): set_parameter::1240 unsupported index 100663302
E/OMXVenc (   58): send_command::758 attempt to move to new state 2
E/OMXVenc (   58): Setting OMX_Video_ControlRateVariable
E/OMXVenc (   58): use_buffer::1437 client allocated input buffer for component 115200, address= 0x98228
E/OMXVenc (   58): use_buffer::1437 client allocated input buffer for component 115200, address= 0x98218
E/OMXVenc (   58): use_buffer::1437 client allocated input buffer for component 115200, address= 0x98208
E/OMXVenc (   58): use_buffer::1437 client allocated input buffer for component 115200, address= 0x981f8
E/OMXVenc (   58): allocate_buffer::1577 Attempt to allocate buffer of 76800 bytes for OUTPUT PORT
E/OMXVenc (   58): allocate_buffer::1577 Attempt to allocate buffer of 76800 bytes for OUTPUT PORT
E/OMXVenc (   58): allocate_buffer::1577 Attempt to allocate buffer of 76800 bytes for OUTPUT PORT
E/OMXVenc (   58): allocate_buffer::1577 Attempt to allocate buffer of 76800 bytes for OUTPUT PORT
E/OMXVenc (   58): send_command::758 attempt to move to new state 2
E/OMXVenc (   58): process_state_change::2580 Req to Move to Idle: Call venc_stop
E/VENC    (   58): venc_stop::1150 Received command VENC_CMD_STOP
E/VENC_DRV(   58): Reset_HW::344 adsp_rtos_disable
E/OMXVenc (   58): process_DL_status::2737 got DL status for VENC_CMD_STOP
E/OMXVenc (   58): process_DL_status::2809 encoder already moves to idle state. call event handler now
E/OMXVenc (   58): send_command::758 attempt to move to new state 1
E/audio_input(   58): unsupported parameter: x-pvmf/media-input-node/cap-config-interface;valtype=key_specific_value
E/audio_input(   58): VerifyAndSetParameter failed
E/CameraInput(   58): Unsupported parameter(x-pvmf/media-input-node/cap-config-interface;valtype=key_specific_value)
E/CameraInput(   58): VerifiyAndSetParameter failed on parameter #0
E/QCOmxcore(   58): OMXCORE API :  Free Handle 93b2c
E/VENC    (   58): venci_process_command_unload::2408 Encoder time taken to Exit from Stop command: 76
E/OMXVenc (   58): component_deinit::2033 deinitializing component...
E/OMXVenc (   58): component_deinit::2108 Encoder has exited
E/QCOmxcore(   58):  Unloading the dynamic library for OMX.qcom.video.encoder.h263
E/mm-camera(   58): +++ DELETING LEAKED MEMORY AT 0x3fe78 (2 REMAINING)
E/mm-camera(   58):      6 0xa942ba5c
E/mm-camera(   58):      5 0xa940bfc2
E/mm-camera(   58):      4 0xa940d774
E/mm-camera(   58):      3 0xa940d28a
E/mm-camera(   58):      2 0xafe100c4
E/mm-camera(   58):      1 0xafe0fb98
E/mm-camera(   58): +++ DELETING LEAKED MEMORY AT 0x2dd00 (1 REMAINING)
E/mm-camera(   58):      6 0xa942ba5c
E/mm-camera(   58):      5 0xa940bfc2
E/mm-camera(   58):      4 0xa940d774
E/mm-camera(   58):      3 0xa940d28a
E/mm-camera(   58):      2 0xafe100c4
E/mm-camera(   58):      1 0xafe0fb98

Problem 2) Although I am explicitly setting the framerate to 15fps, post-analysis of the clips shows strange framerates like 21.xx or 25.xx fps.

Why might H264 not be working, and why might MediaRecorder not be obeying my requested frame rate? Thanks in advance.

  • 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-20T13:46:30+00:00Added an answer on May 20, 2026 at 1:46 pm

    H.264 is only supported in Android 3.0+.

    Check the CamcorderProfile to know which encoding profiles your device supports.

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

Sidebar

Related Questions

I've turned on USB debugging. I have the latest HTC Sync and android SDK
We have some really old code that calls WebServices using behaviours (webservice.htc), and we
Have had to write my first proper multithreaded coded recently, and realised just how
I have HTC Comet connected to Eclipse with SDK 2.2. I do a debug
I have just placed iepngfix.htc to fix the PNG problem in ie 6, but
I'm using an HTC Snap running WinMo 6.5 Standard and I have a seemingly
Have just started using Google Chrome , and noticed in parts of our site,
Have you ever seen any of there error messages? -- SQL Server 2000 Could
Have you guys had any experiences (positive or negative) by placing your source code/solution
Have just started using Visual Studio Professional's built-in unit testing features, which as I

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.