client-sdk-android
client-sdk-android copied to clipboard
video image distorted when recording local video andsave
Describe the bug A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior:
- clone https://github.com/livekit/client-sdk-android/tree/main/sample-app-record-local
- 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)
}
}
)
)
- build and run
- See error
Additional context
The suspicion may be related to my specified resolution captureParams = VideoCaptureParameter(1920, 1080, 30)
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.