【问题标题】:Flutter Camera video recording throw error on Android 6.0.1Android 6.0.1 上的 Flutter Camera 视频录制抛出错误
【发布时间】:2020-10-21 16:47:54
【问题描述】:

我正在使用camera 插件在android 中拍照和录像。 在大多数具有高 api 的设备中一切正常,但是当我想在某些低 api 的设备中 startVideoRecordingstopVideoRecording 时出现错误。

这是我开始录制视频后得到的日志。

I/Timeline( 2896): Timeline: Activity_idle id: android.os.BinderProxy@22d8a63 time:49383500
I/Timeline( 2896): Timeline: Activity_idle id: android.os.BinderProxy@22d8a63 time:49384645
I/Timeline( 2896): Timeline: Activity_idle id: android.os.BinderProxy@22d8a63 time:49385598
I/CameraManagerGlobal( 2896): Connecting to camera service
I/CameraManager( 2896): Using legacy camera HAL.
I/CameraDeviceState( 2896): Legacy camera service transitioning to state CONFIGURING
I/RequestThread-0( 2896): Configure outputs: 2 surfaces configured.
D/Camera  ( 2896): app passed NULL surface
I/RequestThread-0( 2896): configureOutputs - set take picture size to 1920x1080
I/CameraDeviceState( 2896): Legacy camera service transitioning to state IDLE
I/RequestQueue( 2896): Repeating capture request set.
W/LegacyRequestMapper( 2896): convertRequestMetadata - control.awbRegions setting is not supported, ignoring value
W/LegacyRequestMapper( 2896): Only received metering rectangles with weight 0.
W/LegacyRequestMapper( 2896): Only received metering rectangles with weight 0.
I/CameraDeviceState( 2896): Legacy camera service transitioning to state CAPTURING
I/RequestQueue( 2896): Repeating capture request cancelled.
I/CameraDeviceState( 2896): Legacy camera service transitioning to state IDLE
E/CameraDevice-0-LE( 2896): Surface with size (w=1920, h=1080) and format 0x1 is not valid, size not in valid set: [1280x960, 1280x720, 640x480, 480x640, 352x288, 320x240, 240x320, 176x144, 144x176]
W/CameraDevice-JV-0( 2896): Stream configuration failed
E/CameraCaptureSession( 2896): Session 1: Failed to create capture session; configuration failed

Flutter Doctor -v 的日志:

[✓] Flutter (Channel stable, 1.22.1, on Mac OS X 10.14.6 18G5033, locale en-US)
    • Flutter version 1.22.1 at /Users/taleb/Developer/flutter
    • Framework revision f30b7f4db9 (13 days ago), 2020-10-08 10:06:30 -0700
    • Engine revision 75bef9f6c8
    • Dart version 2.10.1


[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at /Users/taleb/Library/Android/sdk
    • Platform android-30, build-tools 30.0.2
    • ANDROID_HOME = /Users/taleb/Library/Android/sdk
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.0, Build version 11A420a
    • CocoaPods version 1.8.3

[!] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6222593)

[!] IntelliJ IDEA Ultimate Edition (version 2019.3)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    • Dart plugin version 193.5731
    • For information about installing plugins, see
      https://flutter.dev/intellij-setup/#installing-the-plugins

[✓] Connected device (1 available)
    • P024 (mobile) • 192.168.43.200:5555 • android-arm • Android 6.0.1 (API 23)

! Doctor found issues in 2 categories.

【问题讨论】:

    标签: android flutter android-camera video-capture android-camera2


    【解决方案1】:

    尝试使用较低的CameraController预设值

    new CameraController(cameras[0], ResolutionPreset.low);
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-04-14
      • 2016-08-07
      • 1970-01-01
      • 1970-01-01
      • 2017-10-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多