Skip to content

Conversation

mumair5393
Copy link
Contributor

@mumair5393 mumair5393 commented Aug 29, 2025

This PR includes:

  1. Setting the target size of the screenshot to 1280 x 720, this is size of the thumbnails used for crisper image quality.
image

@mumair5393 mumair5393 requested a review from iparaskev as a code owner August 29, 2025 22:57
Copy link

netlify bot commented Aug 29, 2025

Deploy Preview for hoppdocs ready!

Name Link
🔨 Latest commit 974a5e4
🔍 Latest deploy log https://app.netlify.com/projects/hoppdocs/deploys/68b2304221aa270008957a41
😎 Deploy Preview https://deploy-preview-42--hoppdocs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@CLAassistant
Copy link

CLAassistant commented Aug 29, 2025

CLA assistant check
All committers have signed the CLA.

@iparaskev
Copy link
Contributor

Thanks for the PR @mumair5393. The code change looks fine. I will test it locally tomorrow and if everything is good, I will merge it.

@iparaskev
Copy link
Contributor

iparaskev commented Aug 30, 2025

There is a problem, increasing the res is increasing the time it takes to get the screenshots (the example is for two monitors).

current res

screenshot_capture_callback: resize time taken: 193.101417ms
screenshot_capture_callback: jpeg time taken: 51.941584ms
screenshot_capture_callback: base64 time taken: 259.875µs
screenshot_capture_callback: resize time taken: 144.864708ms
screenshot_capture_callback: jpeg time taken: 35.109834ms
screenshot_capture_callback: base64 time taken: 174.417µs
get_available_content: time taken: 1.371769833s

pr

screenshot_capture_callback: resize time taken: 674.498875ms
screenshot_capture_callback: jpeg time taken: 370.916792ms
screenshot_capture_callback: base64 time taken: 1.03425ms
screenshot_capture_callback: resize time taken: 502.04275ms
screenshot_capture_callback: jpeg time taken: 254.418875ms
screenshot_capture_callback: base64 time taken: 925.042µs
get_available_content: time taken: 2.838736042s

no resize

screenshot_capture_callback: resize time taken: 42ns
screenshot_capture_callback: jpeg time taken: 1.7547145s
screenshot_capture_callback: base64 time taken: 2.9925ms
screenshot_capture_callback: resize time taken: 125ns
screenshot_capture_callback: jpeg time taken: 1.724862125s
screenshot_capture_callback: base64 time taken: 4.614917ms
get_available_content: time taken: 4.412101208s

We could explore the following solutions:

  • Get each screenshot in a separate thread.
  • Skip the conversion to jpeg? Probably we will need to use <canvas> instead of <img> here.

If you can think of something else, feel free to try.

@iparaskev
Copy link
Contributor

iparaskev commented Aug 30, 2025

In case you don't know it, you can test your changes just by running the core process.

task livekit:start-server
task core:dev

then from a different shell

cd core/tests
export LIVEKIT_URL="ws://localhost:7880"
export LIVEKIT_API_KEY=devkey
export LIVEKIT_API_SECRET=secret
cargo run -- screenshare

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants