Skip to content

vichitra-paheli/shears

Repository files navigation

Shears

A Chrome extension for scrubbing through web videos and saving clips as .webm files. Built for creating video generation datasets, grabbing reference footage, or pulling review cuts -- fast.

Zero dependencies. No build step. Just load it and clip.

Chrome License

Screenshots

Scan for Videos Video Detected Clipping Overlay Batch Mode
Popup Detected Overlay Batch

Features

  • Scan any page for <video> elements (including Shadow DOM)
  • Visual timeline with draggable IN/OUT handles
  • Frame-accurate scrubbing with keyboard shortcuts
  • Batch mode -- queue multiple clips and record them all at once
  • Resolution control -- downsample to 720p, 480p, or 360p
  • Organized output -- clips save to Downloads/shears-clips/ with configurable prefixes

Install

From Release (recommended)

  1. Go to the latest release
  2. Download shears-v*.zip
  3. Extract the zip to a folder on your machine
  4. Open chrome://extensions/ in Chrome
  5. Enable Developer mode (top-right toggle)
  6. Click Load unpacked and select the extracted folder
  7. The Shears icon appears in your toolbar

From Source

  1. Clone the repository: git clone https://github.com/vichitra-paheli/shears.git
  2. Open chrome://extensions/ in Chrome
  3. Enable Developer mode (top-right toggle)
  4. Click Load unpacked and select the shears folder
  5. The Shears icon appears in your toolbar

Quick Start

  1. Navigate to a page with video
  2. Click the Shears icon in your toolbar
  3. Click Scan for Videos
  4. Click a detected video to open the clipper overlay
  5. Set your IN and OUT points
  6. Click Clip & Save (or press R) to record and download

Setting IN/OUT Points

There are four ways to set clip boundaries:

Method How
Buttons Click Set IN / Set OUT while the video plays
Keyboard Press I or O at the current playhead position
Timeline Drag the purple handles on the timeline bar
Type directly Click the IN, OUT, or Seek time fields, type a value, press Enter

Time Input Formats

All time fields accept:

  • m:ss.ms -- e.g. 1:23.500 (1 min 23.5 sec)
  • m:ss -- e.g. 2:05
  • Plain seconds -- e.g. 83.5 or 120

Keyboard Shortcuts

Key Action
I Set IN point
O Set OUT point
Space Play / Pause
Left / Right Step one frame
Shift + Left / Right Jump 5 seconds
Q Queue current clip (batch mode)
R Record and save clip

Batch Mode

For building datasets quickly:

  1. Set IN/OUT points for a segment
  2. Press Q (or click + Queue Clip) to add it to the batch
  3. Repeat for as many segments as you need
  4. Click Record All to process the queue -- clips are recorded sequentially and saved automatically

Configuration

  • Prefix -- Set a filename prefix (e.g. take1, ref_shot) for organized output
  • Resolution -- Downsample output to 720p, 480p, or 360p to save disk space

Output

Clips save to Downloads/shears-clips/ as:

{prefix}_{0001}_{timestamp}.webm

Post-Processing Examples

# Convert all clips to mp4
for f in shears-clips/*.webm; do
  ffmpeg -i "$f" -c:v libx264 -preset fast "${f%.webm}.mp4"
done

# Extract frames at 8 fps for training data
for f in shears-clips/*.webm; do
  mkdir -p "frames/$(basename ${f%.webm})"
  ffmpeg -i "$f" -vf "fps=8" "frames/$(basename ${f%.webm})/frame_%04d.png"
done

Architecture

shears/
  manifest.json      Chrome MV3 manifest
  background.js      Service worker -- handles file downloads
  content.js         Video detection + clipping overlay UI
  content.css        Overlay styling (dark theme)
  popup.html         Extension popup -- video scanner
  popup.js           Popup logic
  icons/             Extension icons (16, 48, 128px)

No build tools, no bundler, no dependencies. Everything runs as plain browser APIs.

Limitations

  • Cross-origin videos -- Some sites restrict captureStream() on cross-origin video elements. Shears uses canvas recording as a fallback, which captures video but may not capture audio.
  • DRM content -- Videos protected with Widevine/EME cannot be captured.
  • Real-time recording -- A 10-second clip takes ~10 seconds to record. The extension plays through the video segment and captures frames via canvas at 30 FPS.

Contributing

Contributions are welcome! See CONTRIBUTING.md for guidelines.

License

MIT

About

Chrome extension for scrubbing and saving video clips from websites for video generation datasets

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors