hi,
I try to capture video via usb camera,but it is failed ,and the log is as below,how can I fix it? is it because of the Codec or other problem? and there is no microphone on our board.
06-12 09:40:25.883 5905 5905 I CAM_VideoModule: startVideoRecording: Thread[main,5,main]
06-12 09:40:25.883 5905 5905 V CAM_VideoUI: mFocusRing.stopFocusAnimations()
06-12 09:40:25.888 5905 6496 D CAM_Storage: External storage state=mounted
06-12 09:40:25.922 5905 5905 I CAM_VideoModule: startVideoRecording middle1
06-12 09:40:25.922 5905 5905 I CAM_VideoModule: initializeRecorder: Thread[main,5,main]
06-12 09:40:25.923 5053 5053 W StagefrightRecorder: stop while neither recording nor paused
06-12 09:40:25.940 5053 5115 W StagefrightRecorder: Max file duration is not positive: 0 us. Disabling duration limit.
06-12 09:40:25.940 5053 5115 W StagefrightRecorder: Target duration (0 us) too short to be respected
06-12 09:40:25.940 5905 5905 D CAM_LcyLocProvider: No location received yet.
06-12 09:40:25.942 5905 5905 D CAM_LcyLocProvider: No location received yet.
06-12 09:40:25.942 5905 5905 V CAM_VideoModule: New video filename: /storage/emulated/0/DCIM/Camera/VID_20200612_094025.mp4.tmp
06-12 09:40:25.945 5905 5905 I CAM_VideoModule: startVideoRecording middle2
06-12 09:40:25.965 5053 6524 I OMXClient: IOmx service obtained
06-12 09:40:25.966 3085 3579 I OMXMaster: makeComponentInstance(OMX.Freescale.std.video_encoder.avc.hw-based) in omx@1.0-service process
06-12 09:40:25.978 3085 3579 I OMXNodeInstance: allocateNode(0x0:Freescale.std._encoder.avc.hw-based, handle=0xeddfb004)
06-12 09:40:25.980 5053 6523 I MediaCodec: MediaCodec will operate in async mode
06-12 09:40:25.981 3085 4504 W OMXNodeInstance: [0xeddfb004:Freescale.std._encoder.avc.hw-based] component does not support metadata mode; using fallback
06-12 09:40:25.983 5053 6524 W OMXUtils: do not know color format 0x7f000789 = 2130708361
06-12 09:40:25.984 5053 6524 I ACodec : setupAVCEncoderParameters with [profile: Baseline] [level: Level1]
06-12 09:40:25.986 5053 6524 I ACodec : [OMX.Freescale.std.video_encoder.avc.hw-based] cannot encode color aspects. Ignoring.
06-12 09:40:25.987 5053 6524 I ACodec : [OMX.Freescale.std.video_encoder.avc.hw-based] cannot encode HDR static metadata. Ignoring.
06-12 09:40:25.987 5053 6524 I ACodec : setupVideoEncoder succeeded
06-12 09:40:25.987 3085 3142 I OMXPlayer: LEVEL: 1 FUNCTION: SetConfig LINE: 2147
06-12 09:40:25.987 3085 3142 I OMXPlayer: SetConfig: failure: unsupported index: 0x6F800002
06-12 09:40:25.987 3085 3142 E OMXNodeInstance: setConfig(0xeddfb004:Freescale.std._encoder.avc.hw-based, ConfigPriority(0x6f800002)) ERROR: UnsupportedIndex(0x8000101a)
06-12 09:40:25.987 5053 6524 I ACodec : codec does not support config priority (err -1010)
06-12 09:40:25.987 5053 6524 W OMXUtils: do not know color format 0x7f000789 = 2130708361
06-12 09:40:25.987 3085 3142 I OMXPlayer: LEVEL: 1 FUNCTION: GetConfig LINE: 2034
06-12 09:40:25.987 3085 3142 I OMXPlayer: GetConfig: failure: unsupported index: 0x6F800005
06-12 09:40:25.987 3085 3142 E OMXNodeInstance: getConfig(0xeddfb004:Freescale.std._encoder.avc.hw-based, ConfigLatency(0x6f800005)) ERROR: UnsupportedIndex(0x8000101a)
06-12 09:40:25.987 3085 3085 I OMXPlayer: LEVEL: 1 FUNCTION: GetConfig LINE: 2034
06-12 09:40:25.987 3085 3085 I OMXPlayer: GetConfig: failure: unsupported index: 0x6F100004
06-12 09:40:25.988 3085 3085 E OMXNodeInstance: getConfig(0xeddfb004:Freescale.std._encoder.avc.hw-based, ConfigAndroidVendorExtension(0x6f100004)) ERROR: UnsupportedIndex(0x8000101a)
06-12 09:40:25.991 3043 3043 W AshmemAllocator: ashmem_create_region(12) returning hidl_memory(0xf2d987a2c100, 12)
06-12 09:40:26.003 3085 3140 I OMXPlayer: LEVEL: 1 FUNCTION: AllocateBuffer LINE: 762
06-12 09:40:26.003 3085 3140 I OMXPlayer: AllocateBuffer: vpu malloc frame buf failure: size=12, ret=0x1
06-12 09:40:26.003 3085 3140 I OMXNodeInstance: onEvent(0xeddfb004:Freescale.std._encoder.avc.hw-based, Error(1), InsufficientResources(80001000), ??(0))
06-12 09:40:26.003 3085 3140 I OMXPlayer: LEVEL: 1 FUNCTION: AllocateBuffer LINE: 378
06-12 09:40:26.003 3085 3140 I OMXPlayer: Failed to allocate buffer resource for port #0
06-12 09:40:26.003 3085 3140 E OMXNodeInstance: allocateBuffer(0xeddfb004:Freescale.std._encoder.avc.hw-based, Input:0 12@0xefdf7000) ERROR: InsufficientResources(0x80001000)
06-12 09:40:26.004 5053 6524 E ACodec : Failed to allocate buffers after transitioning to IDLE state (error 0xfffffff4)
06-12 09:40:26.004 5053 6524 E ACodec : signalError(omxError 0x80001001, internalError -12)
06-12 09:40:26.006 5053 6523 E MediaCodec: Codec reported err 0xfffffff4, actionCode 0, while in state 5
06-12 09:40:26.007 3085 3140 E OMXNodeInstance: sendCommand(0xeddfb004:Freescale.std._encoder.avc.hw-based, StateSet(0), Loaded(1)) ERROR: SameState(0x80001012)
06-12 09:40:26.008 3085 3140 W OMXNodeInstance: [0xeddfb004:Freescale.std._encoder.avc.hw-based] Attempt to remove an active buffer [0] we know nothing about...
06-12 09:40:26.008 3085 3140 E OMXNodeInstance: b/25884056
06-12 09:40:26.009 5053 6524 E ACodec : [OMX.Freescale.std.video_encoder.avc.hw-based] ERROR(0x80001000)
06-12 09:40:26.009 5053 6524 E ACodec : signalError(omxError 0x80001000, internalError -2147483648)
06-12 09:40:26.010 5053 6523 E MediaCodec: Codec reported err 0x80001000, actionCode 0, while in state 0
06-12 09:40:26.018 5053 5115 E ResourceManagerService: getLowestPriorityBiggestClient_l: lowest priority 0 vs caller priority 0
06-12 09:40:26.020 3085 3140 I OMXNodeInstance: freeNode(0xeddfb004:Freescale.std._encoder.avc.hw-based, handle=0xeddfb004)
06-12 09:40:26.020 3085 3140 I OMXPlayer: LEVEL: 1 FUNCTION: DeInitFilterComponent LINE: 2217
06-12 09:40:26.020 3085 3140 I OMXPlayer: DeInitFilterComponent: vpu close failure: ret=0x3
06-12 09:40:26.029 5053 5115 E StagefrightRecorder: Failed to create video encoder
06-12 09:40:26.029 5053 5115 D CameraSource: reset: E
06-12 09:40:26.032 5051 5051 E Camera2ClientBase: stopRecording: attempt to use a locked camera from a different process (old pid 5053, new pid 5905)
06-12 09:40:26.033 5053 5115 D CameraSource: reset: X
06-12 09:40:26.033 5905 5905 E MediaRecorder: start failed: -2147483648
06-12 09:40:26.034 5905 5905 E CAM_VideoModule: Could not start media recorder.
06-12 09:40:26.034 5905 5905 E CAM_VideoModule: java.lang.RuntimeException: start failed.
06-12 09:40:26.034 5905 5905 E CAM_VideoModule: at android.media.MediaRecorder.start(Native Method)
06-12 09:40:26.034 5905 5905 E CAM_VideoModule: at com.android.camera.VideoModule$11.onStorageUpdateDone(VideoModule.java:1401)
06-12 09:40:26.034 5905 5905 E CAM_VideoModule: at com.android.camera.CameraActivity$20.onPostExecute(CameraActivity.java:2348)
06-12 09:40:26.034 5905 5905 E CAM_VideoModule: at com.android.camera.CameraActivity$20.onPostExecute(CameraActivity.java:2333)
06-12 09:40:26.034 5905 5905 E CAM_VideoModule: at android.os.AsyncTask.finish(AsyncTask.java:695)
06-12 09:40:26.034 5905 5905 E CAM_VideoModule: at android.os.AsyncTask.access$600(AsyncTask.java:180)
06-12 09:40:26.034 5905 5905 E CAM_VideoModule: at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:712)
06-12 09:40:26.034 5905 5905 E CAM_VideoModule: at android.os.Handler.dispatchMessage(Handler.java:106)
06-12 09:40:26.034 5905 5905 E CAM_VideoModule: at android.os.Looper.loop(Looper.java:193)
06-12 09:40:26.034 5905 5905 E CAM_VideoModule: at android.app.ActivityThread.main(ActivityThread.java:6718)
06-12 09:40:26.034 5905 5905 E CAM_VideoModule: at java.lang.reflect.Method.invoke(Native Method)
06-12 09:40:26.034 5905 5905 E CAM_VideoModule: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
06-12 09:40:26.034 5905 5905 E CAM_VideoModule: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:917)
06-12 09:40:26.034 5905 5905 E CAM_FatalErrorHandler: Handling Camera Access Failure:
06-12 09:40:26.034 5905 5905 E CAM_FatalErrorHandler: java.lang.Exception
06-12 09:40:26.034 5905 5905 E CAM_FatalErrorHandler: at com.android.camera.FatalErrorHandlerImpl.onGenericCameraAccessFailure(FatalErrorHandlerImpl.java:84)
06-12 09:40:26.034 5905 5905 E CAM_FatalErrorHandler: at com.android.camera.VideoModule$11.onStorageUpdateDone(VideoModule.java:1404)
06-12 09:40:26.034 5905 5905 E CAM_FatalErrorHandler: at com.android.camera.CameraActivity$20.onPostExecute(CameraActivity.java:2348)
06-12 09:40:26.034 5905 5905 E CAM_FatalErrorHandler: at com.android.camera.CameraActivity$20.onPostExecute(CameraActivity.java:2333)
06-12 09:40:26.034 5905 5905 E CAM_FatalErrorHandler: at android.os.AsyncTask.finish(AsyncTask.java:695)
06-12 09:40:26.034 5905 5905 E CAM_FatalErrorHandler: at android.os.AsyncTask.access$600(AsyncTask.java:180)
06-12 09:40:26.034 5905 5905 E CAM_FatalErrorHandler: at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:712)
06-12 09:40:26.034 5905 5905 E CAM_FatalErrorHandler: at android.os.Handler.dispatchMessage(Handler.java:106)
06-12 09:40:26.034 5905 5905 E CAM_FatalErrorHandler: at android.os.Looper.loop(Looper.java:193)
06-12 09:40:26.034 5905 5905 E CAM_FatalErrorHandler: at android.app.ActivityThread.main(ActivityThread.java:6718)
06-12 09:40:26.034 5905 5905 E CAM_FatalErrorHandler: at java.lang.reflect.Method.invoke(Native Method)
06-12 09:40:26.034 5905 5905 E CAM_FatalErrorHandler: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
06-12 09:40:26.034 5905 5905 E CAM_FatalErrorHandler: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:917)
06-12 09:40:26.034 5905 5905 E CAM_CameraUtil: Show fatal error dialog
06-12 09:40:26.070 5111 6014 I FslCameraHAL: configure: w:320, h:240, sensor format:0x14, stream format:0x103, fps:30, num:3
06-12 09:40:26.104 5905 5905 I CAM_VideoModule: Releasing media recorder.
Hello Tang,
The codec is not supported your file attribute, apparently it refers to file includes accplus audio, and your android bsp doesn't install aacplus codec, for this special codec, you need to get NDA, you can contact local DFAE to get more detailed information about this.
Regards