RenderHeads / UnityPlugin-AVProMovieCapture

AVPro Movie Capture is a Unity Plugin for advanced video capture to AVI/MP4/MOV files
https://renderheads.com/products/avpro-movie-capture/
49 stars 8 forks source link

[Android] Device does not support AVC High profile #347

Closed adfansong closed 9 months ago

adfansong commented 11 months ago

Describe the issue After StartCapture called, there're errors on my android TV.

Your Setup (please complete the following information):

Unity version: 2021.3.26 AVPro Video version (number and edition (trial/core/ultra/enterprise)): ultra 5.2.0 Operating system version: Android OS 9 / API-28 (PPR1.180610.011/20230102) Device model: DBZ1Pro Video specs (resolution, frame-rate, codec, file size): see logs To Reproduce Just StartCapture on TV.

``` 💬️ Manager.GetVideoCodecCapabilities - supported bitrates: 1-20,000,000 💬️ Manager.GetVideoCodecCapabilities - supported widths: 64-1,920 💬️ Manager.GetVideoCodecCapabilities - supported heights: 64-1,088 💬️ Manager.GetVideoCodecCapabilities - supported framerates: 0-960 💬️ Manager.GetVideoCodecCapabilities - width alignment: 16 💬️ Manager.GetVideoCodecCapabilities - height alignment: 16 💬️ Manager.GetVideoCodecCapabilities - complexity range: 0-0 💬️ Manager.GetVideoCodecCapabilities - quality range: 0-0 💬️ (PluginState.cpp:159) PluginState::TryAddVideoCodec(VideoCodec::HEVC) 💬️ (PluginState.cpp:169) PluginState::TryAddVideoCodec - HEVC codec is unavailable 💬️ (PluginInterface.cpp:70) AVPMC_CreateRecorderVideo - 5.1.5-full 💬️ (VideoRecorder.cpp:49) IVideoRecorder::newVideoRecorder - android api level is 28 💬️ (VideoRecorder.cpp:56) IVideoRecorder::newVideoRecorder - creating video recorder for API 28 💬️ (VideoRecorder.cpp:1082) VideoRecorder::createMuxer - creating file at: /storage/emulated/0/Android/data/com.DefaultCompany.testRec/files/Captures/ScreenCapture_2023-12-21_19-42-10_1920x1080.mp4 💬️ Manager.GetFormatAdjustmentForEncode - media codec name: OMX.amlogic.video.encoder.avc makeComponentInstance(OMX.amlogic.video.encoder.avc) in [omx@1.0-service](mailto:omx@1.0-service) process getEntryByName_2_num=0, componentName:OMX.amlogic.video.encoder.avc ion_open sucess IncreaseEntryNumByName pEntry->mNum=0, pEntry->mMaxNum:3,componentName:OMX.amlogic.video.encoder.avc AmAVUtils::getComponentRole isEncoder :1 mime:video/avc setParameter: StoreMetadataInBuffersParams.nPortIndex not input port! getExtensionIndex 1200 name="OMX.google.android.index.configureVideoTunnelMode" [OMX.amlogic.video.encoder.avc] using color format 0x13 in place of 0x7f420888 [OMX.amlogic.video.encoder.avc] setting color aspects failed even though codec advertises support [OMX.amlogic.video.encoder.avc] cannot encode color aspects. Ignoring. [OMX.amlogic.video.encoder.avc] setting HDRStaticInfo failed even though codec advertises support [OMX.amlogic.video.encoder.avc] cannot encode HDR static metadata. Ignoring. setupVideoEncoder succeeded AmAVUtils::isAudioExtendFormat input = video/avc AmAVUtils::isExtendFormat input = video/avc [OMX.amlogic.video.encoder.avc] getting color aspects failed even though codec advertises support getParameter(0xa2703bd4:amlogic.encoder.avc, ParamVideoIntraRefresh(0x6000006)) ERROR: UnsupportedIndex(0x8000101a) STATE_SET: OMX_StateLoaded => OMX_StateIdle : OMX.amlogic.video.encoder.avc STATE_TRANS: OMX_StateLoaded => OMX_StateIdle : OMX.amlogic.video.encoder.avc STATE_TRANS: OMX_StateLoaded => OMX_StateIdle : OMX.amlogic.video.encoder.avc STATE_TRANS: OMX_StateLoaded => OMX_StateIdle : OMX.amlogic.video.encoder.avc STATE_TRANS: OMX_StateLoaded => OMX_StateIdle : OMX.amlogic.video.encoder.avc STATE_TRANS: OMX_StateLoaded => OMX_StateIdle : OMX.amlogic.video.encoder.avc STATE_TRANS: OMX_StateLoaded => OMX_StateIdle : OMX.amlogic.video.encoder.avc STATE_TRANS: OMX_StateLoaded => OMX_StateIdle : OMX.amlogic.video.encoder.avc STATE_TRANS: OMX_StateLoaded => OMX_StateIdle : OMX.amlogic.video.encoder.avc STATE_TRANS: OMX_StateLoaded => OMX_StateIdle : OMX.amlogic.video.encoder.avc mVideoColorFormat :0x13, mVideoFrameRate: 30 mStoreMetaDataInBuffers:0 mVideoBitRate :10000000 Video frame height is not standard:1080 getParameter:437 OMX_IndexAmlogicVideoExtendCropScale get Parameter:bEnableScaling:0 param_extended->ui16ScaledWidth:0 Height:0,Flag:0, enableCroping:0, Left:0, right:0, top:0, bottom:0 set color space to GE2D_FORMAT_BT601 STATE_DONE: OMX_StateLoaded => OMX_StateIdle : OMX.amlogic.video.encoder.avc STATE_SET: OMX_StateIdle => OMX_StateExecuting : OMX.amlogic.video.encoder.avc STATE_TRANS: OMX_StateIdle => OMX_StateExecuting : OMX.amlogic.video.encoder.avc STATE_DONE: OMX_StateIdle => OMX_StateExecuting : OMX.amlogic.video.encoder.avc STATE_SET: OMX_StateExecuting => OMX_StateIdle : OMX.amlogic.video.encoder.avc OMX.amlogic.video.encoder.avc: flush input OMX.amlogic.video.encoder.avc: flush output STATE_TRANS: OMX_StateExecuting => OMX_StateIdle : OMX.amlogic.video.encoder.avc STATE_TRANS: OMX_StateExecuting => OMX_StateIdle : OMX.amlogic.video.encoder.avc STATE_DONE: OMX_StateExecuting => OMX_StateIdle : OMX.amlogic.video.encoder.avc STATE_SET: OMX_StateIdle => OMX_StateLoaded : OMX.amlogic.video.encoder.avc STATE_TRANS: OMX_StateIdle => OMX_StateLoaded : OMX.amlogic.video.encoder.avc STATE_TRANS: OMX_StateIdle => OMX_StateLoaded : OMX.amlogic.video.encoder.avc STATE_DONE: OMX_StateIdle => OMX_StateLoaded : OMX.amlogic.video.encoder.avc DecreaseEntryNumByName pEntry->mNum=1, pEntry->mMaxNum:3,componentName:OMX.amlogic.video.encoder.avc ~OmxVideoEncoder ~OmxComponent 256 : OMX.amlogic.video.encoder.avc 💬️ Manager.GetVideoCodecImageCapabilities - Colour format is YUV8_420 💬️ Manager.GetFormatAdjustmentForEncode - video format has changed 💬️ (VideoRecorder.cpp:503) VideoRecorder::createVideoCodec - Media format: 💬️ (VideoRecorder.cpp:504) VideoRecorder::createVideoCodec - MIME type: video/avc 💬️ (VideoRecorder.cpp:505) VideoRecorder::createVideoCodec - Width: 1920 💬️ (VideoRecorder.cpp:506) VideoRecorder::createVideoCodec - Height: 1080 💬️ (VideoRecorder.cpp:507) VideoRecorder::createVideoCodec - Frame rate: 30.000000 💬️ (VideoRecorder.cpp:508) VideoRecorder::createVideoCodec - Bitrate: 10000000 💬️ (VideoRecorder.cpp:509) VideoRecorder::createVideoCodec - I-Frame interval: 1.000000 💬️ (VideoRecorder.cpp:510) VideoRecorder::createVideoCodec - Stride: 1920 💬️ (VideoRecorder.cpp:511) VideoRecorder::createVideoCodec - Slice height: 1080 💬️ (VideoRecorder.cpp:512) VideoRecorder::createVideoCodec - Colour range: Limited 💬️ (VideoRecorder.cpp:513) VideoRecorder::createVideoCodec - Profile: 8 💬️ (VideoRecorder.cpp:514) VideoRecorder::createVideoCodec - Level: 800 makeComponentInstance(OMX.amlogic.video.encoder.avc) in [omx@1.0-service](mailto:omx@1.0-service) process getEntryByName_2_num=0, componentName:OMX.amlogic.video.encoder.avc ion_open sucess IncreaseEntryNumByName pEntry->mNum=0, pEntry->mMaxNum:3,componentName:OMX.amlogic.video.encoder.avc AmAVUtils::getComponentRole isEncoder :1 mime:video/avc setParameter: StoreMetadataInBuffersParams.nPortIndex not input port! getExtensionIndex 1200 name="OMX.google.android.index.configureVideoTunnelMode" [OMX.amlogic.video.encoder.avc] using color format 0x13 in place of 0x7f420888 [OMX.amlogic.video.encoder.avc] configureCodec returning error -61 DecreaseEntryNumByName pEntry->mNum=1, pEntry->mMaxNum:3,componentName:OMX.amlogic.video.encoder.avc ~OmxVideoEncoder ~OmxComponent 256 : OMX.amlogic.video.encoder.avc makeComponentInstance(OMX.amlogic.video.encoder.avc) in [omx@1.0-service](mailto:omx@1.0-service) process getEntryByName_2_num=0, componentName:OMX.amlogic.video.encoder.avc ion_open sucess IncreaseEntryNumByName pEntry->mNum=0, pEntry->mMaxNum:3,componentName:OMX.amlogic.video.encoder.avc configure: err(-61), failed with format: AMessage(what = 'conf', target = 4) = { string mime = "video/avc" int32_t width = 1920 int32_t height = 1080 float frame-rate = 30.000000 int32_t bitrate = 10000000 int32_t color-format = 2135033992 int32_t profile = 8 int32_t level = 2048 int32_t complexity = 100 int32_t color-range = 2 int32_t color-standard = 1 int32_t color-transfer = 3 float i-frame-interval = 1.000000 int32_t encoder = 1 } ❌ (VideoRecorder.cpp:531) VideoRecorder::createVideoCodec - failed to configure codec, error: -10000 - AMEDIA_ERROR_UNKNOWN DecreaseEntryNumByName pEntry->mNum=1, pEntry->mMaxNum:3,componentName:OMX.amlogic.video.encoder.avc ~OmxVideoEncoder ~OmxComponent 256 : OMX.amlogic.video.encoder.avc ```
Chris-RH commented 11 months ago

Can you reproduce this in a fresh project using just the AVPro Movie Capture Capture from Screen demo scene? Are you getting the error in both Vulkan and OpenGLES? Have you tried capturing a lower resolution? Are you able to capture an imagine sequence? The information in the log suggests that it supports 1,920x1,088 - Have you tried this resolution?

adfansong commented 11 months ago

1,920x1,088

Thanks for your reply.

1.I built Demo00-ScreenCapture as the lauch scene in a fresh project. 2.Vulkan and OpenGLES have same error. 3.I tried to set 640x480 in SelectRecordingResolution, the same. 4.Yes, I can get an imagine sequence. 5.1,920x1,088 the same error.

MorrisRH commented 11 months ago

The plugin doesn't appear to have updated to version 5.2.0 correctly as it's reporting version 5.1.5 when you start the capture as shown in your log here:

💬️ (PluginInterface.cpp:70) AVPMC_CreateRecorderVideo - 5.1.5-full

adfansong commented 11 months ago

The plugin doesn't appear to have updated to version 5.2.0 correctly as it's reporting version 5.1.5 when you start the capture as shown in your log here:

💬️ (PluginInterface.cpp:70) AVPMC_CreateRecorderVideo - 5.1.5-full

Thanks for your reply.

The log avove is saved using 5.1.7.

