Play & cut videos in the terminal
vic
is dynamically linked with chafa
, a C library that makes pretty pictures. To install chafa
:
apt-get install libglib2.0-dev
curl 'https://hpjansson.org/chafa/releases/chafa-1.14.4.tar.xz' -O
tar xf chafa-1.14.4.tar.xz
cd chafa-1.14.4
./configure --without-tools
make
make install
ldconfig
Once chafa
is installed, you can build the Rust project with cargo build
.
Make sure everything is compiled and linked correctly by running cargo test
.
You can find the built binary at target/debug/vic
, or you can use cargo run
as an alias for vic
.
vic
requires ffmpeg
to be on $PATH
during runtime.
Coming soon! See this issue if you want to help.
vic <filepath> [-w <int, default 40>]
[--hide-controls]
[--help|--version]
vic video.mp4
vic video.mp4 -w=9999 --hide-controls
vic http://example.com/video.avi -w 20
-w <int> Max output width, in columns.
Use -w 9999 for fullscreen.
Defaults to 40.
--hide-controls Hide helper text below the video.
[ segment mode ]
space ... play/pause
j/l ..... seek back/forwards
m ....... make marker
q ....... finish
[ marker mode ]
M ....... delete marker
J/L ..... goto prev/next marker
Here's a blog post: https://wonger.dev/posts/chafa-ffmpeg-progress
My main focus for now is fiddling with GitHub Actions and building static binaries.
I also need to use an async runtime. Right now, the program gets sluggish with large videos, and it interferes with user input.
Another big task is to add audio.
There's several quality-of-life improvements to work on.
Pull requests welcome :)