Play any video as colorful ASCII art in your terminal
Project description
hoopoe-player
Play any video as colorful ASCII art directly in your terminal.
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
Usage
# Play a YouTube video
hoopoe https://www.youtube.com/watch?v=xxxxx
# Play a local file
hoopoe -l video.mp4
# Enable audio
hoopoe -s https://www.youtube.com/watch?v=xxxxx
# Change character mode
hoopoe -m blocks 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
# 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
Features
- ๐ฌ YouTube & local video โ stream any YouTube URL or play a local file directly
- ๐จ 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) - ๐ 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
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 |
nocolor |
classic chars, no colour โ for legacy terminals |
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.
Viewing ANSI screenshots
Screenshots saved with P are .ans files containing raw ANSI escape codes. To view them:
cat hoopoe_screenshot_20260317_142301.ans
Requirements
- Python 3.10+
- ffmpeg (optional, needed for
-saudio) - A terminal with true color support (for all modes except
nocolor)
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
- GIF support โ render animated GIFs frame by frame
- Broader URL support โ play videos from any URL, not just YouTube (Vimeo, Twitch, etc.)
- 16-color mode โ fallback palette for terminals without true color support
-
--outputto file โ save the full video render as an ANSI file instead of single screenshots
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
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.4.tar.gz.
File metadata
- Download URL: hoopoe_player-0.1.4.tar.gz
- Upload date:
- Size: 13.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef3153acec585343363a833e9a791b1e0cfd4add8b6c7752315e7b0763532f00
|
|
| MD5 |
fe8004c03bdef52229eeecd89d3222d2
|
|
| BLAKE2b-256 |
7e48ec6551806ffa08b41f2727e98da7e35336b61ee20f82fe4df597dd2b8d1e
|
Provenance
The following attestation bundles were made for hoopoe_player-0.1.4.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.4.tar.gz -
Subject digest:
ef3153acec585343363a833e9a791b1e0cfd4add8b6c7752315e7b0763532f00 - Sigstore transparency entry: 1215572469
- Sigstore integration time:
-
Permalink:
axol8002/hoopoe-player@c2dad5ddc9c4ed67e34ec22482badd72732cc481 -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/axol8002
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@c2dad5ddc9c4ed67e34ec22482badd72732cc481 -
Trigger Event:
release
-
Statement type:
File details
Details for the file hoopoe_player-0.1.4-py3-none-any.whl.
File metadata
- Download URL: hoopoe_player-0.1.4-py3-none-any.whl
- Upload date:
- Size: 11.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0a09e6342cdfe080f95dd28da70c96d3d11b9b2f6bdc60dd08e033595f8fe91d
|
|
| MD5 |
ddf7517e8d228ec368c6bc3fe1def329
|
|
| BLAKE2b-256 |
d895161fda7bc6890d1847e40243b5d0347c09a2e5151360fecfe99cd89e09b3
|
Provenance
The following attestation bundles were made for hoopoe_player-0.1.4-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.4-py3-none-any.whl -
Subject digest:
0a09e6342cdfe080f95dd28da70c96d3d11b9b2f6bdc60dd08e033595f8fe91d - Sigstore transparency entry: 1215572897
- Sigstore integration time:
-
Permalink:
axol8002/hoopoe-player@c2dad5ddc9c4ed67e34ec22482badd72732cc481 -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/axol8002
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@c2dad5ddc9c4ed67e34ec22482badd72732cc481 -
Trigger Event:
release
-
Statement type: