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/
48 stars 8 forks source link

Cannot record on Android using Vulkan API - not supported yet #186

Closed Ogane001 closed 2 years ago

Ogane001 commented 2 years ago

Describe the bug Cannot record on Android Your Setup (please complete the following information):

To Reproduce Steps to reproduce the behavior:

  1. After opening the scene, build Demo03-CameraCapture for Android without making any changes. (The same problem occurs outside of this scene as well)

  2. Start recording During this recording, the FileSize does not increase and remains 0 after a number of seconds. 3.Ends recording A corrupt mp4 file with 0 bytes has been created in the destination of the video.

MorrisRH commented 2 years ago

Hey @Ogane001, can we get the full logcat output for the failed capture (details on how to grab it are here). It would also be really good to know what device it is you're using.

dom98111 commented 2 years ago

Hey @Ogane001, can we get the full logcat output for the failed capture (details on how to grab it are here). It would also be really good to know what device it is you're using.

Hello. I have the same problem. Of the errors only:

2022.07.29 15:02:19.430 1372 8092 Error C2AllocatorIon >>>SEC mapUsage Mapper1 1
2022.07.29 15:02:19.430 1372 8092 Error C2AllocatorIon >>>SEC C2AllocatorIon::mapUsage ion_is_legacy++++++++
2022.07.29 15:02:19.430 1372 8092 Error C2AllocatorIon >>>SEC mapUsage  0, 1

This error appears on Samsung s9+ (Android 10), On Redmi (Android 10) (Miui 12.0.11) everything is recorded perfectly and the recording files weigh more than 0 bytes

AndrewRH commented 2 years ago

@dom98111 could you please attach here the full log cat from ADB so we can work out the solution tot his problem :-) thanks!

dom98111 commented 2 years ago

@dom98111 could you please attach here the full log cat from ADB so we can work out the solution tot his problem :-) thanks!

logcat.txt

MorrisRH commented 2 years ago

Thanks @dom98111 From the output I can see that stop is being called almost immediately after start. This is due to one of the stop modes other than manual being used with a very low frame count or time. There is a little more information available here

dom98111 commented 2 years ago

Thanks @dom98111 From the output I can see that stop is being called almost immediately after start. This is due to one of the stop modes other than manual being used with a very low frame count or time. There is a little more information available here

So the file was recorded for 3 seconds. Isn't that enough? Everything works fine on my second phone

MorrisRH commented 2 years ago

I can see from the log output that the first frame hadn't been processed by the time stop was called. Are you using the stop mode settings or calling stop yourself?

It would be really helpful if you could tells us the following:

Do our demo scenes work on that device?

All our demo scenes have been tested on a Samsung A50 which has a similar specification (albeit not as good) to the S9+.

dom98111 commented 2 years ago

I can see from the log output that the first frame hadn't been processed by the time stop was called. Are you using the stop mode settings or calling stop yourself?

It would be really helpful if you could tells us the following:

  • what version of Unity you're using
  • which capture component you are using
  • how the capture component is set-up

Do our demo scenes work on that device?

All our demo scenes have been tested on a Samsung A50 which has a similar specification (albeit not as good) to the S9+.

unity 2021.3.5.f1 (with trial UnityPlugin-AVProMovieCapture version 5.0.1)

I am using capture from camera component

i am following the manual, when setting up it

I just tested two test scenes: Screen Capture and Camera Capture. After the recording starts, the video duration increases on the recording control panel, but the file size does not increase (the recording control panel displays 0.0 mb)

Everything works fine on the computer and the second (also worse) phone, but files weighing 0 mb are created here and that's it:(

Immediately after the recording starts, даже, на тестовых сценах, где я не менял дефолтные параметры, errors continue to be displayed to me:

2022.07.31 14:33:18.934 10299 14444 Error C2AllocatorIon >>>SEC mapUsage Mapper1 1 2022.07.31 14:33:18.935 10299 14444 Error ion ioctl c0044901 failed with code -1: Invalid argument 2022.07.31 14:33:18.935 10299 14444 Error C2AllocatorIon >>>SEC C2AllocatorIon::mapUsage ion_is_legacy++++++++ 2022.07.31 14:33:18.935 10299 14444 Error C2AllocatorIon >>>SEC mapUsage 0, 1

I advise you to pay attention to a similar case, also related to mp4 encoder: https://github.com/dbof10/Bitmp4/issues/3

dom98111 commented 2 years ago

