jarun/dotz

Braille and ASCII art previews in the terminal

Python

5

70 commits

updated Oct 7, 2026

See the code

See what people are saying

README

dotz - Braille and ASCII art previews in the terminal

Latest release PyPI License

Render image and video previews as Braille and ASCII art in the terminal with xterm-256 color and ncurses dim/normal/bold attributes.

Initially written for nnn, it evolved as an independent feature-rich project.

Features

  • Braille art rendering for image and video previews
  • Video playback with seek controls
  • ASCII density fallback mode (for terminals without Braille font support)
  • Thumbnail gallery with navigation
  • Animated GIF support
  • xterm-256 color and grayscale
  • Dithering options (ordered, error diffusion, atkinson)
  • Automatic aspect ratio correction for both Braille and ASCII modes
  • File metadata panel
  • Zoom in, zoom out, pan while zoom
  • Rotate clockwise, flip horizontally
  • Bounded background preloading
  • Keyboard navigation and slideshow mode
image_01image_02
image_03image_04

Supported formats

  • Image: PNG, JPG, JPEG, BMP, GIF, TIFF, WEBP
  • Video: MP4, MKV, AVI, MOV, WEBM, FLV, WMV, MPEG, MPG

Installation

Install from PyPI:

pip3 install dotz

Or install from the source repository:

# Install system dependencies (e.g., ffmpeg)
sudo apt-get install ffmpeg  # or use your OS package manager

# Install Python dependencies and the CLI tool
sudo pip3 install .

After installation, you can run the tool using:

dotz [options] <file-or-directory>

You can also run the tool directly from the source directory:

python3 dotz.py [options] <file-or-directory>

Dependencies

PackageVersionUsage
python>=3.10Required Python version
numpy>=1.20Fast array operations for image processing
Pillow>=8.0Image loading and manipulation
ffmpeg>=4.2Video frame extraction

Usage

usage: dotz [-h] [-S] [-C] [-d {ordered,error,atkinson,none}] [-a] [-s [DELAY]] [-k SEEK] [-f {jpeg,png}] [-F {5,6,7,8,9,10}] [path]

Render an image or all images/videos in a directory as Braille and ASCII cells using ncurses with optional xterm-256 color.

positional arguments:
  path                  Path to the image/video file or directory (optional)

options:
  -h, --help            show this help message and exit
  -S, --no-sharpen      Disable edge sharpening
  -C, --no-color        Disable color (greyscale only with dim/normal/bold)
  -d {ordered,error,atkinson,none}, --dither {ordered,error,atkinson,none}
                        Dithering mode: ordered (default, clean), error (Floyd-Steinberg, smooth gradients), atkinson (preserves brightness), none
  -a, --ascii           Use ASCII characters instead of Braille (for terminals without Braille font support)
  -t [N], --thumbnails [N]
                        Show N thumbnails per page: 4 (2x2) or 9 (3x3), default: 4; press Enter to open an image.
  -s [DELAY], --slideshow [DELAY]
                        Enable slideshow mode with optional integer delay in seconds (default: 5).
  -k SEEK, --seek SEEK  Seek position to extract frame from videos in seconds (default: 10)
  -f {jpeg,png}, --format {jpeg,png}
                        Format for extracted video frames: jpeg (default) or png
  -F {5,6,7,8,9,10}, --fps {5,6,7,8,9,10}
                        Video playback frame rate between 5 and 10 FPS (default: 5)

Examples

  • Syntax:
    python3 -m dotz <file-or-directory>
    
  • To render a single image:
    python3 -m dotz path/to/image.jpg
    
  • To render all images and videos in a directory:
    python3 -m dotz path/to/directory/
    
  • To run a slideshow with a custom delay (e.g. 3 seconds):
    python3 -m dotz -s 3 path/to/directory/
    
  • To use a custom video playback frame rate (e.g. 5 FPS):
    python3 -m dotz -F 5 path/to/video.mp4
    
  • To use Atkinson dithering (preserves brightness better):
    python3 -m dotz -d atkinson path/to/image.jpg
    
  • To use ASCII mode (for terminals without Braille font):
    python3 -m dotz -a path/to/image.jpg
    
  • To combine ASCII mode with Atkinson dithering:
    python3 -m dotz -a -d atkinson path/to/image.jpg
    
KeyAction
Right, n, SpaceNext
Left, pPrevious
Up, DownFirst, Last
s, SToggle forward/reverse slideshow
+, -, 0Zoom in, zoom out, zoom reset
h, j, k, lPan left, down, up, right while zoomed
rRotate clockwise
fFlip horizontally
t, TShow 4 / 9 thumbnails
EnterToggle between thumbnails and the selected image
iShow file metadata
d, DDecrease/increase slideshow delay by 1 sec
[, ]Seek backward/forward in a video by the current seek step
{, }Decrease/increase the video seek step: 1, 2, 5, 10, 30, or 60 sec
,, .Move to the previous/next video playback frame
vToggle video playback
q, EscQuit
?Show keyboard help

The two-line status bar shows the current item and filename first, followed by zoom, slideshow, and video state on the second line.

License

MIT

ascii-art
braille-art
cli
image
image-viewer
terminal-graphics
tty
video
video-preview

