This message was deleted.
# helpdesk
s
This message was deleted.
f
You can look for "quality drop" logs in server logs. It will have • track direction • reason for the quality drop • quality score • rating (3-bar rating) corresponding to above score • stats in the current window and previous window That should give a picture of why the quality drops happen. For a participant, all track qualities are calculated once every 5 seconds and the lowest of the all the tracks is taken as participant score (along the lines of "a chain is only as strong as its weakest link", hence taking the lowest). The scoring code is in https://github.com/livekit/livekit/blob/master/pkg/sfu/connectionquality/scorer.go
b
nice, thanks @fancy-wire-61616 I'm using LK cloud, do you know how I access the server logs? I can see the analytics for the most recent session here (though I doubt others can see this page if you don't work for LK). The quality score was 3.6. Generally AV was alright but for most of the session the other participant's connection was reported as poor.
d
@boundless-salesclerk-13461 which version of Flutter SDK are you using? judging by how quickly the client became connected, it is strange the quality score got so low. I wonder if this is a bug with Flutter publishing.
b
Hi @dry-elephant-14928 thanks for having a look. livekit_client: ^1.4.0 I've modified the dependency tree and was able to upgrade to 1.5.1. Will update w/results here after the next testing session today.
f
The screen share audio track stopped sending data. That caused the quality to get stuck at low.
🙏 1
b
Some additional context:
Copy code
// LiveKit options
  final bool _simulcast = true;
  final bool _adaptiveStream = true;
  final bool _dynacast = true;
  final bool _fastConnect = true;
  final bool _e2ee = false;
Copy code
// Video Quality
  final VideoDimensions _videoDimensions = VideoDimensionsPresets.h1080_169;
  final VideoParameters _videoParameters = VideoParametersPresets.h1080_169;
  final TLKVideoCodec _videoCodec = TLKVideoCodec.vp9;
  final int _videoMbps = 2;
  final int _maxVideoFramerate = 30;
  final int _maxScreenShareFramerate = 15;
Copy code
// Camera capture options
      CameraCaptureOptions cco = CameraCaptureOptions(
        maxFrameRate: _maxVideoFramerate.toDouble(),
        cameraPosition: CameraPosition.front,
        params: VideoParameters(
          dimensions: _videoDimensions,
          encoding: VideoEncoding(
            maxBitrate: _videoMbps * 1000 * 1000,
            maxFramerate: _maxVideoFramerate,
          ),
        ),
      );

      // Video publishing options
      VideoPublishOptions vpo = VideoPublishOptions(
        videoEncoding: _videoParameters.encoding,
        simulcast: _simulcast,
        videoCodec: _videoCodec.toString(),
        videoSimulcastLayers: [
          VideoParametersPresets.h180_169,
          VideoParametersPresets.h360_169,
          VideoParametersPresets.h720_169,
        ],
      );
