Skip to content

pbossev/rve

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RVE (Rust Video Editor)

A minimal, terminal-based video segment cutter written in Rust. It uses ffmpeg for processing and viuer for in-terminal video playback.

A screenshot of RVE

License

This project’s code is under the MIT license.

Features

  • In-Terminal Playback: Uses viuer to render video directly in the terminal.
  • Two Display Modes:
    • Low-Res: Fast, block-based rendering that works in most terminals.
    • High-Res: Pixel-based rendering using Kitty or iTerm graphics protocols (if supported).
  • Segment-Based Editing:
    • Place markers (v) to define segments.
    • Toggle segments (t) for inclusion or exclusion in the final export.
  • Interactive Timeline: A simple timeline shows the playhead, markers, and included/excluded segments.
  • Dual Output Modes:
    • Multi-File: Exports each "included" segment as a separate video file.
    • Single-File: Concatenates all "included" segments into one continuous video file.
  • Non-Destructive: All operations are non-destructive. Your original video file is never modified.

Warning

  • It has only been tested on Linux.
  • It may not build or run on other platforms.
  • Terminal support for high-resolution playback (Kitty/iTerm) varies. Low-res mode is the default.
  • It does not process or preview audio. The final export (using -c copy) will preserve the original audio tracks.

Requirements

Before you begin, you must have two external dependencies installed and available in your system's PATH:

  1. ffmpeg: Used for all video decoding, seeking, and segment exporting.
  2. ffprobe: Used to get video metadata (dimensions, duration, FPS).

You also need the Rust toolchain (e.g., rustc and cargo) to build the project.

Building

  1. Clone the repository:

    git clone https://github.com/pbossev/rve.git
    cd rve
  2. Build the release binary:

    cargo build --release
  3. The final binary will be located at target/release/rve. You can copy this to a directory in your PATH:

    sudo cp target/release/rve /usr/local/bin/

Usage

The binary is named rve. To run it, simply pass a video file as an argument:

rve /path/to/my_video.mp4

CLI Arguments

Based on the --help menu:

  • <filepath>: (Required) The path to the video file you want to edit.
  • --single-output, -s: On exit, concatenate all "included" segments into one file (e.g., filename_concat.mp4). If omitted, it defaults to multi-file mode.
  • --high-res, -r: Start the application in high-resolution pixel mode. This only works if your terminal (e.g., Kitty, WezTerm) supports the necessary graphics protocols.
  • --help, -h: Show the help menu.

Keybindings

Playback

Key Action
Space Play / Pause
. Next frame (when paused)
, Previous frame (when paused)

Seeking

Key Action
/ Seek -5s / +5s
Alt+← / Alt+→ Seek -30s / +30s
Ctrl+← / Ctrl+→ Seek -60s / +60s
0-9 Jump to 0% - 90% of the video

Editing

Key Action
v Place or remove a marker at the current playhead.
t Toggle the current segment (between markers) as "Included" or "Excluded".
[ Jump to the previous marker.
] Jump to the next marker.

Application

Key Action
r Toggle between Low-Res (block) and High-Res (pixel) display mode.
i Toggle output mode between "Multi-File" and "Single-File".
? Toggle the on-screen keybinding help display.
q Quit and save. This begins the ffmpeg export process based on your segments.
! Quit without saving. Exits the program immediately.

Roadmap

I plan to develop this more as I get more time for it.

  • Add basic audio preview support.
  • Add basic audio editing support.
  • Add multi-file importing.
  • More advanced editing features (e.g., re-ordering segments, changing playback speed).

About

A minimal, terminal-based video segment cutter written in Rust.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages