A simple weekend project. No pretensions.
Converts video files into ASCII art video output. Each frame is rendered by mapping pixel luminance to characters from a configurable density ramp, producing either a new encoded video or a live terminal preview.
Two character modes are available: standard ASCII (8x8 bitmap cells) and Japanese katakana (16x8 bitmap cells).
ffmpegandffprobeavailable inPATH
cargo build --releaseThe binary will be at target/release/asciyx.
asciyx [OPTIONS]| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--input |
-i |
<path> |
video.mp4 |
Path to the input video file |
--output |
-o |
<path> |
video-processed.mp4 |
Path for the output video file (used when sink is video) |
--sink |
-S |
video | terminal |
video |
Where to send the rendered output |
--scale |
-s |
<uint> |
1 |
Scale multiplier applied to each character cell |
--density |
-d |
<uint> |
max for mode | Number of characters in the luminance ramp (min 2, max depends on mode) |
--loop |
-l |
<uint> |
1 |
Number of times to loop playback |
--japanese |
-j |
flag | — | Use Japanese katakana characters instead of ASCII |
Input: any container format supported by ffmpeg (e.g. .mp4, .mkv, .avi, .mov, .webm). The path is passed directly to ffmpeg with no extension validation.
Output: the video sink encodes with libx264 + yuv420p, so the output container must be H.264-compatible (e.g. .mp4, .mkv, .mov). Containers that do not support H.264 (e.g. .webm) will fail.
ASCII mode
example-ascii.mp4
Katakana mode (-j)
example-j.mp4
Convert a video to ASCII art and save it:
asciyx -i input.mp4 -o output.mp4Preview in the terminal with 2x scale and katakana mode:
asciyx -i input.mp4 --sink terminal --scale 2 --japaneseReduce the character density ramp:
asciyx -i input.mp4 --density 10