# π ASCILINE Engine with Export
**ASCILINE** is a high-performance, cross-platform real-time ASCII video rendering engine. **Our core objective is to transform the web into a highly dynamic and interactive typographic canvas.** By mapping pixels to text-based representations, we unlock new possibilities for web media delivery.
## πΎ Export to Static Files (`export_ascii.py`)
Export any video to two portable static files β no server or WebSocket required:
| File | Contents |
| :--- | :--- |
| `output.txt` | Plain ASCII frames separated by dividers. Human-readable, terminal-pipeable, embeddable in `.md`. |
| `output.ascjson` | Compact JSON with per-cell color data: `{"meta":{cols,rows,fps},"frames":[[char,r,g,b,...]...]}`. Feeds the web player widget directly. |
Place `export_ascii.py` in the ASCILINE folder (next to `ascii_video_player2.py`), then:
```bash
# Basic β outputs video.txt + video.ascjson
python export_ascii.py video.mp4
# Custom output name
python export_ascii.py video.mp4 -o my_export
# Custom grid size (rows auto-calculated if omitted)
python export_ascii.py video.mp4 --cols 120 --rows 34
# Cap output FPS (default: 24)
python export_ascii.py video.mp4 --max-fps 12
# Text only, skip the color JSON
python export_ascii.py video.mp4 --no-color
# Suppress progress output
python export_ascii.py video.mp4 --quiet
```
### Web Player Widget
Load an `.ascjson` export into any webpage with the included `website_widget.js`:
```html
```
| Output | Details |
| :--- | :--- |
|
| **Original Source**
Standard MP4 video file. |
|
| **ASCII Mode**
Showcases rendered using Mode 3 (32K Colors) from a 30fps source. |
|
| **PIXEL Mode**
Showcases rendered using Mode 5 (16m Colors) combined with the `--pixel` flag for ultra-high fidelity. |
## π― Strategic Vision & Core Capabilities
1. **Pure Typographic Manipulation**: The visual stream is not a standard media fileβit's raw HTML/Canvas text. This makes the impossible possible: you can apply real-time CSS filters (neon glows, text shadows, animations) to video content.
2. **Local AI & LLM Ready**: By reducing complex pixel streams into structured logical strings, ASCILINE acts as a perfect bridge for AI. Instead of feeding heavy computer vision models, lightweight LLMs can process semantic video summaries.
3. **Ultra-Low Bandwidth & Zero GPU (valid for ASCII MOD)**: Standard codecs (H.264/VP9) require dedicated hardware decoders, choking microcontrollers and weak devices. ASCILINE offloads the heavy lifting to the backend, streaming only lightweight text frames. By scaling down the output quality (using fewer columns), extremely low bandwidth requirements can be achieved. This means you can play fluid, real-time video on devices with constrained networks and zero GPU capabilities (smart appliances, retro terminals, basic microcontrollers).
4. **π Works Everywhere**: No `