vidcii is a small Python CLI that turns video files into ASCII art.
It can play a video live inside the terminal, render optional ANSI color, play best-effort audio through an external backend, and export the result as a new ASCII-styled video file.
It is not meant to be a serious media player. It is a compact project for learning about video frames, terminal rendering, timing, and export pipelines.
The demo shows:
- live ASCII playback in the terminal
- optional color rendering
- HD export mode
- the exported ASCII-styled video result
vidcii has two main modes.
Read a video file frame by frame and redraw it in the terminal as ASCII characters.
python vidcii.py video.mp4Useful options:
python vidcii.py video.mp4 --width 80 --fps 15
python vidcii.py video.mp4 --charset dense
python vidcii.py video.mp4 --invert
python vidcii.py video.mp4 --colorRender the ASCII output into a new .mp4 file.
python vidcii.py video.mp4 --export ascii_output.mp4HD export:
python vidcii.py video.mp4 --export ascii_output.mp4 --export-preset hdColor HD export:
python vidcii.py video.mp4 --export ascii_output.mp4 --export-preset hd --colorExport mode creates a new video file with ASCII characters drawn onto a real canvas. It does not depend on terminal size.
- Play videos inside the terminal as ASCII art
- Export videos as ASCII-styled
.mp4files - Optional ANSI true-color terminal rendering
- Optional best-effort audio playback using
ffplayormpv - Simple and dense character sets
- Invert brightness mapping
- Adjustable playback width and FPS
- Export presets:
small,medium,hd - Custom export size, font scale, font thickness, and cell spacing
python -m venv .venvWindows:
.venv\Scripts\activateLinux/macOS:
source .venv/bin/activateInstall dependencies:
pip install -r requirements.txtPython dependency:
opencv-python
Optional audio backends:
ffplay, included with FFmpegmpv
Audio playback is optional. The tool still works without them.
Basic playback:
python vidcii.py video.mp4Set playback width and FPS:
python vidcii.py video.mp4 --width 100 --fps 15Use dense ASCII characters:
python vidcii.py video.mp4 --charset denseInvert brightness:
python vidcii.py video.mp4 --invertUse terminal color:
python vidcii.py video.mp4 --colorPlay with best-effort audio:
python vidcii.py video.mp4 --audio --audio-backend ffplayExport an ASCII-styled video:
python vidcii.py video.mp4 --export ascii_output.mp4Export in HD:
python vidcii.py video.mp4 --export ascii_output.mp4 --export-preset hdExport in color HD:
python vidcii.py video.mp4 --export ascii_output.mp4 --export-preset hd --color--export OUTPUT_PATH
--export-preset small|medium|hd
--export-width 1280
--export-height 720
--font-scale 0.45
--font-thickness 1
--cell-width 8
--cell-height 12Default export size:
medium: 1280x720
Presets:
small = 854x480
medium = 1280x720
hd = 1920x1080
Manual export width and height override the preset.
vidcii reads frames from a video using OpenCV.
For each frame:
- resize the frame
- convert brightness into ASCII characters
- optionally sample color from the original frame
- either draw the frame in the terminal or render it onto a video canvas
The export path is separate from live playback. Terminal playback is optimized for screen output. Export mode is optimized for creating a clearer video file.
- Exported videos do not include the original audio track yet
- Audio playback during live mode is best-effort
- Terminal rendering speed affects live playback smoothness
- Color mode is slower than grayscale mode
- HD export takes longer than small or medium export
- True-color output depends on terminal support
- This is not a professional media player
MIT
