Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bounty] implement device control and make --use-all-monitors work #1380

Open
louis030195 opened this issue Feb 17, 2025 · 2 comments
Open
Labels
💎 Bounty enhancement New feature or request

Comments

@louis030195
Copy link
Collaborator

louis030195 commented Feb 17, 2025

context:

had implemented a device manager that allows you to start and stop audio device recording or monitor recording using HTTP API

https://github.com/mediar-ai/screenpipe/tree/af0042683a0c7fd15d78d286da97ab9c1610af00

https://github.com/mediar-ai/screenpipe/blob/af0042683a0c7fd15d78d286da97ab9c1610af00/screenpipe-core/src/devices.rs

had to revert because it was memory leaking:

54ed2f1

memory has always been leaking a little bit (eg go from 4 gb to 5 gb after running for 5 days roughly) but it was reaching 10 gb after 3 days roughly (not acceptable)

previous implementation with dashmap had deadlocks (and only supported audio), usually we prefer to use channels

this feature is useful to improve the experience for:

  1. people switching audio device and monitor devices regularly (commuting for work etc.) (e.g. --use-all-monitors argument to always record all monitors for example)
  2. privacy preserving use cases
  3. control resource usage dynamically
  4. other use cases

definition of done:

  • --use-all-monitors always record all monitor available, and stop recording when it's unplugged
  • running screenpipe for 3 days, while having meetings, working, etc. and the memory stays under 4.5 gb, and CPU roughly the same (10-30% on my mac book pro m4 max)
  • /audio/start, /audio/stop, /audio/list, /vision/start, /vision/stop, /vision/list

make this work reliably and prove it's not memory leaking

/bounty 400

bonus bounty:

  • --use-all-default-audio-devices always record all default audio devices
  • very good tests, good benchmarks of memory over time somehow, idk
@louis030195 louis030195 added the enhancement New feature or request label Feb 17, 2025
@louis030195 louis030195 pinned this issue Feb 17, 2025
Copy link

algora-pbc bot commented Feb 17, 2025

💎 $400 bounty • Screenpi.pe

Steps to solve:

  1. Start working: Comment /attempt #1380 with your implementation plan
  2. Submit work: Create a pull request including /claim #1380 in the PR body to claim the bounty
  3. Receive payment: 100% of the bounty is received 2-5 days post-reward. Make sure you are eligible for payouts

Thank you for contributing to mediar-ai/screenpipe!

Add a bountyShare on socials

Attempt Started (GMT+0) Solution
🟢 @Ayush9026 Feb 17, 2025, 9:14:25 PM WIP

@Ayush9026
Copy link

Ayush9026 commented Feb 17, 2025

/attempt #1380

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💎 Bounty enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants