Skip to main content

CLI Movie Package — Turn MP4 videos into colored ASCII terminal animations with audio

Project description

CLMP — CLI Movie Package

Turn any MP4 video into a high-performance colored ASCII animation that plays entirely in your terminal — with audio.

Installation

pip install clmp

Requirements

  • Python 3.8+
  • FFmpeg — must be on your PATH (used for audio extraction and decoding)

Note: CLMP will offer to install FFmpeg for you automatically if it's not found.

Features

  • Blazing Fast Delta-Rendering — Uses a virtual back-buffer to only update changed characters, enabling 120+ FPS playback in native terminals.
  • Colored ASCII art — each character is tinted with the original pixel color using 24-bit ANSI truecolor.
  • Frame-Dropping Audio Sync — Professional audio-led synchronization that automatically drops video frames to stay perfectly locked to the audio clock.
  • Embedded audio — audio is extracted as OGG Vorbis and played back in sync via sounddevice.
  • Full playback controls — pause, speed up/down, seek, volume, quit.
  • Persistent Settings — Customize your experience (jump size, volume steps) via clmp set.
  • Auto-scaling — fits to any terminal size using nearest-neighbor resampling.
  • Compact format — frames are zlib-compressed, audio stored as OGG Vorbis.
  • Cross-platform — works on Windows, macOS, and Linux.

Usage

Encode

Convert an MP4 to a .clmp file:

clmp encode input.mp4 output.clmp

Options:

Flag Default Description
--fps 12 Target playback framerate
--width 160 ASCII columns
--height 45 ASCII rows

Play

clmp play output.clmp

Options:

Flag Description
--speed 1.0 Initial playback speed multiplier
--loop Loop the video
--no-scale Disable auto terminal scaling
--no-color Disable colored output
--no-audio Disable audio playback

Configure

Use clmp set to customize your playback experience. Settings are saved in ~/.clmp/settings.json.

# Set jump distance to 5 seconds
clmp set --jump 5

# Set volume increments to 5%
clmp set --vol-step 5

# Set default starting volume
clmp set --volume 50

Controls

Key Action
Space Pause / resume
+ / - Speed up / slow down (±0.25x)
/ Volume up / down (Customizable step)
/ Seek backward / forward (Customizable seconds)
q Quit

.clmp Format (v4)

Binary file layout (little-endian):

┌─────────────────────────────────────────┐
│ Header (79 bytes)                       │
│   4s   magic          "CLMP"            │
│   B    version        4                 │
│   H    cols           ASCII width       │
│   H    rows           ASCII height      │
│   f    fps            playback fps      │
│   I    frame_count    number of frames  │
│   64s  source_name    original filename │
├─────────────────────────────────────────┤
│ Frames (repeated × frame_count)         │
│   I    ascii_size     compressed size   │
│   ...  ascii_data     zlib(ASCII text)  │
│   I    color_size     compressed size   │
│   ...  color_data     zlib(RGB bytes)   │
├─────────────────────────────────────────┤
│ Audio                                   │
│   I    audio_size     0 = no audio      │
│   ...  audio_data     raw OGG bytes     │
└─────────────────────────────────────────┘

License

GNU General Public License v3 (GPLv3) (GPL-3.0-only)

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

clmp-4.0.0.tar.gz (22.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

clmp-4.0.0-py3-none-any.whl (24.3 kB view details)

Uploaded Python 3

File details

Details for the file clmp-4.0.0.tar.gz.

File metadata

  • Download URL: clmp-4.0.0.tar.gz
  • Upload date:
  • Size: 22.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for clmp-4.0.0.tar.gz
Algorithm Hash digest
SHA256 21bfa97585c139fd4534b437232ae1f63cc56361d3959e0c453143fe2cb1dd1f
MD5 2ac98f16b120b86fba6ff3afd0738a41
BLAKE2b-256 2e3f4bd01fba8f10c47088b739f5593cb55f4e45361cb009c50abf8c055d83e2

See more details on using hashes here.

File details

Details for the file clmp-4.0.0-py3-none-any.whl.

File metadata

  • Download URL: clmp-4.0.0-py3-none-any.whl
  • Upload date:
  • Size: 24.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for clmp-4.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6b42d7208bbfa6608448ee2a593bd03d0443d99a41ac0c434cc005b83814a16b
MD5 cb02dfeabb4c8513ed17c450197e64b4
BLAKE2b-256 1d1fd3714968bece48089750b8d218c28109d8da15db656ae0ce659d40b9c7a2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page