Play any video as colorful ASCII art in your terminal
Project description
hoopoe-player
Play videos, images, and webcam as colorful ASCII art directly in your terminal.
Table of contents
- Installation
- Quick usage (CLI)
- TUI (Terminal UI)
- Features
- Controls
- Character modes
- Viewing ANSI outputs
- Requirements
- Roadmap
- Star History
- Support the creator
- License
Installation
# Most systems
pip install hoopoe-player
# Ubuntu/Debian
pipx install hoopoe-player
You also need ffmpeg for audio:
sudo apt install ffmpeg # Ubuntu/Debian
sudo pacman -S ffmpeg # Arch
Quick usage (CLI)
# Play a YouTube, Twitch, Vimeo, or any yt-dlp supported site
hoopoe https://www.youtube.com/watch?v=xxxxx
hoopoe https://www.twitch.tv/videos/xxxxxxxxx
hoopoe https://vimeo.com/xxxxxxxxx
# Play a local file
hoopoe -l video.mp4
hoopoe -l video.gif
# Enable audio
hoopoe -s https://www.youtube.com/watch?v=xxxxx
# Render a local image
hoopoe -i image.jpg
# Change character mode
hoopoe -m braille https://www.youtube.com/watch?v=xxxxx
# Show status bar (time, volume, controls)
hoopoe --hud https://www.youtube.com/watch?v=xxxxx
# Loop video automatically
hoopoe --loop https://www.youtube.com/watch?v=xxxxx
# Sync video to audio clock (recommended with -s)
hoopoe -s --sync https://www.youtube.com/watch?v=xxxxx
# Limit rendering FPS
hoopoe --fps 15 https://www.youtube.com/watch?v=xxxxx
hoopoe --webcam --fps 10
# Use 16-color ANSI palette (terminals without true color support)
hoopoe --legacy-color https://www.youtube.com/watch?v=xxxxx # rgb or lab, rgb by default
# Disable all color output (terminals with no color support)
hoopoe --no-color -m braille https://www.youtube.com/watch?v=xxxxx
# Save render to an ANSI file
hoopoe --output render.ans https://www.youtube.com/watch?v=xxxxx
hoopoe --output ~/recordings/ https://www.youtube.com/watch?v=xxxxx
hoopoe --webcam --output webcam.ans
hoopoe -i --output render.ans photo.jpg
# Stream webcam as ASCII art
hoopoe --webcam
hoopoe --webcam -m solid --hud
hoopoe --webcam --flip h --invert
# Highlight mode (color as background) with any character mode
hoopoe -m braille --highlight https://www.youtube.com/watch?v=xxxxx
# Combine options
hoopoe -l -s --sync -m classic --highlight --hud --loop video.mp4
# Replay a recorded .ans file
hoopoe --play render.ans
hoopoe --play --fps 5 render.ans
TUI (Terminal UI)
This repository includes a dedicated TUI launcher (tui/hoopoe-tui) to avoid typing full CLI flags every time.
What it does
- Provides an interactive menu for playback and settings
- Stores your defaults in
~/.config/hoopoe-launcher.conf - Lets you run videos from URL or local filenames quickly
TUI requirements
- Bash
- Linux or WSL
hoopoeavailable in yourPATH(pip install hoopoe-player)
Run the TUI
From a clone of this repository:
chmod +x tui/hoopoe-tui
./tui/hoopoe-tui
Optional (run it globally):
sudo ln -s "$(pwd)/tui/hoopoe-tui" /usr/local/bin/hoopoe-tui
hoopoe-tui
TUI configurable settings
The TUI persists these options:
- Playback mode (video+audio or video only)
- Loop mode
- Character style
- Highlight mode
- FPS quality profile
- Local video directory
Features
- ๐ฌ YouTube, Twitch, Vimeo & more โ stream from YouTube, Twitch, Vimeo, direct video URLs (
.mp4,.webm,.m3u8), or any platform supported by yt-dlp (1800+ sites); also plays local files - ๐จ 6 character modes โ classic, blocks, braille, minimal, nocolor, solid
- ๐ True color โ full 24-bit RGB color per character for supported terminals
- ๐ Audio playback (
-s) โ synced audio via ffmpeg/ffplay - ๐บ Live stream support โ plays YouTube live streams with low-latency audio mode
- ๐ A/V sync mode (
--sync) โ recommended with-s; drops frames to stay locked to the audio clock when rendering is slow, recovers automatically - ๐ฅ๏ธ HUD (
--hud) โ status bar with timestamp, real-time FPS, mode and controls - ๐ Loop mode (
--loop) โ automatically restarts video and audio at the end - ๐ธ Screenshot (
P) โ saves the current frame as a timestamped ANSI color file (.ans) - ๐ผ๏ธ Image rendering (
-i) โ displays a single local image - ๐ Dynamic resize โ terminal resize is applied immediately, even while paused
- ๐ฅ๏ธ Alternate screen โ runs in a separate buffer like vim/htop; your terminal history is preserved on exit
- ๐ท Webcam support (
--webcam) โ stream your webcam live as ASCII art; select camera index with--camera - ๐ Flip (
--flip h/v/hv) โ flip the webcam feed horizontally, vertically, or both - ๐ Invert (
--invert) โ invert brightness mapping for any character mode - ๐จ Highlight (
--highlight) โ render color as background for any character mode - ๐๏ธ FPS limit (
--fps) โ cap the rendering framerate to reduce CPU usage - ๐พ Output to file (
--output) โ save the full render as an ANSI file; works with video, webcam, and image modes - โถ๏ธ ANSI playback (
--play) โ replay a recorded.ansfile at the original framerate; supports pause and FPS override - ๐จ Legacy color (
--legacy-color) โ render using the 16-color ANSI palette for terminals without true color support;rgbmode uses fast Euclidean RGB distance,labmode uses perceptual CIE LAB distance - โฌ No color (
--no-color) โ disable all color output for terminals with no color support; works with any character mode
Controls
| Key | Action |
|---|---|
Space |
Pause / Play |
P |
Screenshot โ save current frame as .ans ANSI file |
Q or Ctrl+C |
Quit |
Controls are the same for video and webcam modes.
Character modes
| Mode | Style |
|---|---|
classic |
. : - = + * # % @ โ default, coloured |
blocks |
โ โ โ โ โ bold blocks, coloured |
braille |
โ โ โ โ ฟ โฃฟ โ dense dots, coloured |
minimal |
ยท โข โ โ โ clean and minimal, coloured |
solid |
pure color blocks โ no characters, most accurate color reproduction |
Use --highlight with any mode to render color as background instead of foreground.
Use --invert with any mode to invert the brightness mapping.
Use --legacy-color (or --legacy-color lab for perceptual matching) with any mode to use the 16-color ANSI palette instead of 24-bit RGB.
Use --no-color with any mode to disable color entirely.
Viewing ANSI outputs
Screenshots saved with P and output files saved with --output are .ans files containing raw ANSI escape codes.
Replay them with:
hoopoe --play render.ans
cat hoopoe_screenshot_20260317_142301.ans
# Override playback speed
hoopoe --play --fps 5 render.ans
To dump the raw content to the terminal (no timing):
cat render.ans
Requirements
- Python 3.10+
- ffmpeg (optional, needed for
-saudio) - A terminal with true color support (use
--legacy-coloror--no-colorfor terminals without it)
Roadmap
Features
- Webcam support โ stream your webcam live as ASCII art in the terminal (
--webcam,--camera,--flip) -
--fpsflag โ cap the rendering framerate to reduce CPU usage - Image display โ render local images and online images as ASCII art in the terminal
-
--outputto file โ save the full video render as an ANSI file instead of single screenshots - Broader URL support โ Twitch, Vimeo, direct video URLs, and any of the 1800+ sites supported by yt-dlp work out of the box
- 16-color mode โ
--legacy-colorflag; uses the 16-color ANSI palette for terminals without true color support - Shell autocompletion โ tab-complete flags and paths for
hoopoe - TUI in pip package โ
tui/hoopoe-tuiis not bundled in the PyPI release yet; must be run manually from a clone of this repository
Performance
- Numpy vectorisation โ reduced CPU usage per frame by replacing Python loops with matrix operations
- String join optimisation โ replaced
+=string concatenation with list accumulation and"".join() - Dirty rendering โ only redraw lines that changed between frames; reduces terminal I/O for low-motion content
Platform support
- macOS โ minor adjustments needed (
ffmpegvia Homebrew, no code changes expected) - Windows native โ replace
tty/termioswithmsvcrtfor key input, replaceSIGSTOP/SIGCONTwith Windows-compatible pause logic; WSL already works
Star History
Support the creator
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hoopoe_player-0.1.5.tar.gz.
File metadata
- Download URL: hoopoe_player-0.1.5.tar.gz
- Upload date:
- Size: 18.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1973630c8eda495fe2581834e946ee36f8f9e010ff6cefd8b3108ec16e0bd64c
|
|
| MD5 |
f7191f0ee7cac50a538a8ec874c4680e
|
|
| BLAKE2b-256 |
174e8923e329b0ce8e1b13beb9b0c84cbe6e33bb153db69605eced60df5e4bba
|
Provenance
The following attestation bundles were made for hoopoe_player-0.1.5.tar.gz:
Publisher:
python-publish.yml on axol8002/hoopoe-player
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hoopoe_player-0.1.5.tar.gz -
Subject digest:
1973630c8eda495fe2581834e946ee36f8f9e010ff6cefd8b3108ec16e0bd64c - Sigstore transparency entry: 1487133407
- Sigstore integration time:
-
Permalink:
axol8002/hoopoe-player@158a6994f7f88124bcd3d1ca0ff6af6f2ed7fb85 -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/axol8002
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@158a6994f7f88124bcd3d1ca0ff6af6f2ed7fb85 -
Trigger Event:
release
-
Statement type:
File details
Details for the file hoopoe_player-0.1.5-py3-none-any.whl.
File metadata
- Download URL: hoopoe_player-0.1.5-py3-none-any.whl
- Upload date:
- Size: 15.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
848e6b9224b451bedec7826a449f0e447c70ac38417adb6dc2c15cd7917bac1c
|
|
| MD5 |
afc7a9e74f9aac67fd3559c094733d38
|
|
| BLAKE2b-256 |
ea9610b5e09ab91b01e64d54dcaef16a875eb8a3fcc0ed6f2704eb4142e578e7
|
Provenance
The following attestation bundles were made for hoopoe_player-0.1.5-py3-none-any.whl:
Publisher:
python-publish.yml on axol8002/hoopoe-player
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hoopoe_player-0.1.5-py3-none-any.whl -
Subject digest:
848e6b9224b451bedec7826a449f0e447c70ac38417adb6dc2c15cd7917bac1c - Sigstore transparency entry: 1487133413
- Sigstore integration time:
-
Permalink:
axol8002/hoopoe-player@158a6994f7f88124bcd3d1ca0ff6af6f2ed7fb85 -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/axol8002
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@158a6994f7f88124bcd3d1ca0ff6af6f2ed7fb85 -
Trigger Event:
release
-
Statement type: