ASCII Player is a player that plays video files with ASCII characters (greyscale).
Features
- Support any video format as long as FFmpeg supports it.
- Support playing audio stream in video file.
- Support processing the video file in advance to cache(
.apcache
) file. - Scale video to your terminal size by default.
Installation
Linux
Manually with Package Manager
This is an example for Debian Linux.
Audio playing is not tested.
- Install building tools:
$ apt install git make clang
$ apt install libavcodec-dev libavformat-dev libavdevice-dev libswresample-dev libswscale-dev libavutil-dev libz-dev libbz2-dev libncurses-dev libasound-dev portaudio19-dev libportaudio2
- Clone the project.
- Build with
make
. - Find the executable file in
build/asciiplayer
.
macOS
Manually from Source Code
- Install building tools with
xcode-select --install
- Download PortAudio, use
./configure
, thenmake
and thenmake install
to build and install PortAudio library. - Download FFmpeg, use
./configure
, thenmake
and thenmake install
to build and install PortAudio library. - Clone the project.
- Build with
make
. - Find the executable file in
build/asciiplayer
.
Usage
Directly play a video or a cache file
$ asciiplayer <URI/PATH>
Process the video to cache file
$ asciiplayer <URI/PATH> --cache <PATH>
Other options
ASCII Player v1.0.2
A media player that plays video file in ASCII characters.
Usage: asciiplayer <file> [-h | --help] [-l | --license] [-c | --cache <file>]
[-n | —no-audio] [-g | --grayscale <string>] [-r | --reverse]
[--log <log file>] [--loglevel <level num>]
--help -h Print this help page
--license -l Show license and author info
--cache -c <file> Process video into a cached file
example: $ asciiplayer video.mp4 --cache cached.apcache
--grayscale -g <string>
Grayscale string (default: " .:-=+*#%@")
--reverse -r Reverse grayscale string
--no-audio -n Play video without playing audio
--log <log file> Path to log file
--loglevel <level num>
Log level number {TRACE: 0, DEBUG: 1, INFO: 2, WARN: 3,
ERROR: 4, FATAL: 5}
from https://github.com/rikkix/ascii-player
No comments:
Post a Comment