client-sdk-android icon indicating copy to clipboard operation
client-sdk-android copied to clipboard

video image distorted when recording local video andsave

Open ocean2811 opened this issue 2 years ago • 2 comments

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. clone https://github.com/livekit/client-sdk-android/tree/main/sample-app-record-local
  2. Modify file sample-app-record-local/src/main/java/io/livekit/android/sample/record/MainActivity.kt
    room = LiveKit.create(
            appContext = applicationContext,
            options = RoomOptions(
                adaptiveStream = true,
                audioTrackCaptureDefaults = LocalAudioTrackOptions(
                    noiseSuppression = true,
                    echoCancellation = true,
                    autoGainControl = true,
                    highPassFilter = true,
                    typingNoiseDetection = true,
                ),
                videoTrackCaptureDefaults = LocalVideoTrackOptions(
                    deviceId = "",
                    position = CameraPosition.BACK,
                    captureParams = VideoCaptureParameter(1920, 1080, 30)
                ),
                audioTrackPublishDefaults = AudioTrackPublishDefaults(),
                videoTrackPublishDefaults = VideoTrackPublishDefaults(null, false)
            ),
            overrides = LiveKitOverrides(
                javaAudioDeviceModuleCustomizer = { builder ->
                    // Receive audio samples
                    builder.setSamplesReadyCallback { samples ->
                        videoFileRenderer?.onWebRtcAudioRecordSamplesReady(samples)
                    }
                }
            )
        )
  1. build and run
  2. See error

Additional context The suspicion may be related to my specified resolution captureParams = VideoCaptureParameter(1920, 1080, 30)

ocean2811 avatar Mar 29 '23 08:03 ocean2811

Hello, may I ask if you were able to record successfully? After recording, I found that the videos were all black with no screen and only sound.

RXlung avatar Jul 01 '24 02:07 RXlung