But the error log is the same using 5.2.0, so I didn't save the log again.

``` (PluginInterface.cpp:70) AVPMC_CreateRecorderVideo - 5.2.0-full 2023-12-22 09:50:17.057 6526-6553 AVProMovieCapture com.DefaultCompany.testRec I 💬️ (VideoRecorder.cpp:49) IVideoRecorder::newVideoRecorder - android api level is 28 2023-12-22 09:50:17.057 6526-6553 AVProMovieCapture com.DefaultCompany.testRec I 💬️ (VideoRecorder.cpp:56) IVideoRecorder::newVideoRecorder - creating video recorder for API 28 2023-12-22 09:50:17.058 6526-6553 AVProMovieCapture com.DefaultCompany.testRec I 💬️ (VideoRecorder.cpp:1102) VideoRecorder::createMuxer - creating file at: /storage/emulated/0/Android/data/com.DefaultCompany.testRec/files/Captures/ScreenCapture_2023-12-22_09-50-16_640x480.mp4 2023-12-22 09:50:17.059 6526-6553 AVProMovieCapture com.DefaultCompany.testRec I 💬️ Manager.GetFormatAdjustmentForEncode - media codec name: OMX.amlogic.video.encoder.avc 2023-12-22 09:50:17.062 3336-3385 OMXMaster media.codec I makeComponentInstance(OMX.amlogic.video.encoder.avc) in omx@1.0-service process 2023-12-22 09:50:17.063 3336-3385 OmxComponentManagerImpl media.codec D getEntryByName_2_num=0, componentName:OMX.amlogic.video.encoder.avc 2023-12-22 09:50:17.063 3336-3385 AmlogicVideoAVCEncoder media.codec I ion_open sucess 2023-12-22 09:50:17.063 3336-3385 OmxComponentManagerImpl media.codec D IncreaseEntryNumByName pEntry->mNum=0, pEntry->mMaxNum:3,componentName:OMX.amlogic.video.encoder.avc 2023-12-22 09:50:17.064 6526-6625 AmAVUtils com.DefaultCompany.testRec I AmAVUtils::getComponentRole isEncoder :1 mime:video/avc 2023-12-22 09:50:17.064 3336-3385 OmxVideoEncoder media.codec E setParameter: StoreMetadataInBuffersParams.nPortIndex not input port! 2023-12-22 09:50:17.065 3336-3385 OmxComponent media.codec D getExtensionIndex 1200 name="OMX.google.android.index.configureVideoTunnelMode" 2023-12-22 09:50:17.065 6526-6625 ACodec com.DefaultCompany.testRec I [OMX.amlogic.video.encoder.avc] using color format 0x13 in place of 0x7f420888 2023-12-22 09:50:17.066 6526-6625 ACodec com.DefaultCompany.testRec W [OMX.amlogic.video.encoder.avc] setting color aspects failed even though codec advertises support 2023-12-22 09:50:17.066 6526-6625 ACodec com.DefaultCompany.testRec I [OMX.amlogic.video.encoder.avc] cannot encode color aspects. Ignoring. 2023-12-22 09:50:17.066 6526-6625 ACodec com.DefaultCompany.testRec W [OMX.amlogic.video.encoder.avc] setting HDRStaticInfo failed even though codec advertises support 2023-12-22 09:50:17.066 6526-6625 ACodec com.DefaultCompany.testRec I [OMX.amlogic.video.encoder.avc] cannot encode HDR static metadata. Ignoring. 2023-12-22 09:50:17.066 6526-6625 ACodec com.DefaultCompany.testRec I setupVideoEncoder succeeded 2023-12-22 09:50:17.066 6526-6625 AmAVUtils com.DefaultCompany.testRec I AmAVUtils::isAudioExtendFormat input = video/avc 2023-12-22 09:50:17.066 6526-6625 AmAVUtils com.DefaultCompany.testRec I AmAVUtils::isExtendFormat input = video/avc 2023-12-22 09:50:17.067 6526-6625 ACodec com.DefaultCompany.testRec W [OMX.amlogic.video.encoder.avc] getting color aspects failed even though codec advertises support 2023-12-22 09:50:17.067 3336-3385 OMXNodeInstance media.codec E getParameter(0xb1403bd4:amlogic.encoder.avc, ParamVideoIntraRefresh(0x6000006)) ERROR: UnsupportedIndex(0x8000101a) 2023-12-22 09:50:17.072 3336-3385 OmxComponent media.codec I STATE_SET: OMX_StateLoaded => OMX_StateIdle : OMX.amlogic.video.encoder.avc 2023-12-22 09:50:17.072 3336-3385 OmxComponent media.codec I STATE_TRANS: OMX_StateLoaded => OMX_StateIdle : OMX.amlogic.video.encoder.avc 2023-12-22 09:50:17.077 3336-6627 OmxComponent media.codec I STATE_TRANS: OMX_StateLoaded => OMX_StateIdle : OMX.amlogic.video.encoder.avc 2023-12-22 09:50:17.077 3336-6627 OmxComponent media.codec I STATE_TRANS: OMX_StateLoaded => OMX_StateIdle : OMX.amlogic.video.encoder.avc 2023-12-22 09:50:17.077 3336-6627 OmxComponent media.codec I STATE_TRANS: OMX_StateLoaded => OMX_StateIdle : OMX.amlogic.video.encoder.avc 2023-12-22 09:50:17.078 3336-6627 OmxComponent media.codec I STATE_TRANS: OMX_StateLoaded => OMX_StateIdle : OMX.amlogic.video.encoder.avc 2023-12-22 09:50:17.079 3336-6627 OmxComponent media.codec I STATE_TRANS: OMX_StateLoaded => OMX_StateIdle : OMX.amlogic.video.encoder.avc 2023-12-22 09:50:17.080 3336-6627 OmxComponent media.codec I STATE_TRANS: OMX_StateLoaded => OMX_StateIdle : OMX.amlogic.video.encoder.avc 2023-12-22 09:50:17.080 3336-6627 OmxComponent media.codec I STATE_TRANS: OMX_StateLoaded => OMX_StateIdle : OMX.amlogic.video.encoder.avc 2023-12-22 09:50:17.081 3336-6627 OmxComponent media.codec I STATE_TRANS: OMX_StateLoaded => OMX_StateIdle : OMX.amlogic.video.encoder.avc 2023-12-22 09:50:17.081 3336-6627 AmlogicVideoAVCEncoder media.codec D mVideoColorFormat :0x13, mVideoFrameRate: 30 2023-12-22 09:50:17.081 3336-6627 AmlogicVideoAVCEncoder media.codec D mStoreMetaDataInBuffers:0 2023-12-22 09:50:17.081 3336-6627 AmlogicVideoAVCEncoder media.codec D mVideoBitRate :2500000 2023-12-22 09:50:17.081 3336-6627 AmlogicVideoAVCEncoder media.codec D Video frame size is 640 x 480 2023-12-22 09:50:17.081 3336-6627 OmxVideoEncoder media.codec I getParameter:437 OMX_IndexAmlogicVideoExtendCropScale 2023-12-22 09:50:17.081 3336-6627 AmlogicVideoAVCEncoder media.codec I get Parameter:bEnableScaling:0 param_extended->ui16ScaledWidth:0 Height:0,Flag:0, enableCroping:0, Left:0, right:0, top:0, bottom:0 2023-12-22 09:50:17.081 3336-6627 AmlogicVideoAVCEncoder media.codec D set color space to GE2D_FORMAT_BT601 2023-12-22 09:50:17.082 3336-6627 OmxComponent media.codec I STATE_DONE: OMX_StateLoaded => OMX_StateIdle : OMX.amlogic.video.encoder.avc 2023-12-22 09:50:17.083 3336-6627 OmxComponent media.codec I STATE_SET: OMX_StateIdle => OMX_StateExecuting : OMX.amlogic.video.encoder.avc 2023-12-22 09:50:17.083 3336-6627 OmxComponent media.codec I STATE_TRANS: OMX_StateIdle => OMX_StateExecuting : OMX.amlogic.video.encoder.avc 2023-12-22 09:50:17.083 3336-6627 OmxComponent media.codec I STATE_DONE: OMX_StateIdle => OMX_StateExecuting : OMX.amlogic.video.encoder.avc 2023-12-22 09:50:17.085 3336-6627 OmxComponent media.codec I STATE_SET: OMX_StateExecuting => OMX_StateIdle : OMX.amlogic.video.encoder.avc 2023-12-22 09:50:17.085 3336-6627 OmxComponent media.codec I OMX.amlogic.video.encoder.avc: flush input 2023-12-22 09:50:17.114 3336-6627 OmxComponent media.codec I OMX.amlogic.video.encoder.avc: flush output 2023-12-22 09:50:17.135 3336-6627 OmxComponent media.codec I STATE_TRANS: OMX_StateExecuting => OMX_StateIdle : OMX.amlogic.video.encoder.avc 2023-12-22 09:50:17.135 3336-6627 OmxComponent media.codec I STATE_TRANS: OMX_StateExecuting => OMX_StateIdle : OMX.amlogic.video.encoder.avc 2023-12-22 09:50:17.135 3336-6627 OmxComponent media.codec I STATE_DONE: OMX_StateExecuting => OMX_StateIdle : OMX.amlogic.video.encoder.avc 2023-12-22 09:50:17.136 3336-6627 OmxComponent media.codec I STATE_SET: OMX_StateIdle => OMX_StateLoaded : OMX.amlogic.video.encoder.avc 2023-12-22 09:50:17.136 3336-6627 OmxComponent media.codec I STATE_TRANS: OMX_StateIdle => OMX_StateLoaded : OMX.amlogic.video.encoder.avc 2023-12-22 09:50:17.137 3336-6627 OmxComponent media.codec I STATE_TRANS: OMX_StateIdle => OMX_StateLoaded : OMX.amlogic.video.encoder.avc 2023-12-22 09:50:17.137 3336-6627 OmxComponent media.codec I STATE_DONE: OMX_StateIdle => OMX_StateLoaded : OMX.amlogic.video.encoder.avc 2023-12-22 09:50:17.138 3336-3385 OmxComponentManagerImpl media.codec D DecreaseEntryNumByName pEntry->mNum=1, pEntry->mMaxNum:3,componentName:OMX.amlogic.video.encoder.avc 2023-12-22 09:50:17.138 3336-3385 OmxVideoEncoder media.codec D ~OmxVideoEncoder 2023-12-22 09:50:17.138 3336-3385 OmxComponent media.codec D ~OmxComponent 256 : OMX.amlogic.video.encoder.avc 2023-12-22 09:50:17.140 6526-6553 AVProMovieCapture com.DefaultCompany.testRec I 💬️ Manager.GetVideoCodecImageCapabilities - Colour format is YUV8_420 2023-12-22 09:50:17.140 6526-6553 AVProMovieCapture com.DefaultCompany.testRec I 💬️ (VideoRecorder.cpp:503) VideoRecorder::createVideoCodec - Media format: 2023-12-22 09:50:17.140 6526-6553 AVProMovieCapture com.DefaultCompany.testRec I 💬️ (VideoRecorder.cpp:504) VideoRecorder::createVideoCodec - MIME type: video/avc 2023-12-22 09:50:17.140 6526-6553 AVProMovieCapture com.DefaultCompany.testRec I 💬️ (VideoRecorder.cpp:505) VideoRecorder::createVideoCodec - Width: 640 2023-12-22 09:50:17.140 6526-6553 AVProMovieCapture com.DefaultCompany.testRec I 💬️ (VideoRecorder.cpp:506) VideoRecorder::createVideoCodec - Height: 480 2023-12-22 09:50:17.140 6526-6553 AVProMovieCapture com.DefaultCompany.testRec I 💬️ (VideoRecorder.cpp:507) VideoRecorder::createVideoCodec - Frame rate: 30.000000 2023-12-22 09:50:17.140 6526-6553 AVProMovieCapture com.DefaultCompany.testRec I 💬️ (VideoRecorder.cpp:508) VideoRecorder::createVideoCodec - Bitrate: 2500000 2023-12-22 09:50:17.140 6526-6553 AVProMovieCapture com.DefaultCompany.testRec I 💬️ (VideoRecorder.cpp:509) VideoRecorder::createVideoCodec - I-Frame interval: 1.000000 2023-12-22 09:50:17.140 6526-6553 AVProMovieCapture com.DefaultCompany.testRec I 💬️ (VideoRecorder.cpp:510) VideoRecorder::createVideoCodec - Stride: 640 2023-12-22 09:50:17.140 6526-6553 AVProMovieCapture com.DefaultCompany.testRec I 💬️ (VideoRecorder.cpp:511) VideoRecorder::createVideoCodec - Slice height: 480 2023-12-22 09:50:17.140 6526-6553 AVProMovieCapture com.DefaultCompany.testRec I 💬️ (VideoRecorder.cpp:512) VideoRecorder::createVideoCodec - Colour range: Limited 2023-12-22 09:50:17.140 6526-6553 AVProMovieCapture com.DefaultCompany.testRec I 💬️ (VideoRecorder.cpp:513) VideoRecorder::createVideoCodec - Profile: 8 2023-12-22 09:50:17.140 6526-6553 AVProMovieCapture com.DefaultCompany.testRec I 💬️ (VideoRecorder.cpp:514) VideoRecorder::createVideoCodec - Level: 100 2023-12-22 09:50:17.143 3336-3928 OMXMaster media.codec I makeComponentInstance(OMX.amlogic.video.encoder.avc) in omx@1.0-service process 2023-12-22 09:50:17.143 3336-3928 OmxComponentManagerImpl media.codec D getEntryByName_2_num=0, componentName:OMX.amlogic.video.encoder.avc 2023-12-22 09:50:17.143 3336-3928 AmlogicVideoAVCEncoder media.codec I ion_open sucess 2023-12-22 09:50:17.143 3336-3928 OmxComponentManagerImpl media.codec D IncreaseEntryNumByName pEntry->mNum=0, pEntry->mMaxNum:3,componentName:OMX.amlogic.video.encoder.avc 2023-12-22 09:50:17.144 6526-6631 AmAVUtils com.DefaultCompany.testRec I AmAVUtils::getComponentRole isEncoder :1 mime:video/avc 2023-12-22 09:50:17.144 3336-3928 OmxVideoEncoder media.codec E setParameter: StoreMetadataInBuffersParams.nPortIndex not input port! 2023-12-22 09:50:17.145 3336-3928 OmxComponent media.codec D getExtensionIndex 1200 name="OMX.google.android.index.configureVideoTunnelMode" 2023-12-22 09:50:17.145 6526-6631 ACodec com.DefaultCompany.testRec I [OMX.amlogic.video.encoder.avc] using color format 0x13 in place of 0x7f420888 2023-12-22 09:50:17.147 6526-6631 ACodec com.DefaultCompany.testRec E [OMX.amlogic.video.encoder.avc] configureCodec returning error -61 2023-12-22 09:50:17.148 3336-3928 OmxComponentManagerImpl media.codec D DecreaseEntryNumByName pEntry->mNum=1, pEntry->mMaxNum:3,componentName:OMX.amlogic.video.encoder.avc 2023-12-22 09:50:17.148 3336-3928 OmxVideoEncoder media.codec D ~OmxVideoEncoder 2023-12-22 09:50:17.148 3336-3928 OmxComponent media.codec D ~OmxComponent 256 : OMX.amlogic.video.encoder.avc 2023-12-22 09:50:17.150 3336-3928 OMXMaster media.codec I makeComponentInstance(OMX.amlogic.video.encoder.avc) in omx@1.0-service process 2023-12-22 09:50:17.150 3336-3928 OmxComponentManagerImpl media.codec D getEntryByName_2_num=0, componentName:OMX.amlogic.video.encoder.avc 2023-12-22 09:50:17.150 3336-3928 AmlogicVideoAVCEncoder media.codec I ion_open sucess 2023-12-22 09:50:17.150 3336-3928 OmxComponentManagerImpl media.codec D IncreaseEntryNumByName pEntry->mNum=0, pEntry->mMaxNum:3,componentName:OMX.amlogic.video.encoder.avc 2023-12-22 09:50:17.151 6526-6553 NdkMediaCodec com.DefaultCompany.testRec E configure: err(-61), failed with format: AMessage(what = 'conf', target = 4) = { string mime = "video/avc" int32_t width = 640 int32_t height = 480 float frame-rate = 30.000000 int32_t bitrate = 2500000 int32_t color-format = 2135033992 int32_t profile = 8 int32_t level = 256 int32_t complexity = 100 int32_t color-range = 2 int32_t color-standard = 1 int32_t color-transfer = 3 float i-frame-interval = 1.000000 int32_t encoder = 1 } 2023-12-22 09:50:17.151 6526-6553 AVProMovieCapture com.DefaultCompany.testRec I ❌ (VideoRecorder.cpp:531) VideoRecorder::createVideoCodec - failed to configure codec, error: -10000 - AMEDIA_ERROR_UNKNOWN ```
adfansong commented 11 months ago