f
VP9 is super new @boundless-salesclerk-13461. cc: @freezing-lifeguard-43174 for confirmation on usage of VP9 and simulcast layers. One of the issue in the session is that screen share track was unpublished, but the screen share audio track was not unpublished. So, to the server it looked like the track went dry. Looking forward to test results from latest client SDK to see if that same thing happens. TPF, if you can try screen share with the latest client SDK also, that will be great.
b
yep, will do
🙇🏽 1
f
Additional things here to validate • VP9 dynacast + adaptive streaming - are the layers enabled/disabled correctly? • Is the server detecting active layers properly and using it in scoring properly? If the video looks good, it is possible that some path between active layer detection and scorer is not quite right yet for SVC codecs.
Got the latest session from @boundless-salesclerk-13461 https://cloud.livekit.io/projects/p_29nbncftzzi/sessions/RM_5m3FyNiFR8fp From looking at that, there are a couple of issues I think 1. The screen share video track quality drops to
POOR
. I think that is a known issue , i. e. libwebrtc does not do multiple spatial resolutions when using VP9 with screen share. @early-gigabyte-44411 recently added a change in JS SDK to limit it to L1T3. I think we need to ensure a. Do the limitation in other SDKs (BTW, this is using VP9 which TPF has enabled for his project). b. Ensure
AddTrack
adjusts for that even if the application is asking for more layers. Otherwise, quality scorer on server side will have a mismatch, i. e. scorer will expect up to three layers, but will ever see only one. 2. Seems like screen share audio track does not unpublish properly. So, it is causing scorer to declare
POOR
quality five seconds after track end as scorer will see no data when the track is still active from server's point of view.
b
@fancy-wire-61616 thank you for pushing this forward @freezing-lifeguard-43174 let me know if I can answer any questions
f
@freezing-lifeguard-43174 (cc: @polite-kilobyte-67570) @boundless-salesclerk-13461 is running into one more issue with screen share received quality. I had suggested disabling simulcast for screen share. We had a bit of back and forth and I also checked with Lukas the way to turn off screen share simulcast and passed it on to TPF. Here is his settings
Copy code
class TLKSessionConfig {
  String serverUri = '';
  String sharedKey = '';

  // Video config
  int videoMbps = 2;
  TLKVideoCodec videoCodec = TLKVideoCodec.vp8;
  int maxVideoFramerate = 30;
  VideoDimensions videoDimensions = VideoDimensionsPresets.h1080_169;
  List<VideoParameters> simulcastLayers = [VideoParametersPresets.h540_169];

  // Screenshare config
  VideoParameters videoParameters = VideoParametersPresets.h1080_169;
  int maxScreenShareFramerate = 30;
  List<VideoParameters> screenshareSimulcastLayers = [];

  // Stream prefs
  bool adaptiveStream = true;
  bool dynacast = true;
  bool e2ee = false;

  // Simulcast
  bool simulcast = true;

  // UI Prefs
  bool fastConnect = true;
  bool showDebugControls = false;
  bool showStats = false;
}
Yet, the published screen share is simulcast. Can you suggest the correct settings for disabling simulcast of screen share track?
f
okay, I just checked the flutter sdk, and it seems that there is no separate publishOptions setting for screen sharing. @boundless-salesclerk-13461 Can you try setting simulcast = false in defaultVideoPublishOptions to verify this issue? or try this steps
Copy code
var screenTrack = await LocalVideoTrack.createScreenShareTrack(...);
await localParticipant.publishVideoTrack(screenTrack, const VideoPublishOptions(simulcast: false));
b
@freezing-lifeguard-43174 I've made the following two changes:
Copy code
var videoPublishOptions = room.roomOptions.defaultVideoPublishOptions.copyWith(
          screenShareSimulcastLayers: [],
          simulcast: false,
        );
        LocalVideoTrack track = await LocalVideoTrack.createScreenShareTrack(options);
        await participant!.publishVideoTrack(track, publishOptions: videoPublishOptions);
Copy code
# livekit_client: ^1.5.1
  livekit_client:
   git:
    url: <https://github.com/livekit/client-sdk-flutter.git>
    ref: main
Will report with results soon
hey, also @freezing-lifeguard-43174 should I report screen share quality results for vp9 or 8?
ok, that looks much better. Here's the session for reference
🙏 1
note: that was vp8. here is vp9, also looks right
🙌 2
f
awesome, thank you for confirming.
b
Hi, unrelated question, I'm seeing an incorrect value returned for this line:
Hardware.instance.selectedVideoInput?.deviceId;
In
room.dart:750
:
Copy code
/// Get current video input device.
  String? get selectedVideoInputDeviceId =>
      roomOptions.defaultCameraCaptureOptions.deviceId ??
      Hardware.instance.selectedVideoInput?.deviceId;
This is in the git referenced
client-sdk-flutter
Running on web in Chrome on Sonoma
Happy to file an issue if preferred...
f
Please file an issue @boundless-salesclerk-13461. Easier to track. 🙂
👍 1