Skip to content

wong-justin/vic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vic

Play & cut videos in the terminal

screenshot

Building

Linux

vic is dynamically linked with chafa, a C library that makes pretty pictures. Install chafa from your package manager, or build it from source:

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.

Static binaries

Coming eventually! See this issue if you want to help.

Examples

vic video.mp4
vic video.mp4 -w=9999
vic http://example.com/video.avi -w 20

Usage

vic <filepath> [-w <int, default 40>]
               [--help|--version]

Options

-w <int>          Max output width, in columns.
                  Use -w 9999 for fullscreen.
                  Defaults to 40.

Controls

[ segment mode ]

  space ... play/pause
  j/l ..... seek back/forwards
  0-9 ..... seek to 0%, 10%, etc
  . ....... advance one frame
  m ....... make marker
  q ....... finish

[ marker mode ]

  M ....... delete marker
  J/L ..... goto prev/next marker

Notes

Here's a blog post: https://wonger.dev/posts/chafa-ffmpeg-progress

My main focus for now is creating a separate UI thread and adding audio.

I also need to fiddle with GitHub Actions and building static binaries.

There's several quality-of-life improvements to work on.

Pull requests welcome :)

Created during LMT2.

About

Play & cut videos in the terminal

Topics

Resources

License

Stars

Watchers

Forks