| Crates.io | vedit |
| lib.rs | vedit |
| version | 0.1.0 |
| created_at | 2025-12-22 09:39:17.934509+00 |
| updated_at | 2025-12-22 09:39:17.934509+00 |
| description | A tool that wraps auto-editor and ffmpeg for fast editing. |
| homepage | https://github.com/alexandretrotel/vedit |
| repository | https://github.com/alexandretrotel/vedit |
| max_upload_size | |
| id | 1999420 |
| size | 12,485 |
vedit is a small Rust command-line wrapper that runs auto-editor to remove silent parts from a video and then uses ffmpeg to adjust playback speed. It automates the two-step process: run auto-editor with a configurable margin, then apply video and audio speed filters with ffmpeg.
This repository contains a minimal CLI (see src/main.rs) that expects auto-editor and ffmpeg to be available on your PATH.
auto-editor — installed and available on your PATHffmpeg — installed and available on your PATHNote: vedit assumes that after running:
auto-editor <input> --margin <N>sec
an altered file will exist with the same stem as the input and the suffix _ALTERED (e.g. video.mp4 -> video_ALTERED.mp4). Ensure your auto-editor installation/version produces that output or configure/move the file accordingly.
From cargo:
cargo install vedit
From the project root:
# Build in release mode, binary will be in ~/.cargo/bin
cargo install --path .
Basic invocation:
vedit <input> --margin <seconds> --speed <factor> --output <output>
Arguments:
<input> — Path to the input video file (positional).--margin — Margin in seconds passed to auto-editor (float, e.g. 0.2).--speed — Playback speed factor applied with ffmpeg (float, e.g. 1.25, 1.5, 2.0).--output — Output filename for the final processed video.Example:
# Remove silent parts (with 0.2s margin) then speed playback 1.5x, writing to output.mp4
vedit input.mp4 --margin 0.2 --speed 1.5 --output output.mp4
The CLI performs the following steps:
clap.auto-editor <input> --margin <margin>sec<stem>_ALTERED.<ext> to exist after that command.ffmpeg on the altered file to change speed:
setpts=PTS/<speed>atempo=<speed>--output.The code returns errors when the external commands exit with non-zero status:
auto-editor fails, the program reports auto-editor failed.ffmpeg fails, the program reports ffmpeg failed.atempo accepts only certain ranges per filter invocation (commonly 0.5–2.0). If you pass a --speed outside ffmpeg's single-step atempo range, ffmpeg may fail. A robust solution would chain multiple atempo filters for larger speed multipliers (not implemented here).auto-editor producing an altered file with the _ALTERED suffix. If your auto-editor version uses a different naming pattern, you'll need to rename the altered file before vedit runs ffmpeg, or modify the code.auto-editor and ffmpeg. vedit does not attempt to parse or modify media streams itself.This project is intentionally small. If you want to:
atempo for arbitrary speeds,feel free to open a PR or modify src/main.rs.