I just bought the paid version of the Mobile edition, but it didn't help and there are problems in the same way :(

Ogane001 commented 2 years ago

Sorry for the delay. I will put my own because the error is different in my case.

logcat output 0001/01/01 00:00:00.000 -1 -1 Info --------- beginning of main 2022/08/01 09:22:53.602 25065 25065 Error pany.Myproject Not starting debugger since process cannot load the jdwp agent. 2022/08/01 09:22:53.671 25065 25065 Info Perf Connecting to perf service. 2022/08/01 09:22:53.676 25065 25065 Debug NetworkSecurityConfig No Network Security Config specified, using platform default 2022/08/01 09:22:53.676 25065 25065 Debug NetworkSecurityConfig No Network Security Config specified, using platform default 2022/08/01 09:22:53.718 25065 25065 Info Mono JNI_OnLoad called 2022/08/01 09:23:02.768 25065 25090 Info Unity MemoryManager: Using 'Dynamic Heap' Allocator. 2022/08/01 09:23:02.784 25065 25090 Info Unity SystemInfo CPU = ARM64 FP ASIMD AES, Cores = 8, Memory = 7697mb 2022/08/01 09:23:02.784 25065 25090 Info Unity SystemInfo ARM big.LITTLE configuration: 4 big (mask: 0xf0), 4 little (mask: 0xf) 2022/08/01 09:23:02.784 25065 25090 Info Unity ApplicationInfo com.DefaultCompany.Myproject6 version 0.1 build 7ba832c3-df8d-44ed-a29f-14bd454323d6 2022/08/01 09:23:02.784 25065 25090 Info Unity Built from '2020.3/staging' branch, Version '2020.3.32f1 (12f8b0834f07)', Build type 'Release', Scripting Backend 'mono', CPU 'armeabi-v7a', Stripping 'Disabled' 2022/08/01 09:23:02.828 25065 25090 Error libprocessgroup set_timerslack_ns write failed: Operation not permitted 2022/08/01 09:23:02.829 25065 25090 Info chatty uid=10325(com.DefaultCompany.Myproject6) UnityMain identical 14 lines 2022/08/01 09:23:02.829 25065 25090 Error libprocessgroup set_timerslack_ns write failed: Operation not permitted 2022/08/01 09:23:02.832 25065 25090 Info Unity Company Name: DefaultCompany 2022/08/01 09:23:02.832 25065 25090 Info Unity Product Name: My project (6) 2022/08/01 09:23:02.836 25065 25090 Debug vulkan searching for layers in '/data/app/~~GLlVXMkxIQp0CyA5IoW_0Q==/com.DefaultCompany.Myproject6-URg5pKhCY_DRtb8Jcs-09Q==/lib/arm' 2022/08/01 09:23:02.836 25065 25090 Debug vulkan searching for layers in '/data/app/~~GLlVXMkxIQp0CyA5IoW_0Q==/com.DefaultCompany.Myproject6-URg5pKhCY_DRtb8Jcs-09Q==/base.apk!/lib/armeabi-v7a' 2022/08/01 09:23:02.843 25065 25090 Info AdrenoVK-0 ===== BEGIN DUMP OF OVERRIDDEN SETTINGS ===== 2022/08/01 09:23:02.843 25065 25090 Info AdrenoVK-0 ===== END DUMP OF OVERRIDDEN SETTINGS ===== 2022/08/01 09:23:02.843 25065 25090 Info AdrenoVK-0 QUALCOMM build : 191610ae03, Ic907de5ed0 2022/08/01 09:23:02.843 25065 25090 Info AdrenoVK-0 Build Date : 09/17/20 2022/08/01 09:23:02.843 25065 25090 Info AdrenoVK-0 Shader Compiler Version : EV031.32.02.01 2022/08/01 09:23:02.843 25065 25090 Info AdrenoVK-0 Local Branch : 2022/08/01 09:23:02.843 25065 25090 Info AdrenoVK-0 Remote Branch : refs/tags/AU_LINUX_ANDROID_LA.UM.9.12.10.00.00.582.274 2022/08/01 09:23:02.843 25065 25090 Info AdrenoVK-0 Remote Branch : NONE 2022/08/01 09:23:02.843 25065 25090 Info AdrenoVK-0 Reconstruct Branch : NOTHING 2022/08/01 09:23:02.843 25065 25090 Info AdrenoVK-0 Build Config : S P 10.0.5 AArch32 2022/08/01 09:23:02.843 25065 25090 Info AdrenoVK-0 Driver Path : /vendor/lib/hw/vulkan.adreno.so 2022/08/01 09:23:02.846 25065 25090 Info AdrenoVK-0 QUALCOMM build : 191610ae03, Ic907de5ed0 2022/08/01 09:23:02.846 25065 25090 Info AdrenoVK-0 Build Date : 09/17/20 2022/08/01 09:23:02.846 25065 25090 Info AdrenoVK-0 Shader Compiler Version : EV031.32.02.01 2022/08/01 09:23:02.846 25065 25090 Info AdrenoVK-0 Local Branch : 2022/08/01 09:23:02.846 25065 25090 Info AdrenoVK-0 Remote Branch : refs/tags/AU_LINUX_ANDROID_LA.UM.9.12.10.00.00.582.274 2022/08/01 09:23:02.846 25065 25090 Info AdrenoVK-0 Remote Branch : NONE 2022/08/01 09:23:02.846 25065 25090 Info AdrenoVK-0 Reconstruct Branch : NOTHING 2022/08/01 09:23:02.846 25065 25090 Info AdrenoVK-0 Build Config : S P 10.0.5 AArch32 2022/08/01 09:23:02.846 25065 25090 Info AdrenoVK-0 Driver Path : /vendor/lib/hw/vulkan.adreno.so 2022/08/01 09:23:02.870 25065 25194 Debug Choreographer Attaching thread to JVM for AChoreographer 2022/08/01 09:23:02.872 25065 25195 Info SwappyDisplayManager Starting looper thread 2022/08/01 09:23:02.872 25065 25090 Verbose SwappyVk SwappyVk initialized for VkDevice 0xb61db950 using VK_GOOGLE_display_timing on Android 2022/08/01 09:23:02.872 25065 25090 Info SwappyVk Returning refresh duration of 16666666 nsec (approx 60.000002 Hz) 2022/08/01 09:23:02.876 25065 25090 Verbose MediaRouter Selecting route: RouteInfo{ name=モバイル デバイス, description=null, status=null, category=RouteCategory{ name=システム types=ROUTE_TYPE_LIVE_AUDIO ROUTE_TYPE_LIVE_VIDEO groupable=false }, supportedTypes=ROUTE_TYPE_LIVE_AUDIO ROUTE_TYPE_LIVE_VIDEO , presentationDisplay=null } 2022/08/01 09:23:02.882 25065 25090 Debug pany.Myproject PlayerBase::PlayerBase() 2022/08/01 09:23:02.882 25065 25090 Debug pany.Myproject TrackPlayerBase::TrackPlayerBase() 2022/08/01 09:23:02.882 25065 25090 Info libOpenSLES Emulating old channel mask behavior (ignoring positional mask 0x3, using default mask 0x3 based on channel count of 2) 2022/08/01 09:23:02.882 25065 25090 Warn AudioTrack set(): notificationFrames=-21 clamped to the range -1 to -8 2022/08/01 09:23:02.910 25065 25090 Info AudioTrack createTrack_l(0): AUDIO_OUTPUT_FLAG_FAST successful; frameCount 0 -> 1536 2022/08/01 09:23:02.912 25065 25065 Verbose MediaRouter Selecting route: RouteInfo{ name=モバイル デバイス, description=null, status=null, category=RouteCategory{ name=システム types=ROUTE_TYPE_LIVE_AUDIO ROUTE_TYPE_LIVE_VIDEO groupable=false }, supportedTypes=ROUTE_TYPE_LIVE_AUDIO ROUTE_TYPE_LIVE_VIDEO , presentationDisplay=null } 2022/08/01 09:23:03.010 25065 25090 Info MONO Getting locale 2022/08/01 09:23:03.010 25065 25090 Info Mono Locale ja-JP 2022/08/01 09:23:03.137 25065 25195 Info SwappyDisplayManager Terminating looper thread 2022/08/01 09:23:03.146 25065 25203 Info SwappyDisplayManager Starting looper thread 2022/08/01 09:23:03.146 25065 25090 Verbose SwappyVk SwappyVk initialized for VkDevice 0xb61db950 using VK_GOOGLE_display_timing on Android 2022/08/01 09:23:03.146 25065 25090 Info SwappyVk Returning refresh duration of 16666666 nsec (approx 60.000002 Hz) 2022/08/01 09:23:05.213 25065 25090 Info pany.Myproject Thread[16,tid=25090,Native,Thread*=0xe654fc10,peer=0x12c40600,"UnityMain"] recursive attempt to load library "/data/app/~~GLlVXMkxIQp0CyA5IoW_0Q==/com.DefaultCompany.Myproject6-URg5pKhCY_DRtb8Jcs-09Q==/lib/arm/libAVProMovieCaptureNative.so" 2022/08/01 09:23:05.215 25065 25090 Info AVProMovieCapture ⚠️ Vulkan API is not supported 2022/08/01 09:23:05.295 25065 25090 Info AVProMovieCapture 💬️ PluginState::TryAddVideoCodec H264 2022/08/01 09:23:05.297 25065 25212 Info OMXClient IOmx service obtained 2022/08/01 09:23:05.299 25065 25090 Info AVProMovieCapture 💬️ PluginState::TryAddVideoCodec HEVC 2022/08/01 09:23:05.302 25065 25218 Info OMXClient IOmx service obtained 2022/08/01 09:23:05.303 25065 25090 Info AVProMovieCapture 💬️ PluginState::TryAddAudioCodec AAC 2022/08/01 09:23:05.305 25065 25222 Debug CCodec allocate(c2.android.aac.encoder) 2022/08/01 09:23:05.306 25065 25222 Info Codec2Client Available Codec2 services: "software" 2022/08/01 09:23:05.308 25065 25222 Info CCodec Created component [c2.android.aac.encoder] 2022/08/01 09:23:05.308 25065 25222 Debug CCodecConfig read media type: audio/mp4a-latm 2022/08/01 09:23:05.309 25065 25222 Debug ReflectedParamUpdater extent() != 1 for single value type: algo.buffers.max-count.values 2022/08/01 09:23:05.309 25065 25222 Debug ReflectedParamUpdater extent() != 1 for single value type: output.subscribed-indices.values 2022/08/01 09:23:05.309 25065 25222 Debug ReflectedParamUpdater extent() != 1 for single value type: input.buffers.allocator-ids.values 2022/08/01 09:23:05.309 25065 25222 Debug ReflectedParamUpdater extent() != 1 for single value type: output.buffers.allocator-ids.values 2022/08/01 09:23:05.310 25065 25222 Debug ReflectedParamUpdater extent() != 1 for single value type: algo.buffers.allocator-ids.values 2022/08/01 09:23:05.310 25065 25222 Debug ReflectedParamUpdater extent() != 1 for single value type: output.buffers.pool-ids.values 2022/08/01 09:23:05.310 25065 25222 Debug ReflectedParamUpdater extent() != 1 for single value type: algo.buffers.pool-ids.values 2022/08/01 09:23:05.311 25065 25222 Info CCodecConfig query failed after returning 9 values (BAD_INDEX) 2022/08/01 09:23:05.311 25065 25222 Debug CCodecConfig c2 config diff is Dict { 2022/08/01 09:23:05.311 25065 25222 Debug CCodecConfig c2::u32 coded.bitrate.value = 64000 2022/08/01 09:23:05.311 25065 25222 Debug CCodecConfig c2::u32 coded.pl.level = 0 2022/08/01 09:23:05.311 25065 25222 Debug CCodecConfig c2::u32 coded.pl.profile = 8192 2022/08/01 09:23:05.311 25065 25222 Debug CCodecConfig c2::u32 coding.aac-sbr-mode.value = 3 2022/08/01 09:23:05.311 25065 25222 Debug CCodecConfig c2::u32 input.buffers.max-size.value = 2048 2022/08/01 09:23:05.311 25065 25222 Debug CCodecConfig c2::u32 input.delay.value = 0 2022/08/01 09:23:05.311 25065 25222 Debug CCodecConfig string input.media-type.value = "audio/raw" 2022/08/01 09:23:05.311 25065 25222 Debug CCodecConfig string output.media-type.value = "audio/mp4a-latm" 2022/08/01 09:23:05.311 25065 25222 Debug CCodecConfig c2::u32 raw.channel-count.value = 1 2022/08/01 09:23:05.311 25065 25222 Debug CCodecConfig c2::u32 raw.sample-rate.value = 44100 2022/08/01 09:23:05.311 25065 25222 Debug CCodecConfig } 2022/08/01 09:23:05.311 25065 25090 Info AVProMovieCapture 💬️ PluginAudioInputDevice::Init 0 2022/08/01 09:23:05.313 25065 25222 Info hw-BpHwBinder onLastStrongRef automatically unlinking death recipients 2022/08/01 09:23:05.315 25065 25090 Info Unity [AVProMovieCapture] Init version: 5.0.1 (plugin v5.0.1-trial) with GPU Adreno (TM) 650 Vulkan 1.1.0 [512.502.0] OS: Android OS 11 / API-30 (58.1.B.6.17/058001B006001701839133756) 2022/08/01 09:23:05.336 25065 25090 Debug CompatibilityChangeReporter Compat change id reported: 147600208; UID 10325; state: ENABLED 2022/08/01 09:23:09.956 25065 25090 Warn Unity [AVProMovieCapture] 'OutputPath.RelativeToProject' is not supported on Android, defaulting to 'OutputPath.RelativeToPeristentData' 2022/08/01 09:23:09.962 25065 25090 Info Unity [AVProMovieCapture]: finalDirectory = /storage/emulated/0/Android/data/com.DefaultCompany.Myproject6/files/Captures 2022/08/01 09:23:09.973 25065 25090 Info Unity [AVProMovieCapture] Start File Capture: 320x240 @ 30.00fps [RGBA32] vcodec:'H264' to file: '/storage/emulated/0/Android/data/com.DefaultCompany.Myproject6/files/Captures/MovieCapture_2022-08-01_09-23-09_320x240.mp4' 2022/08/01 09:23:09.974 25065 25090 Info AVProMovieCapture 💬️ AVPMC_CreateRecorderVideo - 5.0.1-trial 2022/08/01 09:23:09.974 25065 25090 Info AVProMovieCapture 💬️ IVideoRecorder::newVideoRecorder - android api level is 30 2022/08/01 09:23:09.974 25065 25090 Info AVProMovieCapture 💬️ IVideoRecorder::newVideoRecorder - creating video recorder for API 28 2022/08/01 09:23:09.975 25065 25090 Info AVProMovieCapture 💬️ VideoRecorderAPI28::createMuxer - creating file at: /storage/emulated/0/Android/data/com.DefaultCompany.Myproject6/files/Captures/MovieCapture_2022-08-01_09-23-09_320x240.mp4 2022/08/01 09:23:09.975 25065 25090 Debug MPEG4Writer PreAllocation disabled. fallocate : Operation not supported on transport endpoint, 95 2022/08/01 09:23:09.980 25065 25090 Warn AudioCapabilities Unsupported mime audio/mp4 2022/08/01 09:23:09.980 25065 25090 Warn VideoCapabilities Unsupported mime image/vnd.android.heic 2022/08/01 09:23:09.981 25065 25090 Warn VideoCapabilities Unrecognized profile/level 0/3 for video/mpeg2 2022/08/01 09:23:09.982 25065 25090 Warn VideoCapabilities Unrecognized profile/level 0/3 for video/mpeg2 2022/08/01 09:23:09.989 25065 25090 Info AVProMovieCapture 💬️ Manager.GetFormatAdjustmentForEncode - media codec name: OMX.qcom.video.encoder.avc 2022/08/01 09:23:09.989 25065 25090 Info AVProMovieCapture 💬️ Manager.GetFormatAdjustmentForEncode - supported bitrates: [1-220,000,000] 2022/08/01 09:23:09.989 25065 25090 Info AVProMovieCapture 💬️ Manager.GetFormatAdjustmentForEncode - supported widths: [128-8,192] 2022/08/01 09:23:09.989 25065 25090 Info AVProMovieCapture 💬️ Manager.GetFormatAdjustmentForEncode - supported heights: [128-8,192] 2022/08/01 09:23:09.989 25065 25090 Info AVProMovieCapture 💬️ Manager.GetFormatAdjustmentForEncode - width alignment: 2 2022/08/01 09:23:09.989 25065 25090 Info AVProMovieCapture 💬️ Manager.GetFormatAdjustmentForEncode - height alignment: 2 2022/08/01 09:23:09.990 25065 25090 Info AVProMovieCapture 💬️ VideoRecorderAPI28::createVideoCodec - Media format: 2022/08/01 09:23:09.990 25065 25090 Info AVProMovieCapture 💬️ VideoRecorderAPI28::createVideoCodec - MIME type: video/avc 2022/08/01 09:23:09.990 25065 25090 Info AVProMovieCapture 💬️ VideoRecorderAPI28::createVideoCodec - Width: 320 2022/08/01 09:23:09.990 25065 25090 Info AVProMovieCapture 💬️ VideoRecorderAPI28::createVideoCodec - Height: 240 2022/08/01 09:23:09.990 25065 25090 Info AVProMovieCapture 💬️ VideoRecorderAPI28::createVideoCodec - Frame rate: 30.000000 2022/08/01 09:23:09.990 25065 25090 Info AVProMovieCapture 💬️ VideoRecorderAPI28::createVideoCodec - Bitrate: 1250000 2022/08/01 09:23:09.990 25065 25090 Info AVProMovieCapture 💬️ VideoRecorderAPI28::createVideoCodec - I-Frame interval: 1.000000 2022/08/01 09:23:09.990 25065 25090 Info AVProMovieCapture 💬️ VideoRecorderAPI28::createVideoCodec - Stride: 320 2022/08/01 09:23:09.990 25065 25090 Info AVProMovieCapture 💬️ VideoRecorderAPI28::createVideoCodec - Slice height: 240 2022/08/01 09:23:09.992 25065 25237 Info OMXClient IOmx service obtained 2022/08/01 09:23:09.998 25065 25237 Info ExtendedACodec setupVideoEncoder() 2022/08/01 09:23:09.998 25065 25237 Warn OMXUtils do not know color format 0x7fa30c06 = 2141391878 2022/08/01 09:23:09.998 25065 25237 Warn OMXUtils do not know color format 0x7fa30c04 = 2141391876 2022/08/01 09:23:09.998 25065 25237 Warn OMXUtils do not know color format 0x7fa30c00 = 2141391872 2022/08/01 09:23:09.999 25065 25237 Warn OMXUtils do not know color format 0x7fa30c09 = 2141391881 2022/08/01 09:23:09.999 25065 25237 Warn OMXUtils do not know color format 0x7fa30c0a = 2141391882 2022/08/01 09:23:09.999 25065 25237 Warn OMXUtils do not know color format 0x7fa30c08 = 2141391880 2022/08/01 09:23:09.999 25065 25237 Warn OMXUtils do not know color format 0x7fa30c07 = 2141391879 2022/08/01 09:23:09.999 25065 25237 Warn OMXUtils do not know color format 0x7f000789 = 2130708361 2022/08/01 09:23:09.999 25065 25237 Info ACodec [OMX.qcom.video.encoder.avc] using color format 0x15 in place of 0x7f420888 2022/08/01 09:23:10.000 25065 25237 Info ACodec setupAVCEncoderParameters with [profile: High] [level: Level1] 2022/08/01 09:23:10.001 25065 25237 Info ACodec [OMX.qcom.video.encoder.avc] cannot encode HDR static metadata. Ignoring. 2022/08/01 09:23:10.001 25065 25237 Info ACodec setupVideoEncoder succeeded 2022/08/01 09:23:10.001 25065 25237 Info ExtendedACodec [OMX.qcom.video.encoder.avc] configure, AMessage : AMessage(what = 'conf', target = 11) = { 2022/08/01 09:23:10.001 25065 25237 Info ExtendedACodec string mime = "video/avc" 2022/08/01 09:23:10.001 25065 25237 Info ExtendedACodec int32_t width = 320 2022/08/01 09:23:10.001 25065 25237 Info ExtendedACodec int32_t height = 240 2022/08/01 09:23:10.001 25065 25237 Info ExtendedACodec float frame-rate = 30.000000 2022/08/01 09:23:10.001 25065 25237 Info ExtendedACodec int32_t bitrate = 1250000 2022/08/01 09:23:10.001 25065 25237 Info ExtendedACodec int32_t color-format = 2135033992 2022/08/01 09:23:10.001 25065 25237 Info ExtendedACodec int32_t color-range = 1 2022/08/01 09:23:10.001 25065 25237 Info ExtendedACodec int32_t color-standard = 1 2022/08/01 09:23:10.001 25065 25237 Info ExtendedACodec int32_t color-transfer = 3 2022/08/01 09:23:10.001 25065 25237 Info ExtendedACodec float i-frame-interval = 1.000000 2022/08/01 09:23:10.001 25065 25237 Info ExtendedACodec int32_t flags = 1 2022/08/01 09:23:10.001 25065 25237 Info ExtendedACodec int32_t encoder = 1 2022/08/01 09:23:10.001 25065 25237 Info ExtendedACodec } 2022/08/01 09:23:10.006 25065 25090 Info AVProMovieCapture 💬️ VideoRecorderAPI28::createVideoCodec - Color format: COLOR_FormatYUV420SemiPlanar 2022/08/01 09:23:10.006 25065 25235 Info MediaCodec MediaCodec will operate in async mode 2022/08/01 09:23:10.014 25065 25090 Info AVProMovieCapture 💬️ PluginState::RegisterRecorder - Registered handle 2192 2022/08/01 09:23:10.014 25065 25090 Info AVProMovieCapture 💬️ AVPMC_CreateRecorderVideo: newRecorderHandle = 2192 2022/08/01 09:23:14.818 25065 25090 Info Unity [AVProMovieCapture] Stopping capture 2192 2022/08/01 09:23:14.819 25065 25241 Info AVProMovieCapture 💬️ VideoRecorderAPI28::videoCaptureThread - got input buffer of size: 393216 2022/08/01 09:23:16.441 25065 25083 Warn MessageQueue Handler (android.hardware.display.DisplayManagerGlobal$DisplayListenerDelegate) {657b129} sending message to a Handler on a dead thread 2022/08/01 09:23:16.441 25065 25083 Warn MessageQueue java.lang.IllegalStateException: Handler (android.hardware.display.DisplayManagerGlobal$DisplayListenerDelegate) {657b129} sending message to a Handler on a dead thread 2022/08/01 09:23:16.441 25065 25083 Warn MessageQueue at android.os.MessageQueue.enqueueMessage(MessageQueue.java:563) 2022/08/01 09:23:16.441 25065 25083 Warn MessageQueue at android.os.Handler.enqueueMessage(Handler.java:778) 2022/08/01 09:23:16.441 25065 25083 Warn MessageQueue at android.os.Handler.sendMessageAtTime(Handler.java:727) 2022/08/01 09:23:16.441 25065 25083 Warn MessageQueue at android.os.Handler.sendMessageDelayed(Handler.java:697) 2022/08/01 09:23:16.441 25065 25083 Warn MessageQueue at android.os.Handler.sendMessage(Handler.java:635) 2022/08/01 09:23:16.441 25065 25083 Warn MessageQueue at android.hardware.display.DisplayManagerGlobal$DisplayListenerDelegate.sendDisplayEvent(DisplayManagerGlobal.java:722) 2022/08/01 09:23:16.441 25065 25083 Warn MessageQueue at android.hardware.display.DisplayManagerGlobal.handleDisplayEvent(DisplayManagerGlobal.java:351) 2022/08/01 09:23:16.441 25065 25083 Warn MessageQueue at android.hardware.display.DisplayManagerGlobal.access$200(DisplayManagerGlobal.java:55) 2022/08/01 09:23:16.441 25065 25083 Warn MessageQueue at android.hardware.display.DisplayManagerGlobal$DisplayManagerCallback.onDisplayEvent(DisplayManagerGlobal.java:708) 2022/08/01 09:23:16.441 25065 25083 Warn MessageQueue at android.hardware.display.IDisplayManagerCallback$Stub.onTransact(IDisplayManagerCallback.java:84) 2022/08/01 09:23:16.441 25065 25083 Warn MessageQueue at android.os.Binder.execTransactInternal(Binder.java:1159) 2022/08/01 09:23:16.441 25065 25083 Warn MessageQueue at android.os.Binder.execTransact(Binder.java:1123) 2022/08/01 09:23:16.463 25065 25090 Debug pany.Myproject PlayerBase::stop() from IPlayer 2022/08/01 09:23:16.464 25065 25090 Debug AudioTrack stop(381): called with 647424 frames delivered 2022/08/01 09:23:16.721 25065 25246 Info AdrenoGLES-0 QUALCOMM build : 191610ae03, Ic907de5ed0 2022/08/01 09:23:16.721 25065 25246 Info AdrenoGLES-0 Build Date : 09/17/20 2022/08/01 09:23:16.721 25065 25246 Info AdrenoGLES-0 OpenGL ES Shader Compiler Version: EV031.32.02.01 2022/08/01 09:23:16.721 25065 25246 Info AdrenoGLES-0 Local Branch : 2022/08/01 09:23:16.721 25065 25246 Info AdrenoGLES-0 Remote Branch : refs/tags/AU_LINUX_ANDROID_LA.UM.9.12.10.00.00.582.274 2022/08/01 09:23:16.721 25065 25246 Info AdrenoGLES-0 Remote Branch : NONE 2022/08/01 09:23:16.721 25065 25246 Info AdrenoGLES-0 Reconstruct Branch : NOTHING 2022/08/01 09:23:16.721 25065 25246 Info AdrenoGLES-0 Build Config : S P 10.0.5 AArch32 2022/08/01 09:23:16.721 25065 25246 Info AdrenoGLES-0 Driver Path : /vendor/lib/egl/libGLESv2_adreno.so 2022/08/01 09:23:16.732 25065 25246 Info AdrenoGLES-0 PFP: 0x016dd091, ME: 0x00000000 2022/08/01 09:23:16.880 25065 25203 Info SwappyDisplayManager Terminating looper thread
Ogane001 commented 2 years ago

