Skip to main content

Lightweight media crop and trim tool.

Project description

Cropbox

A lightweight desktop utility for trimming, cropping, previewing, and exporting video and GIF media.

CropBox screenshot

Features

  • MP4, MOV, MKV, WebM, and GIF preview
  • Interactive crop overlay with draggable edges and handles
  • Toggleable crop-coordinate and trim time/frame annotations
  • Timeline trim in/out selection
  • Exact timeline viewport start/end for precision trimming
  • Draggable gray viewport handles alongside the yellow trim handles
  • Exact trim-in and trim-out entry by timecode or frame number
  • Dockable Info panel for editing playback, trim, and crop values
  • Frame stepping and trim-handle nudging from the keyboard
  • Playback speed control for preview and export
  • Export dialog with format, size, quality, and audio presets
  • Remembered export settings and output folder
  • FFmpeg export to MP4, MOV, and GIF
  • Headless CLI export with media, trim, and crop options
  • Python 3.8–3.12
  • PySide6 desktop UI

Requirements

  • Python 3.8 through 3.12
  • ffmpeg
  • ffprobe

CropBox checks for ffmpeg and ffprobe on startup and provides install guidance from Help -> Install FFmpeg.

Typical install on Ubuntu/Debian:

sudo apt install ffmpeg

Controls

  • Space: play/pause
  • Ctrl+I: toggle the Info panel
  • Left/Right: step one frame
  • Shift+Left/Right: nudge selected trim handle by one frame
  • Ctrl+Left/Right: nudge selected timeline viewport handle by one frame

Menus

  • File: Open, Export, Quit
  • Edit: Set Trim In, Set Trim Out, Reset Trim, Reset Timeline, Create Crop, Reset Crop, Playback Speed, Loop Playback
  • View: Info Panel, Show Annotations
  • Help: Install FFmpeg, About Cropbox

Install

Install the latest release from PyPI:

pip install cropbox

Or install from a local source checkout:

pip install .

Run

cropbox

Open media immediately:

cropbox input.mp4

Open with initial trim and crop values:

cropbox input.mp4 --trim-in 12.5 --trim-out 00:00:20.000 --crop 100 50 1280 720

Export directly without opening the UI:

cropbox big_buck_bunny_1080p_h264.mov -o big_buck_bunny.mp4

Export with trim and crop values:

cropbox input.mp4 --out output.mp4 --trim-in 12.5 --trim-out 20 --crop 100 50 1280 720

CLI Options

  • -o, --out PATH: export directly to MP4, MOV, or GIF without opening the UI
  • -f, --force: overwrite an existing --out file
  • --trim-in: initial trim-in time in seconds or HH:MM:SS.mmm
  • --trim-out: initial trim-out time in seconds or HH:MM:SS.mmm
  • --crop X Y WIDTH HEIGHT: initial crop rectangle in source pixels

Notes

  • Playback speed affects both preview and export.
  • Headless export defaults to the full media duration when --trim-out is omitted.
  • Export size presets preserve the cropped aspect ratio and report the resulting dimensions.
  • High, Balanced, and Smaller File presets control H.264 quality or GIF palette size.
  • Exact trim-in and trim-out values can also be entered from the Edit menu.
  • Press Enter in an Info panel field to apply current time/frame, playback FPS, trim, timeline viewport, or crop changes.
  • Timeline Start and End zoom the visible timeline, but cannot exclude the trim range; expanding trim automatically expands the timeline viewport.
  • Gray viewport-handle drags preview against the current timeline and apply on mouse release.
  • Reset Timeline restores the full media duration.
  • The playhead is constrained to the active trim range.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cropbox-0.1.5.tar.gz (1.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cropbox-0.1.5-py3-none-any.whl (35.0 kB view details)

Uploaded Python 3

File details

Details for the file cropbox-0.1.5.tar.gz.

File metadata

  • Download URL: cropbox-0.1.5.tar.gz
  • Upload date:
  • Size: 1.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.10

File hashes

Hashes for cropbox-0.1.5.tar.gz
Algorithm Hash digest
SHA256 ba11cf7f56e8d82213e0f07b5f847b2b4f215f8bcd6207a928b05fa5804d4bca
MD5 7009e9b30756822890d6a43012544146
BLAKE2b-256 e31b5e5a5e4c6897d887cd9edd42b73d4259f64409d842f98a8b838d5e2f77c9

See more details on using hashes here.

File details

Details for the file cropbox-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: cropbox-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 35.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.10

File hashes

Hashes for cropbox-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 c35de5eb9954c1c40a3e078f40985f98c84f0ecceca420ac37d542abf8da545c
MD5 fa1527a2834e817e1e91b31099e68572
BLAKE2b-256 a0ea85ed7c5cf795b04f66f15e4e37417a11b499abac4b73613f23ac388e0140

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page