I tried a mediacodec demo to capture videos, it's ok: https://github.com/weekend-y/mediacodec_demo/tree/master/MediaCodec_EncodeH264

Then I tried to set params above in the logs set by AVPRO, I found 'profile = 8' causing exception: mediaFormat.setInteger(MediaFormat.KEY_PROFILE, 8); // this cause MediaCodec$CodecException: Error 0xffffffc3

So is there a way for me to set profile in AVPRO to have a test?

adfansong commented 11 months ago

I tried to print profileLevel: ` // 获取所有编解码器的信息 MediaCodecList codecList = new MediaCodecList(MediaCodecList.ALL_CODECS); MediaCodecInfo[] codecInfos = codecList.getCodecInfos();

    for (MediaCodecInfo codecInfo : codecInfos) {
        if (!codecInfo.isEncoder()) {
            // 如果你只对编码器感兴趣,跳过解码器
            continue;
        }
        String[] types = codecInfo.getSupportedTypes();
        for (String type : types) {
            if (type.equalsIgnoreCase(MediaFormat.MIMETYPE_VIDEO_AVC)) {
                // 获取编解码器的能力信息
                MediaCodecInfo.CodecCapabilities capabilities = codecInfo.getCapabilitiesForType(type);
                // 遍历所有支持的profile和level
                for (MediaCodecInfo.CodecProfileLevel profileLevel : capabilities.profileLevels) {
                    int profile = profileLevel.profile;
                    int level = profileLevel.level;
                    // 根据profile和level的值,你可以进行相应的操作或显示
                    // 这里只是简单地打印出来
                    Log.d("MediaCodecInfo", "Profile: " + profile + ", Level: " + level);
                }
            }
        }
    }`

The log: MediaCodecInfo pid-13357 D Profile: 1, Level: 2048

Chris-RH commented 11 months ago

Are you able to find out what GPU the device has?

adfansong commented 11 months ago

Are you able to find out what GPU the device has?

Look at this, is it OK? image

device info link

MorrisRH commented 11 months ago

Thanks for investigating. This is the first Android device we've come across that doesn't support the AVC High profile. We'll add support for detecting the available profiles and choosing appropriately.

adfansong commented 11 months ago

Thanks for investigating. This is the first Android device we've come across that doesn't support the AVC High profile. We'll add support for detecting the available profiles and choosing appropriately.

OK, thanks for your support. Could you tell me when the next version will be released?

Chris-RH commented 9 months ago

AVPro Movie Capture 5.2.1 has been released. Please let us know if it has not fixed your issue.

adfansong commented 9 months ago

AVPro Movie Capture 5.2.1 has been released. Please let us know if it has not fixed your issue.

Thanks for your support.

I've updated it and there's no that error after running.