VibEdit is now public domain under the Unlicense. The README notes that the bundled ffmpeg binaries stay GPLv3. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
6.0 KiB
VibEdit
A small video cutter for Windows and Linux built on ffmpeg. Load one or more source videos, mark the parts you want, and export them joined into one file or as separate files. Lossless export copies the original streams. Re-encode export makes frame-exact cuts and lets you change codec, size and quality. Animated GIF export makes a looping GIF without sound. Load an .srt file with a source video to see its captions while you edit and burn them into Re-encode and GIF exports.
Using it
Windows: download or build dist/VibEdit-windows-x64.zip, extract it, and double-click vibedit.exe. The editor opens in a chromeless Microsoft Edge window. The end-user instructions are in package-readme.txt, which ships inside the zip as README.txt.
Linux: download or build dist/VibEdit-linux-x64.tar.xz, extract it, and run ./vibedit, or run ./install.sh once to add it to the applications menu. The editor opens in a Chrome, Chromium, Edge or Brave app window, or else in the default browser. File dialogs use zenity or kdialog when either is installed. The end-user instructions are in linux/README.txt, which ships inside the archive as README.txt.
VibEdit looks for ffmpeg and ffprobe (.exe on Windows) in four places, in this order:
- next to itself
- in
ffmpeg\ - in
bin\ - on
PATH
You can also point to them with -ffmpeg and -ffprobe.
Building
The project is pure Go with no cgo, so you can build the Windows exe on any OS:
./build.sh # dist/vibedit.exe
./build.sh --package # also downloads ffmpeg (gyan.dev "release essentials") into dist/VibEdit-windows-x64.zip
./build.sh linux # dist/vibedit
./build.sh linux --package # also downloads ffmpeg (BtbN static release build) into dist/VibEdit-linux-x64.tar.xz
./build.sh all [--package] # both
The Linux ffmpeg URL in build.sh names a release branch (currently n9.0). BtbN only keeps the newest few branches, so bump the version there when the download starts failing.
On Windows itself, run go build -o vibedit.exe .; on Linux, go build .. You need Go 1.22 or later.
go build links the app icon and version info into Windows builds automatically from rsrc_windows_*.syso. To regenerate those files after editing winres/, run:
go run github.com/tc-hib/go-winres@v0.3.3 make --in winres/winres.json --arch amd64,arm64 --out rsrc
How it works
main.gostarts an HTTP server on a random 127.0.0.1 port and opens the UI. It prefers an Edge or Chrome--app=…window (on Linux also Chromium and Brave) and falls back to the default browser.- Access: every request must carry a cookie, which the browser gets in exchange for a random token in the startup URL. Only loopback
Hostheaders are accepted. - Shutdown: the program quits about 10 seconds after the last editor window disconnects, unless an export is still running.
- Access: every request must carry a cookie, which the browser gets in exchange for a random token in the startup URL. Only loopback
web/holds the UI: plain HTML, CSS and JS embedded into the binary.- Playback: the browser plays sources directly from the server, which supports HTTP range requests.
- Unplayable formats (AVI, WMV, some codecs): the server makes a small H.264 preview copy and caches it in
%LocalAppData%\vibedit\proxies(~/.cache/vibedit/proxieson Linux). Until it is ready, the viewer shows still frames.
media.goprobes sources with ffprobe, renders thumbnails and scans keyframe positions.export.gobuilds the ffmpeg commands:- Lossless: cuts each clip with
-c copy, starting exactly at the keyframe at or before In. When joining, it writes temporary segments and concatenates them with the concat demuxer. This only works when all sources share the same format; the server rejects joins where they differ. - Re-encode: one ffmpeg run. Each clip is a seeked input; the filter graph normalizes size (letterboxing as needed), frame rate and audio format, then joins with the
concatfilter. Cuts are frame-exact: In includes the frame shown, Out cuts just before the frame shown. - Animated GIF: two ffmpeg runs over the same filter graph as Re-encode. The first picks a 256-color palette for the whole animation (
palettegen), the second maps every frame onto it (paletteuse). ffmpeg reports no progress while it builds a palette, so the progress bar only covers the second run. - Output safety: outputs are written to
*.vibedit-part.*and renamed when finished, so a failed or canceled export never leaves a broken file.
- Lossless: cuts each clip with
captions.gohandles captions:- Loading: it parses .srt files in UTF-8, UTF-16 (with a byte order mark) or Windows-1252. The editor draws the current source's captions over the viewer itself, at the size and in the style the export will use.
- Burning in: Re-encode and GIF exports write each clip's captions to a temporary .srt timed from its In point. The
subtitlesfilter (libass) draws them after scaling, so they get the same size in every clip. Sizes are relative to the shorter side of the frame, so portrait videos get the same size as landscape ones. Lossless export cannot change the picture and refuses captions.
platform_windows.goprovides native Open/Save dialogs (PowerShell + WinForms, no cgo), drive listing and "Show in folder".platform_linux.godoes the same with zenity or kdialog, mounted drives, and the FileManager1 D-Bus call (falling back toxdg-openon the folder). It runs ffmpeg in its own process group, so Ctrl+C in the terminal reaches only VibEdit, which then cancels exports cleanly.- Without a dialog program (and on other platforms) the UI uses its built-in file browser.
- The project is autosaved to
%AppData%\vibedit\session.json(~/.config/vibedit/session.jsonon Linux).
License
VibEdit is public domain, released under the Unlicense. Kopimi: copy it, change it, share it, sell it. No permission needed.
That covers VibEdit's own code. The ffmpeg and ffprobe binaries in the release archives are GPLv3 and ship with their license as ffmpeg-LICENSE.txt (source at https://ffmpeg.org/download.html).