惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

小众软件
小众软件
Engineering at Meta
Engineering at Meta
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Apple Machine Learning Research
Apple Machine Learning Research
有赞技术团队
有赞技术团队
IT之家
IT之家
博客园_首页
V
Visual Studio Blog
The Register - Security
The Register - Security
云风的 BLOG
云风的 BLOG
Y
Y Combinator Blog
The Cloudflare Blog
Recorded Future
Recorded Future
V
V2EX
雷峰网
雷峰网
F
Full Disclosure
人人都是产品经理
人人都是产品经理
A
About on SuperTechFans
博客园 - Franky
Stack Overflow Blog
Stack Overflow Blog
Microsoft Security Blog
Microsoft Security Blog
L
LINUX DO - 热门话题
C
CERT Recently Published Vulnerability Notes
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Schneier on Security
Schneier on Security
T
Troy Hunt's Blog
K
Kaspersky official blog
N
Netflix TechBlog - Medium
Scott Helme
Scott Helme
AWS News Blog
AWS News Blog
Spread Privacy
Spread Privacy
美团技术团队
H
Hackread – Cybersecurity News, Data Breaches, AI and More
T
The Blog of Author Tim Ferriss
G
GRAHAM CLULEY
GbyAI
GbyAI
P
Proofpoint News Feed
P
Privacy & Cybersecurity Law Blog
The Hacker News
The Hacker News
罗磊的独立博客
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
腾讯CDC
H
Hacker News: Front Page
S
Security Archives - TechRepublic
Latest news
Latest news
H
Heimdal Security Blog
S
Security @ Cisco Blogs
C
CXSECURITY Database RSS Feed - CXSecurity.com
Blog — PlanetScale
Blog — PlanetScale
C
Cybersecurity and Infrastructure Security Agency CISA

Hacker News

Introducing Claude Opus 4.7 Qwen Studio The Future of Everything is Lies, I Guess: Where Do We Go From Here? GitHub - SeanFDZ/macmind: Single-layer transformer in HyperTalk for the classic Macintosh Show HN: Agent-cache – Multi-tier LLM/tool/session caching for Valkey and Redis Ancient DNA reveals pervasive directional selection across West Eurasia [pdf] Moving a large-scale metrics pipeline from StatsD to OpenTelemetry / Prometheus GitHub - Nightmare-Eclipse/RedSun: The Red Sun vulnerability repository GitHub - SethPyle376/hiraeth: Local AWS emulator focused on fast integration testing, with SQS support, SQLite-backed state, and a debug-friendly web UI. GitHub - macOS26/Agent: Any AI, replaces Claude Code, Cursor, OpenClaw. Over 18 LLM providers (Claude, OpenAI, Gemini, Ollama, Zai, HF, Qwen) wired into a native Mac app that writes code, builds Xcode projects, bumps versions, manages git, automates Safari, use AppleScript, JS or Accessibility, extend Agent! w/ MCP Servers, run tasks from your iPhone via Messages. YouTube now lets you turn off Shorts I Made a Terminal Pager Burgers | マクドナルド公式 Commands — HackerNews CLI documentation ChatGPT for Excel PiCore - Raspberry Pi Port of Tiny Core Linux Live Nation illegally monopolized ticketing market, jury finds Google Broke Its Promise to Me. Now ICE Has My Data. Founding Engineer at Adaptional | Y Combinator CRISPR takes important step toward silencing Down syndrome’s extra chromosome GitHub - saffron-health/libretto: The AI toolkit for building reliable browser automations US v. Heppner (S.D.N.Y. 2026) no attorney-client privilege for AI chats [pdf] Unexpected €54k billing spike in 13 hours: Firebase browser key without API restrictions used for Gemini requests Retrofitting JIT Compilers into C Interpreters IPv6 – Google The Accursèd Alphabetical Clock Cybersecurity Looks Like Proof of Work Now Fragments: April 14 Cal.com Goes Closed Source: Why AI Security Is Forcing Our Decision | Cal.com - Scheduling Software for Online Bookings Laravel raised money and now injects ads directly into your agent When moving fast, talking is the first thing to break Too much Discussion of the XOR swap trick – Heather Cafe Introduction to Spherical Harmonics for Graphics Programmers The Grand Line Building a Z-Machine in the worst possible language High-Level Rust: Getting 80% of the Benefits with 20% of the Pain GitHub - duguyue100/midnight-captain: Inspired by Midnight Commander, tailored to my taste. How to build a `git diff` driver · Jamie Tanna | Software Engineer Center for Responsible, Decentralized Intelligence at Berkeley The Local Universe’s Expansion Rate Is Clearer Than Ever, but Still Doesn’t Add Up - A new synthesis of astronomical measurements confirms a persistent mismatch that could point to physics beyond current models The air throughout our homes is infused with microplastics. But there are things you can do to breathe less of them The disturbing white paper Red Hat is trying to erase from the internet – OSnews The Future of Everything is Lies, I Guess: Annoyances ‘Abhorrent’: the inside story of the Polymarket gamblers betting millions on war Productive procrastination — Max van IJsselmuiden maps, territory and LMs 447 Terabytes per Square Centimetre at Zero Retention Energy: Non-Volatile Memory at the Atomic Scale on Fluorographane Show HN: Pardonned.com – A searchable database of US Pardons 20 Years on AWS and Never Not My Job The Seasons are Wrong Artemis II crew splashes down near San Diego after historic moon mission We gave an AI a 3 year retail lease in SF and asked it to make a profit | Andon Labs How a dancer with ALS used brainwaves to perform live On filing the corners off my MacBooks Installing every* Firefox extension OpenClaw’s memory is unreliable, and you don’t know when it will break Steve Blank Nowhere Is Safe Chimpanzees in Uganda locked in vicious 'civil war', say researchers watgo - a WebAssembly Toolkit for Go linux/Documentation/process/coding-assistants.rst at master · torvalds/linux GitHub - callumlocke/json-formatter: Makes JSON easy to read. Founding Product Engineer at Bild AI | Y Combinator A compelling title that is cryptic enough to get you to take action on it GitHub - Keychron/Keychron-Keyboards-Hardware-Design: Industrial design files for Keychron keyboards and mice. 100+ models with CAD assets in STEP, DXF, DWG, and PDF. Source-available, with commercial use allowed for original compatible accessories within the license terms. [ANNOUNCE] WireGuardNT v0.11 and WireGuard for Windows v0.6 Released 1D-Chess Helium Is Hard to Replace Cooperative Vectors Introduction | Evolve Keeping a Postgres queue healthy — PlanetScale Our response to the Axios developer tool compromise Do Americans read print books, e-books or audiobooks more? The Zettelkasten Method in Obsidian: A Practical Setup Guide Artemis II Is Competency Porn and We Are Starving For It WeakC4 Flight Viz — Cockpit View A Mexican surveillance giant you’ve never heard of is now watching the U.S. border Surelock: Deadlock-Free Mutexes for Rust RISC-V 101 – what is it and what does it mean for Canonical? | Ubuntu The Problem That Built an Industry How Much Linear Memory Access Is Enough? | Solidean Investigating Split Locks on x86-64 Simplest hash functions Sybilproof reputation mechanisms (2005) [pdf] What is a property? How Complex is my Code? Static code analysis in Kotlin — tools overview Toffoli gates are all you need PGLite evangelism dcmake: a new CMake debugger UI Clojure on Fennel part one: Persistent Data Structures Fragments: April 2 Python Release Python install manager 26.1 The Life and Death of the Book Review - Liberties Bitcoin miners are losing $19,000 on every BTC produced as difficulty drops 7.8% God sleeps in the minerals Building slogbox Apple Silicon and Virtual Machines: Beating the 2 VM Limit Who was “Not Even Wrong” first? Pokemon Evolution Vs Darwinian Evolution The APL Programming Language Source Code
GitHub - YusufB5/ASCILINE: A high-performance, real-time ASCII video rendering engine. Streams binary-encoded frames via WebSockets for ultra-low latency, 30 FPS playback using HTML5 Canvas and requestAnimationFrame.
2026-06-12 · via Hacker News

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.

Output Details
Original Source Original Source
Standard MP4 video file.
ASCII Mode ASCII Mode
Showcases rendered using Mode 3 (32K Colors) from a 30fps source.
PIXEL Mode 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 & IoT Compatibility (valid for ASCII MOD): Standard codecs (H.264/VP9) choke microcontrollers and weak networks. ASCILINE processes the heavy lifting once on the backend, streaming only a few kilobytes per frame.
  4. Bypassing Browser Constraints: Modern browsers aggressively throttle autoplay videos, and ad-blockers restrict traditional media frames. To the browser, ASCILINE is simply "JavaScript updating a canvas"—completely invisible to media restrictions.

