client-sdk-flutter
client-sdk-flutter copied to clipboard
[Question] Why my screen sharing is distorted when resize?
Hi, I have use screen share function recently in my project, but when I share, thumbnail preview and video sharing are distorted, although Livekit Client example is totally fine. I copy same room configuration from example to my project. Below is description video:
https://github.com/livekit/client-sdk-flutter/assets/83997264/43c52d0e-98fc-41ca-a3a6-a6a8a05c36c1
I think it's not from my server side because I test with example is fine. I don't know why it's happened. Below is my configuration:
RoomOptions(
adaptiveStream: false,
dynacast: false,
defaultAudioPublishOptions: const AudioPublishOptions(
name: 'custom_audio_track_name',
),
defaultVideoPublishOptions: VideoPublishOptions(
simulcast: false,
videoCodec: 'VP8',
backupVideoCodec: BackupVideoCodec(
enabled: false,
),
),
defaultScreenShareCaptureOptions: const ScreenShareCaptureOptions(
useiOSBroadcastExtension: true,
params: VideoParameters(
dimensions: VideoDimensions(1280, 720),
encoding: VideoEncoding(
maxBitrate: 3 * 1000 * 1000,
maxFramerate: 15,
))),
defaultCameraCaptureOptions: CameraCaptureOptions(maxFrameRate: 30),
),
final source = await showDialog<DesktopCapturerSource>(
context: context,
builder: (context) => ScreenSelectDialog(),
);
if (source == null) {
setState(() => _isSharingScreen = false);
context.read<CallProvider>().unhideViewCall();
return;
}
var track = await LocalVideoTrack.createScreenShareTrack(
ScreenShareCaptureOptions(
sourceId: source.id,
maxFrameRate: 15,
),
);
Livekit Client: 2.1.0 Flutter SDK: Flutter 3.16.9
Thank you!
@cloudwebrtc why did you react without replying me 😭
hey @thaidmfinnick , Sorry for the late reply, this should be caused by libwebrtc aligning the height x width to 4 times when collecting the change window. I will check it.
thanks for your response! I will wait.
Hi @cloudwebrtc, any update on this issue? I have updated to Livekit v2.2.0, issue still exists on MacOS.
Quick question, are you using an Intel or Apple silicon Mac? I remember there was a bug in early Intel computers where the capture width/height didn't align, but it seems to have been fixed if I remember correctly.
I'm using Apple silicon Mac (m1 pro 2020). It is still an error (I have updated to livekit 2.2.4)
Hi @cloudwebrtc, any update on this issue?
Hey @cloudwebrtc, just wondering if there’s been any progress?