Total Pageviews

Sunday 17 December 2023

ASCII Player

 ASCII Player is a player that plays video files with ASCII characters (greyscale).

Example with Never Gonna Give You Up

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.

  1. Install building tools:
    $ apt install git make clang
Install libraries:
$ 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 
  1. Clone the project.
  2. Build with make.
  3. Find the executable file in build/asciiplayer.

macOS

Manually from Source Code

  1. Install building tools with xcode-select --install
  2. Download PortAudio, use ./configure, then make and then make install to build and install PortAudio library.
  3. Download FFmpeg, use ./configure, then make and then make install to build and install PortAudio library.
  4. Clone the project.
  5. Build with make.
  6. 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