🚀 Technical Features

  • Cross-Platform: Runs seamlessly on Windows, macOS, and Linux.
  • Real-Time ASCII Streaming: Low-latency video-to-ASCII conversion.
  • Real-Time Pixel Streaming: Replaces characters with colored blocks, approaching 360p video quality.
  • High Performance: Uses HTML5 Canvas for rendering, optimized for cinematic 24-30 FPS playback. High-FPS sources are automatically decimated for stability.
  • Master Clock Sync: The audio track acts as the absolute master clock, guaranteeing perfect A/V synchronization.
  • *Low-Overhead Binary Protocol: Frames are streamed as raw binary (Uint8Array) directly to the canvas, saving bandwidth and CPU.
  • Multiple Color Modes: Supports everything from classic B&W to 16M color ultra-fidelity.
  • Flexible Video Management: Supports JSON playlists (per-video mode & volume), folder-based auto-queuing (filesystem order), single-file mode, and infinite loop playback — all controlled via CLI arguments.

🛠️ Architecture

  1. Backend (Python/FastAPI): Decodes video using OpenCV, maps pixels to ASCII characters via NumPy, and streams binary data.
  2. Frontend (Vanilla JS): Receives binary frames via WebSockets, manages a jitter buffer, and renders to a Canvas grid.
  3. Communication: Optimized WebSocket protocol with a custom INIT handshake for dynamic resolution/FPS adjustment.

🗜️ Adaptive Frame Codec (opt-in, backward compatible)

The original binary protocol re-sends the full grid every frame. An opt-in adaptive codec picks the smallest of three encodings per frame and tags it in a 1-byte header — without changing the rendered output:

tag encoding best for
0 RAW framebuffer as-is (legacy) incompressible frames
1 ZLIB zlib(framebuffer) general motion
2 DELTA only the cells that changed since the last frame static / low-motion

Clients opt in with /ws?codec=adaptive; omit it and you get the original protocol byte-for-byte, so existing clients are unaffected. A keyframe is forced periodically so dropped packets / late joiners resync. The decoder (codec.js) is shared by the browser and the test suite, so the shipped path is the tested one.

Measured wire savings (mode 5, 200×80 grid):

content vs. legacy
static screen / slideshow 0.3% (≈375×)
pixel mode 11.6% (≈8.6×)
high-motion / full-frame change 63% (never worse than legacy)

An optional --quality {lossless,high,balanced,low} enables lossy temporal delta: a colour cell is only re-sent once it drifts past a tolerance from what the viewer already sees (the character plane stays exact), cutting the hard cases a further ~15–30% at imperceptible quality. Default is lossless (bit-exact).

Monitor Bandwidth in Real-Time: You can append the --debug flag when launching the server to see live bandwidth comparisons (RAW vs WIRE bytes) and the exact compression ratio in your terminal. This is highly useful for measuring the real-time savings of the adaptive codec on your specific video sources.

