项目作者: wlawt

项目描述 :
ClipIt — Snipping Tool for Videos, easily share videos
高级语言: Python
项目地址: git://github.com/wlawt/clipit.git
创建时间: 2021-01-03T20:00:30Z
项目社区:https://github.com/wlawt/clipit

开源协议:

下载



ClipIt - Snipping Tool for Videos

# ClipIt — Snipping Tool for Videos 📎

ClipIt

Largely inspired by frustrations in my academic workflows, I wanted a way to
easily share explanations/concepts with my friends, just like how I use
Snipping Tool.

ClipIt is built ontop of this idea with the goal of making it easy to share
videos clips with others.


ClipIt Demo

How it works

The screen recording is handled by a python script, clip.py, which uses
OpenCV and listens for a keypress to start/stop the recording. For my use,
this is set as F4 and F8 to start and stop the recording, respectively. Addition:
Microphone support is enabled when you hit F4 and will stop recording audio input
when F8 is pressed. Ffmpeg is used to stitch together the audio and video clip.

This is editable in the clip.py file, found in the root of the project.

The frontend used Next.js, as it this was also a learning opportunity for me
to try out new JS frameworks.

One of the major design decisions was to minimize the footprint and make it intuitive
as Snipping Tool or Lightshot. The idea is to serve these video clips via a
link through an ngrok tunnel and send the link with the latest clip.

Using ClipIt

Install dependencies

  1. pip install -r requirements.txt
  2. pip install pipwin
  3. pipwin install pyaudio
  4. cd clipit
  5. npm install

Start servers

  1. python clip.py // In root
  2. cd clipit
  3. npm run dev
  4. npm run ngrok

Implementation challenges

One particular challenge I faced was running functions concurrently. It turns out
that python Thread or Multiprocessing libraries have a slight delay in the
execution of the functions (recording Audio and Video), which doesn’t meet my UX requirements. I found that
I had to press F8 twice inorder to end the Audio recording. However, as this comment
suggested, the Ray library is able to run both the Audio and Video recording functions at the same time.

Contribution

I’m always open to improving the quality of this project. If there’s a feature request,
performance improvement, or bug fixes that you found, feel free to submit a PR!