Device used is SonyXperia 1 II

Chris-RH commented 2 years ago

Have you made sure to remove Vulkan from the API list in player settings?

MorrisRH commented 2 years ago

Hey @Ogane001, thanks for sending that on. I can see the following line in the output: 2022/08/01 09:23:05.215 25065 25090 Info AVProMovieCapture ⚠️ Vulkan API is not supported

We're working on Vulkan support but it is not available yet. Please make sure "Auto Graphics API" is unchecked and OpenGLES3 is top of the list of graphics APIs in the Android player inspector as shown below:

Screenshot 2022-08-01 at 08 43 07
Fighter0286 commented 2 years ago

Hello, I also have the same problem. I cannot record videos on Android. The recording size is always 0KB, and the video file is damaged and cannot be opened.

MorrisRH commented 2 years ago

Hey @dom98111, have you tried capturing using the H264 video codec? Have you tried capturing with Audio set to none?

MorrisRH commented 2 years ago

Hey @Fighter0286, please provide as much information as possible including the following:

Fighter0286 commented 2 years ago

嘿@Fighter0286,请提供尽可能多的信息,包括以下内容:

  • 统一版 unity 2020.3.35f1c2
  • 设备品牌和型号 小米8
  • 安卓版 Android 10
  • 使用的捕获组件 Capture Form Camera
  • 用于捕获组件的设置 设置没有过的的修改,您的手册为主,测试demo和自己的demo表现相同。
  • 失败捕获的 logcat 输出 在unity上面没有任何报错信息。
