natario1 / CameraView

📸 A well documented, high-level Android interface that makes capturing pictures and videos easy, addressing all of the common issues and needs. Real-time filters, gestures, watermarks, frame processing, RAW, output of any size.
https://natario1.github.io/CameraView
Other
4.88k stars 921 forks source link

TakeVideo returns a corrupted file (green video) with a Huawei Android 10 #1166

Open MkGrimaldos opened 2 years ago

MkGrimaldos commented 2 years ago

Describe the bug

When you take a video using Camera2 and with cameraVideoSizeAspectRatio="1:1" in the CameraView, it returns a corrupted file (green video) with a Huawei Android 10

To Reproduce

Steps to reproduce the behavior, possibly in the demo app:

  1. With cameraVideoSizeAspectRatio="1:1" and app:cameraEngine="camera2" in the activity_camera.xml
  2. Click on Edit and select Mode Video
  3. Click on captureVideo
  4. See error (video preview is a corrupted green video)

Expected behavior

Video preview should show a normal video

XML layout

Part of the XML layout with the CameraView declaration, so we can read its attributes.

<com.otaliastudios.cameraview.CameraView
    android:id="@+id/camera"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="center"
    android:layout_marginBottom="88dp"
    android:keepScreenOn="true"
    app:cameraExperimental="true"
    app:cameraEngine="camera2"
    app:cameraPreview="glSurface"
    app:cameraPlaySounds="true"
    app:cameraGrid="off"
    app:cameraFlash="auto"
    app:cameraAudio="on"
    app:cameraFacing="back"
    app:cameraGestureTap="autoFocus"
    app:cameraGestureLongTap="none"
    app:cameraGesturePinch="zoom"
    app:cameraGestureScrollHorizontal="filterControl1"
    app:cameraGestureScrollVertical="exposureCorrection"
    app:cameraMode="picture"
    app:cameraAutoFocusMarker="@string/cameraview_default_autofocus_marker"
    app:cameraVideoSizeAspectRatio="1:1">
...
</CameraView>

Screenshots

imagen

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had activity in the last 20 days. It will be closed if no further activity occurs within the next seven days. Thank you for your contributions.

1136346879 commented 10 months ago

hello, Is the issue solved? I now have a green screen when opening the preview on my Huawei phone

1136346879 commented 10 months ago

dc55fe4969bc8364cb77bd5238ccd638

1136346879 commented 10 months ago

4f7793ec467fafab08643b248dc39c3f