Why I Built ani-sync: The Zero-Buffering Terminal Anime Streamer with Multi-Cloud Sync
If you have ever tried streaming anime directly from your terminal, you have probably used tools like ani-cli or simple web scrapers. While minimalist bash scripts are great, they frequently hit three major bottlenecks: - Buffering & Connection Throttling: Single-threaded HTTP streams choke when remote anime CDNs throttle transfer rates to ~50 KB/s. - Manual Scrobbling Friction: After finishing an episode, you still have to switch windows to update MyAnimeList, AniList, or Kitsu manually. - Browser Bloat: Running heavy browser tabs consumes 2-3 GB of RAM, spins laptop fans, and exposes users to intrusive ad trackers. To solve this, I built ani-sync - an open-source, hardware-accelerated terminal anime streaming player and downloader with automated multi-platform synchronization. โก Architecture: Achieving Zero-Buffering Playback Instead of streaming video sequentially through a single slow TCP socket, ani-sync uses a 4-tier acceleration pipeline: [ Remote HLS Stream ] โ โผ (64 Concurrent Parallel Sockets via yt-dlp) [ โก Turbo Multi-Thread Engine ] โ โผ (10,000+ MB/s Shared Memory Bus) [ ๐พ RAM Disk (/dev/shm) Cache ] โโโ (Background Pre-fetch of Episodes N+1, N+2) โ โผ (GPU Hardware Acceleration: Intel VAAPI / NVDEC / AMD) [ ๐ฌ MPV Player (Zero-Buffer Local Stream) ] โ โผ (On Window Close / Finish) [ ๐ Multi-Cloud OAuth API Scrobbler ] 64-Connection Parallel Swarm: By pulling 64 segments concurrently across multiple TCP sockets, entire 25-minute episodes load in 3-5 seconds, completely saturating available bandwidth. Linux RAM-Disk Caching (/dev/shm): Video fragments stream straight into tmpfs shared RAM at 10,000+ MB/s, eliminating disk I/O bottlenecks and preventing SSD write wear. Predictive Dual Pre-Fetching: While you watch Episode 1, Episodes 2 and 3 preload silently in a background thread, enabling instant 0.00s transitions between episodes. Hardware Video Offloading: Video decoding is offloaded to the GPU via --hwdec=auto-safe, keeping CPU utilization under 5% and RAM usage around 30 MB. ๐ Performance Benchmark - ๐พ RAM Footprint: 1,800 MB - 3,500 MB (Browser) โ28 MB - 45 MB (ani-sync) - โก CPU Utilization: 30% - 60% (Browser) โ2% - 5% GPU Decoded (ani-sync) - ๐ก๏ธ Telemetry & Trackers: 40+ JS Pixels (Browser) โ0 Telemetry (ani-sync) - โฑ๏ธ Seek & Start Latency: 10s - 30s Buffering (Browser) โ0.00s Instant RAM Cache (ani-sync) - ๐ Progress Auto-Sync: โ Manual (Browser) โโ MAL + AniList + Kitsu (ani-sync) - โฉ Opening / Ending Skip: โ Manual scrubbing (Browser) โโ AniSkip [Tab]/[o] (ani-sync) โจ Standout Features ๐ Multi-Platform Background Sync: Marks progress simultaneously across MyAnimeList, AniList (GraphQL), and Kitsu (JSON:API) the moment an episode finishes. โฉ Frame-Accurate AniSkip Integration: Integrates with api.aniskip.com timestamps to automatically skip intros/outros or skip on demand with Tab or o. ๐ Interactive FZF Search: Built-in fuzzy filtering across episode pickers, seasons, and local watch history. ๐ฌ Discord Rich Presence: Broadcasts current episode progress and title directly over local IPC without third-party bloat. ๐ Quick Install Linux & macOS (One-Liner): Bash curl -fsSL https://raw.githubusercontent.com/idrisharis12/ani-sync/main/install.sh | bash Arch Linux (AUR): Bash yay -S ani-sync Debian / Ubuntu (.deb): Bash curl -LO https://github.com/idrisharis12/ani-sync/releases/latest/download/ani-sync_2.7.1_all.deb sudo apt install -y ./ani-sync_2.7.1_all.deb Windows (PowerShell): PowerShell irm https://raw.githubusercontent.com/idrisharis12/ani-sync/main/install.ps1 | iex ๐ฎ CLI Usage Example Bash 1. Search and stream ani-sync "frieren" 2. Resume last watched anime ani-sync continue 3. Stream with auto-skip enabled ani-sync "attack on titan" --skip 4. Batch download episodes for offline travel ani-sync "jujutsu kaisen" -d -e 1-12 โญ Source Code & Documentation: ani-sync Top comments (0)
Comments
No comments yet. Start the discussion.