Verified two independent ways, both bit-exact: Python-encoded vectors decoded by codec.js in Node (experiments/gen_vectors.pyexperiments/check_vectors.js), and a live adaptive-vs-legacy WebSocket diff (experiments/test_e2e.js). Generate the test clips with experiments/make_test_clips.sh. (A fuller mutation-test + Autobahn

LAN / Network Streaming: To stream the video on your local network (Wi-Fi), use the --host flag:

python stream_server.py video.mp4 --host 0.0.0.0

📦 Installation

1. Clone the repository

git clone https://github.com/YusufB5/ASCILINE.git
cd ASCILINE

2. Install dependencies

pip install fastapi uvicorn opencv-python numpy websockets

🔈 Audio Support (FFmpeg Required)

To enable server-side audio processing (Volume 1-5), you must have FFmpeg installed.

Option 1: Package Manager (Recommended)

  • Windows: winget install ffmpeg
  • macOS: brew install ffmpeg
  • Linux: sudo apt install ffmpeg

Option 2: Manual Installation (Windows) If you get a FileNotFoundError or don't want to modify system variables:

  1. Download FFmpeg ZIP.
  2. Extract ffmpeg.exe from the bin folder.
  3. Drop it directly into your ASCILINE project folder alongside stream_server.py.

3. Run the Web Server

Single video:

python stream_server.py video.mp4 --cols 240

Folder mode — drop your videos into videos/ and run:

python stream_server.py --folder videos --cols 200
python stream_server.py --folder videos --cols 230 --loop          # infinite loop
python stream_server.py --folder videos --mode 5 --pixel --cols 320 --vol 2  # all videos same settings

Videos play in filesystem order (top to bottom as they appear in the folder, not alphabetically). Just add/remove files from the videos/ folder to control the queue.

JSON Playlist — full control per video:

python stream_server.py --playlist playlist.json --cols 220
python stream_server.py --playlist playlist.json --cols 220 --loop

Use playlist.json when you need different --mode or --vol settings for each video.

💡 Windows Users: You can use the included serve.bat shortcut for quicker typing: .\serve video.mp4 --cols 240

Open http://localhost:8000 in your browser.

4. Run directly in Terminal (Standalone)

If you prefer to bypass the web interface, you can render the video directly inside an ANSI-supported terminal (zero-flicker, true color):

python ascii_video_player2.py video.mp4 --cols 100 --quality 0

💡 Windows Users: Use the shortcut .\play video.mp4 -c 100 -q 0

⚠️ Note: Do not resize your terminal window during playback, as dynamic text wrapping will corrupt the ASCII layout.

🎨 Customization

You can easily customize the look and feel of the engine:

Styling

Edit style.css to change the accent colors and typography using CSS variables:

:root {
    --accent-color: #00ff41; /* Classic Matrix Green */
    --bg-color: #050505;
}

Rendering Modes

The engine supports different fidelity levels via the --mode flag:

  • 1: Black & White (DOM mode)
  • 2: 512 Colors
  • 3: 32K Colors
  • 4: 262K Colors
  • 5: 16M Colors (Ultra)
python stream_server.py --mode 5 --cols 240 --rows 100

📐 Resolution & Auto-Scaling

By default, you only need to specify the width (--cols). ASCILINE will automatically calculate the correct --rows based on the source video's aspect ratio to prevent stretching.

  • ASCII Mode Recommended: --cols 200 to --cols 240 (Best balance of text detail and cinematic 30 FPS performance).
  • Pixel Mode Recommended: --cols 600 to --cols 900 (Provides near-HD visual quality. Performance heavily depends on your machine's CPU/VRAM).
  • Smart Defaults: If you do not specify a --cols value, ASCILINE automatically defaults to 450 when Pixel Mode is enabled, and 200 for standard ASCII text mode.

  • ⚠️ Hardware Limits & A/V Sync: If you push the --cols too high for your specific hardware (e.g., 1350 on a laptop vs a gaming desktop), the Python backend won't be able to encode and send the massive frames fast enough. When the video stream lags behind the audio, you will experience A/V desync (audio finishing early). If this happens, simply lower your --cols value!

python stream_server.py video.mp4 --mode 5 --cols 240
# Terminal will show: [AUTO] 1920x1080 → grid 240x67

Server-Side Volume Control

Volume is controlled at the server level via the --vol flag (scale 0–5). When set to 0, the audio engine (FFmpeg) never runs, saving CPU and bandwidth.

--vol FFmpeg Multiplier Description
0 Muted (no processing)
1 1.0× Normal (default)
3 1.5× Loud
5 2.0× Double volume
python stream_server.py video.mp4 --pixel --cols 560 --vol 0   # Silent
python stream_server.py video.mp4 --cols 220 --vol 3   # Loud

Playlist Format (playlist.json)

Each entry can override the global --mode, --pixel, --vol, and --cols defaults:

[
    { "video": "intro.mp4",  "mode": 1, "vol": 1 },
    { "video": "main.mp4",   "mode": 5, "pixel": true, "vol": 3, "cols": 520 },
    { "video": "outro.mp4",  "mode": 3, "vol": 2, "cols": 240 }
]

Video paths are resolved automatically — the engine checks the project root and the videos/ subfolder, so you can write just the filename.

ASCILINE is distributed under the MIT License, but with a strict ethical guardrail. Because this engine bypasses standard browser constraints and ad-blockers (by rendering pure text instead of video), we strictly prohibit its use by ad-networks to serve unblockable advertisements.

See the LICENSE file for the full text, which includes the ANTI-ADVERTISEMENT RESTRICTION clause.

🟢 Live Interactive Showcase

Experience the ASCILINE engine running live directly in your browser with multiple rendering modes. 👉 Try it out at asciline.dev

📈 Star History

Star History Chart

☕ Support the Project ❤️

If you find this project helpful, you can support me by donating crypto:

  • Solana (SOL / USDC): H1wSQAhjgsu7AxenF4e5ZBYiBjkhDLVzkKaZuVPcrE14
  • Ethereum (ETH / USDT): 0x85B2f970045c0F7c282089Ab6CF897C20230e086
  • Bitcoin (BTC): bc1qvtcl55v54gkzwnp2zxn70usea3gf5ncncqa0fv

📜 License & Ethical Guardrails

MIT License (with Anti-Ad Restriction)

contact & questions:

asciline.engine@gmail.com