GithubHelp home page GithubHelp logo

0ky / screenclip Goto Github PK

View Code? Open in Web Editor NEW
18.0 18.0 5.0 902 KB

An experimental video snipping tool for Windows, designed as a system tray application.

License: MIT License

Rust 29.60% CSS 6.79% HTML 20.34% JavaScript 43.27%
application desktop rust screenshot system-tray tauri vanilla-javascript video windows

screenclip's Introduction

An image of @0ky's Holopin badges, which is a link to view their full Holopin profile

screenclip's People

Contributors

0ky avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

screenclip's Issues

[TODO] Implement persistent settings

In the frontend (UI) there are video settings for the encoder and hotkeys (not yet implemented), using Tauri's plugin-store I would like to save these locally in a file such as .settings.dat.

Reading Settings:

  • Upon application initialization in the backend (Rust side), read the settings from the appropriate data storage file using Tauri's plugin-store.
  • Pass these settings to the frontend using Tauri's IPC window.emit().
  • On the web frontend (UI), capture these settings and apply them to the UI accordingly.

Writing/Updating Settings:

  • When a user makes changes to the settings in the UI, capture these changes.
  • Send the updated settings from the frontend to the backend using Tauri's IPC invoke().
  • On the backend, process these changes and persist them to the data storage using Tauri's plugin-store.

  • If settings file does not exist or it's an empty file, apply default settings.
  • When you make changes to either the hotkey or settings, use the existing Framework7 library immediately create a sticky button to save or discard changes.

If you have suggestions for a better implementation, feel free to share your ideas.

[TODO] Implement hotkeys feature

The current behavior is that the PrintScreen key is hardcoded to call region_selection_window() function that takes a single screenshot.

Instead, upon initialization of the application, it should read settings[1] and apply hotkeys from it, you will need to handle errors, such as conflicting hotkey from another application.

  • In the web frontend (UI) work with Framework7 to implement hotkey input fields for video capture Start/Stop, Screenshot and Quickshot.
  • In the frontend create a function to capture a hotkey upon pressing the input field in the hotkey section.
  • The captured/changed hotkeys should be sent to the backend (Rust) using invoke() to process the changes (apply them) after user clicks on save[2] button from the frontend.

[1] The "settings" is a file created using the Tauri Plugin Store which is not yet implemented, it relates to issue #6
[2] The save/discard buttons for the frontend UI will most likely be implemented after #6

[TODO] Force frontend (UI) even dimensions for video capture region selection.

When selecting the Video clip menu to capture a video, a fully transparent region capture window will appear, when selecting an area it should snap only to even dimensions. This should be done only in the frontend (regionselect.js) by making changes to the Cropper.js library, use the appropriate event method.

Note: When encoding video using the H.264 codec, the commonly used pixel format is the YUV420 and this requires that both the height and width resolutions be divisible by 2.

ffmpeg fails to run custom build command

Hi, while trying to run your project I get following error:

error: failed to run custom build command for ffmpeg-sys-next v6.0.1

Caused by:

process didn't exit successfully: C:\Projekte\Screenclip\src-tauri\target\debug\build\ffmpeg-sys-next-7a328b218e4e81a8\build-script-build (exit code: 101)

Is it a known error you have been through as well? I followed the instructions to set up ffmpeg using the gnu toolchain.

Thanks for helping.

[TODO] Implement audio capture

  • Capture audio data from a selectable option of sources (e.g., system audio, microphone, or both) using WASAPI (Windows Audio Session API).
  • Encode audio using the AAC codec.
  • Take the encoded video and audio streams and multiplex them into a single .mp4 container.
  • Ensure that audio and video are synchronized by testing the capture using an AV sync test video
  • UI/UX Considerations, provide appropriate UI controls:
    • Allow users to select audio sources (system audio, microphone, or both).
    • Provide feedback mechanisms, like audio meters, to show real-time audio levels.
    • Give users the option to toggle mute the audio source.

Note: We currently use video-rs a high-level abstraction of ffmpeg-next to encode video, unfortunately there is no audio API implemented, you may need to leverage ffmpeg-next for audio encoding/muxing. You may want to utilize entirely on another crate to encode/mux both video/audio sources, which will require rewriting the existing encode_frames function.

[TODO] Frontend (UI) - Show X, Y, Width and Height values when selecting an area

Similar to the following image, that should also include X,Y at the top left corner of it:
image

If capturing or moving the selection area to the edge or corners of the screen causes the values to become clipped, it should snap into the other side of the selection area.

This will most likely require you to utilize the existing Cropper.js library.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.