jarun/dotz

Braille and ASCII art previews in the terminal

Python

5

70 commits

updated Oct 7, 2026

See the code

See what people are saying

README

dotz - Braille and ASCII art previews in the terminal

Latest release PyPI License

Render image and video previews as Braille and ASCII art in the terminal with xterm-256 color and ncurses dim/normal/bold attributes.

Initially written for nnn, it evolved as an independent feature-rich project.

Features

  • Braille art rendering for image and video previews
  • Video playback with seek controls
  • ASCII density fallback mode (for terminals without Braille font support)
  • Thumbnail gallery with navigation
  • Animated GIF support
  • xterm-256 color and grayscale
  • Dithering options (ordered, error diffusion, atkinson)
  • Automatic aspect ratio correction for both Braille and ASCII modes
  • File metadata panel
  • Zoom in, zoom out, pan while zoom
  • Rotate clockwise, flip horizontally
  • Bounded background preloading
  • Keyboard navigation and slideshow mode
image_01image_02
image_03image_04

Supported formats

  • Image: PNG, JPG, JPEG, BMP, GIF, TIFF, WEBP
  • Video: MP4, MKV, AVI, MOV, WEBM, FLV, WMV, MPEG, MPG

Installation

Install from PyPI:

pip3 install dotz

Or install from the source repository:

# Install system dependencies (e.g., ffmpeg)
sudo apt-get install ffmpeg  # or use your OS package manager

# Install Python dependencies and the CLI tool
sudo pip3 install .

After installation, you can run the tool using:

dotz [options] <file-or-directory>

You can also run the tool directly from the source directory:

python3 dotz.py [options] <file-or-directory>

Dependencies

PackageVersionUsage
python>=3.10Required Python version
numpy>=1.20Fast array operations for image processing
Pillow>=8.0Image loading and manipulation
ffmpeg>=4.2Video frame extraction

Usage

usage: dotz [-h] [-S] [-C] [-d {ordered,error,atkinson,none}] [-a] [-s [DELAY]] [-k SEEK] [-f {jpeg,png}] [-F {5,6,7,8,9,10}] [path]

Render an image or all images/videos in a directory as Braille and ASCII cells using ncurses with optional xterm-256 color.

positional arguments:
  path                  Path to the image/video file or directory (optional)

options:
  -h, --help            show this help message and exit
  -S, --no-sharpen      Disable edge sharpening
  -C, --no-color        Disable color (greyscale only with dim/normal/bold)
  -d {ordered,error,atkinson,none}, --dither {ordered,error,atkinson,none}
                        Dithering mode: ordered (default, clean), error (Floyd-Steinberg, smooth gradients), atkinson (preserves brightness), none
  -a, --ascii           Use ASCII characters instead of Braille (for terminals without Braille font support)
  -t [N], --thumbnails [N]
                        Show N thumbnails per page: 4 (2x2) or 9 (3x3), default: 4; press Enter to open an image.
  -s [DELAY], --slideshow [DELAY]
                        Enable slideshow mode with optional integer delay in seconds (default: 5).
  -k SEEK, --seek SEEK  Seek position to extract frame from videos in seconds (default: 10)
  -f {jpeg,png}, --format {jpeg,png}
                        Format for extracted video frames: jpeg (default) or png
  -F {5,6,7,8,9,10}, --fps {5,6,7,8,9,10}
                        Video playback frame rate between 5 and 10 FPS (default: 5)

Examples

  • Syntax:
    python3 -m dotz <file-or-directory>
    
  • To render a single image:
    python3 -m dotz path/to/image.jpg
    
  • To render all images and videos in a directory:
    python3 -m dotz path/to/directory/
    
  • To run a slideshow with a custom delay (e.g. 3 seconds):
    python3 -m dotz -s 3 path/to/directory/
    
  • To use a custom video playback frame rate (e.g. 5 FPS):
    python3 -m dotz -F 5 path/to/video.mp4
    
  • To use Atkinson dithering (preserves brightness better):
    python3 -m dotz -d atkinson path/to/image.jpg
    
  • To use ASCII mode (for terminals without Braille font):
    python3 -m dotz -a path/to/image.jpg
    
  • To combine ASCII mode with Atkinson dithering:
    python3 -m dotz -a -d atkinson path/to/image.jpg
    
KeyAction
Right, n, SpaceNext
Left, pPrevious
Up, DownFirst, Last
s, SToggle forward/reverse slideshow
+, -, 0Zoom in, zoom out, zoom reset
h, j, k, lPan left, down, up, right while zoomed
rRotate clockwise
fFlip horizontally
t, TShow 4 / 9 thumbnails
EnterToggle between thumbnails and the selected image
iShow file metadata
d, DDecrease/increase slideshow delay by 1 sec
[, ]Seek backward/forward in a video by the current seek step
{, }Decrease/increase the video seek step: 1, 2, 5, 10, 30, or 60 sec
,, .Move to the previous/next video playback frame
vToggle video playback
q, EscQuit
?Show keyboard help

The two-line status bar shows the current item and filename first, followed by zoom, slideshow, and video state on the second line.

License

MIT

ascii-art
braille-art
cli
image
image-viewer
terminal-graphics
tty
video
video-preview