Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Video recording get stuck after recording #3346

Open
3 of 5 tasks
bibhuti9 opened this issue Dec 31, 2024 · 2 comments
Open
3 of 5 tasks

🐛 Video recording get stuck after recording #3346

bibhuti9 opened this issue Dec 31, 2024 · 2 comments
Labels
🐛 bug Something isn't working

Comments

@bibhuti9
Copy link

What's happening?

when I try to record the video the recording getting stuck this is only in motrola phones.
I have tested the same flow with other phones they are working fine.

Reproduceable Code

const camera = useRef<Camera>(null);


const handleRecordVideo = async () => {
    try {
      camera.current.startRecording({
        flash: 'on',
        onRecordingFinished: video => {
          setVideoPath(video.path);
        },
        onRecordingError: error => console.error(error),
      });
    } catch (e) {
      console.log(e);
    }
  };


  <Camera
          ref={camera}
          style={[styles.camera, styles.photoAndVideoCamera]}
          device={device as CameraDevice}
          isActive
          video={true}
        />


### Relevant log output

```shell
There is no any error and when I try to stop the recording there is no any output as well.

Camera Device

{
  "formats": [],
  "sensorOrientation": "landscape-left",
  "hardwareLevel": "full",
  "maxZoom": 8,
  "minZoom": 1,
  "maxExposure": 24,
  "supportsLowLightBoost": false,
  "neutralZoom": 1,
  "physicalDevices": [
    "wide-angle-camera"
  ],
  "supportsFocus": true,
  "supportsRawCapture": false,
  "isMultiCam": false,
  "minFocusDistance": 10,
  "minExposure": -24,
  "name": "0 (BACK) androidx.camera.camera2",
  "hasFlash": true,
  "hasTorch": true,
  "position": "back",
  "id": "0"
}

Device

moto g34 5G

VisionCamera Version

4.3.2

Can you reproduce this issue in the VisionCamera Example app?

Yes, I can reproduce the same issue in the Example app here

Additional information

@bibhuti9 bibhuti9 added the 🐛 bug Something isn't working label Dec 31, 2024
Copy link

Guten Tag, Hans here! 🍻

Thanks for providing detailed information about your issue with video recording on Motorola phones. It seems like there might be a specific problem with those devices, since you mentioned it works fine on others.

However, I see that you didn't provide any error logs when the recording gets stuck. This would really help mrousavy in diagnosing the issue. Please collect logs using adb logcat while reproducing the problem and share them here. This will give us more context to solve the issue effectively.

Looking forward to your update!

Note: If you think I made a mistake, please ping @mrousavy to take a look.

@bibhuti9
Copy link
Author

bibhuti9 commented Jan 1, 2025

Hey thanks for look into this issue here is the adb logs

01-01 13:16:51.410  1572 20957 E QC2V4l2Driver: [avcE_8618] failed to set format on port:IN
01-01 13:16:51.410  1572 20957 E QC2V4l2Codec: [avcE_8618] Failed to set resolution and buffer size for IN port err - 12
01-01 13:16:51.410  1572 20957 E QC2Comp : [avcE_8618] configureCodec: Failed to set updated param raw.size
01-01 13:16:51.410  1572 20957 E QC2Comp : [avcE_8618] codec failed to configure: err - 12
01-01 13:16:51.411 18840 20946 E MediaCodec: Codec reported err 0xfffffff4/NO_MEMORY, actionCode 0, while in state 5/STARTING
01-01 13:16:51.416  1949  3105 E Codec2-ComponentInterface: We have a failed config
01-01 13:16:51.420  1867 19395 E ResourceManagerService: getLowestPriorityBiggestClient_l: lowest priority 0 vs caller priority 0
01-01 13:16:51.434  1572  3127 E VendorCaps: Failed to read platform default max picture width
01-01 13:16:51.434  1572  3127 E VendorCaps: Failed to read platform default max picture width
01-01 13:16:51.436  1572  3128 E QC2Interface: Failed to query parameters
01-01 13:16:51.454  1572  3127 E QC2Interface: Failed to query parameters
01-01 13:16:51.461  1572  3127 E VendorCaps: Failed to read platform default max picture width
01-01 13:16:51.461  1572  3127 E VendorCaps: Failed to read platform default max picture width
01-01 13:16:51.462  1572  3124 E QC2Interface: Failed to query parameters
01-01 13:16:51.463  1572  3124 E QC2Interface: Failed to query parameters
01-01 13:16:51.615  1512  1554 E FMQ     : grantorIdx must be less than 3
01-01 13:16:51.615  1512  1554 E FMQ     : grantorIdx must be less than 3
01-01 13:16:52.135 18840 18853 E BufferQueueConsumer: [GraphicBufferSource](id:499800000014,api:4,p:1843,c:18840) acquireBuffer: max acquired buffer count reached: 17 (max 16)
01-01 13:16:52.135 18840 18853 E GraphicBufferSource: onFrameAvailable: acquireBuffer returned err=-38
01-01 13:16:52.175 18840 18853 E BufferQueueConsumer: [GraphicBufferSource](id:499800000014,api:4,p:1843,c:18840) acquireBuffer: max acquired buffer count reached: 17 (max 16)
01-01 13:16:52.175 18840 18853 E GraphicBufferSource: onFrameAvailable: acquireBuffer returned err=-38
01-01 13:16:52.200 18840 18853 E BufferQueueConsumer: [GraphicBufferSource](id:499800000014,api:4,p:1843,c:18840) acquireBuffer: max acquired buffer count reached: 17 (max 16)
01-01 13:16:52.200 18840 18853 E GraphicBufferSource: onFrameAvailable: acquireBuffer returned err=-38
01-01 13:16:52.236 18840 19494 E BufferQueueConsumer: [GraphicBufferSource](id:499800000014,api:4,p:1843,c:18840) acquireBuffer: max acquired buffer count reached: 17 (max 16)
01-01 13:16:52.236 18840 19494 E GraphicBufferSource: onFrameAvailable: acquireBuffer returned err=-38
01-01 13:16:52.273 18840 19494 E BufferQueueConsumer: [GraphicBufferSource](id:499800000014,api:4,p:1843,c:18840) acquireBuffer: max acquired buffer count reached: 17 (max 16)
01-01 13:16:52.273 18840 19494 E GraphicBufferSource: onFrameAvailable: acquireBuffer returned err=-38
01-01 13:16:52.315 18840 19494 E BufferQueueConsumer: [GraphicBufferSource](id:499800000014,api:4,p:1843,c:18840) acquireBuffer: max acquired buffer count reached: 17 (max 16)
01-01 13:16:52.315 18840 19494 E GraphicBufferSource: onFrameAvailable: acquireBuffer returned err=-38
01-01 13:16:52.343 18840 18853 E BufferQueueConsumer: [GraphicBufferSource](id:499800000014,api:4,p:1843,c:18840) acquireBuffer: max acquired buffer count reached: 17 (max 16)
01-01 13:16:52.343 18840 18853 E GraphicBufferSource: onFrameAvailable: acquireBuffer returned err=-38
01-01 13:16:53.344  1601  2612 E SurfaceFlinger: Permission Denial: can't access SurfaceFlinger pid=18840, uid=10617
01-01 13:16:53.344  1843 20959 E Camera3-OutputStream: getBufferLockedCommon: Stream 2: Can't dequeue next output buffer: Connection timed out (-110)
01-01 13:16:54.345  1601  1731 E SurfaceFlinger: Permission Denial: can't access SurfaceFlinger pid=18840, uid=10617
01-01 13:16:54.345  1843 20959 E Camera3-OutputStream: getBufferLockedCommon: Stream 2: Can't dequeue next output buffer: Connection timed out (-110)
01-01 13:16:55.346  1601  2612 E SurfaceFlinger: Permission Denial: can't access SurfaceFlinger pid=18840, uid=10617
01-01 13:16:55.346  1843 20959 E Camera3-OutputStream: getBufferLockedCommon: Stream 2: Can't dequeue next output buffer: Connection timed out (-110)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant