Crates.io | termplay |
lib.rs | termplay |
version | 2.0.6 |
source | src |
created_at | 2017-06-20 14:31:32.365567 |
updated_at | 2020-01-07 09:58:54.553314 |
description | Play images/videos in your terminal |
homepage | https://jD91mZM2.github.io/termplay/ |
repository | |
max_upload_size | |
id | 19725 |
size | 88,517 |
Name by the awesome @tbodt
Are you a terminal fanboy like me?
Sure, but do you ever watch YouTube? In your terminal?
termplay
is the tool to convert images to ANSI sequences.
But it also supports playing videos...
Written in the systems language Rust, it has some solid performance.
Termplay also allows you to control the media, such as zoom in or pause the video.
(Landscape image from pexels.com)
termplay 2.0.0
jD91mZM2 <me@krake.one>
Play images/videos in your terminal
USAGE:
termplay [FLAGS] [OPTIONS] <path>
FLAGS:
--help Prints help information
-q, --quiet Ignores all the nice TUI things for simple image viewing
-V, --version Prints version information
OPTIONS:
-c, --converter <converter> Decides how the image should be displayed [default: halfblock] [possible values:
color256, halfblock, sixel, truecolor]
-h, --height <height> Sets the height (defaults to the terminal size, or 24)
-r, --rate <rate> Sets the framerate [default: 24]
--ratio <ratio> Sets the terminal font ratio (only takes effect with some converters)
-w, --width <width> Sets the width (defaults to the terminal size, or 80)
ARGS:
<path> Specifies the path to the image/video to play
Rust v1.25 or more is required. See your Rust version with
rustc --version
Update rust with
rustup update stable
Other than that, this project is hosted on crates.io.
So to install you just need to run
cargo install termplay --features bin
(Note: The --features
part is a hack because binaries don't allow specifying separate dependencies)
Almost all dependencies are optional and can be disabled!
Default features:
To disable default features, run
cargo install termplay --no-default-features --features "bin,..."
where ...
is a comma separated list of features you want to keep.
Termplay is available with the default features on Nix!
nix-env -iA nixpkgs.termplay
If you just want to get this running on Arch Linux with the default features, you can use the
AUR Package (unofficial)
Example:
sudo apt install libopenal-dev libsndfile1-dev libsixel-dev gstreamer1.0-dev gstreamer-plugins-base1.0-dev gstreamer1.0-plugins-base gstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-bad
cargo install termplay --features bin