Chris-RH commented 2 years ago

"Unified version of unity 2020.3.35f1c2 Device Brand and Model Mi 8 Android version Android 10 Capture Components Used Capture Form Camera Settings used to capture components Set up unmodified, your manual is the main, the test demo and your own demo behave the same. The logcat output of the failed capture has no error message on Unity."

@Fighter0286

So you are saying that this has happened using an Mi8 phone and the capture from camera demo?

Can you follow the process to get an logcat from here please: https://www.renderheads.com/content/docs/AVProVideo/articles/platform-android.html#collecting-logs The windows tool mentioned mlogcat is really helpful for showing us more information

Fighter0286 commented 2 years ago

“统一版unity 2020.3.35f1c2 设备品牌和型号 Mi 8 Android 版 Android 10 捕获组件 使用捕获表单 相机设置 用于捕获组件 设置未经修改,您的手册是主要的,测试演示和您自己的演示行为相同。失败捕获的 logcat 输出在 Unity 上没有错误消息。

@Fighter0286

所以你是说这是使用Mi8手机和相机演示捕获的吗?

你能按照这个过程从这里获得logcat吗: https://www.renderheads.com/content/docs/AVProVideo/articles/platform-android.html#collecting-logs 提到的windows工具mlogcat对于向我们展示更多信息真的很有帮助

我不知道是否正确,但这是我的log,请您查看 log.txt

MorrisRH commented 2 years ago

Hey @Fighter0286, you're using the Vulkan API which is not supported yet. Please see here

dom98111 commented 2 years ago

Hey @dom98111, have you tried capturing using the H264 video codec?

Have you tried capturing with Audio set to none?

Yes, I tried h264 and different audio recording options and delay before start, but everything is exactly the same. Does not work on s9 :(

Chris-RH commented 2 years ago

@dom98111 And this is opening a clean project and just running one of the demo scenes without any changes, apart from removing Vulkan from the graphics API list?

dom98111 commented 2 years ago

@dom98111 And this is opening a clean project and just running one of the demo scenes without any changes, apart from removing Vulkan from the graphics API list?

Yes, deleting Vulkan helped me, although it wasn't in the logs. Thank you so much for your help in solving the problem

Chris-RH commented 2 years ago

Thanks for letting us know :)