eid-mubarakc-0.1.0 is not a library.
Eid Mubarak! 🌙 ✨
A CLI tool to celebrate Eid Mubarak with stunning ASCII video art directly in your terminal!
🚀 Installation
1. Install Dependencies
This project relies on ffmpeg to process video frames. You need to install the required system packages before installing the tool.
Linux (Debian / Ubuntu)
Linux (Arch)
macOS
2. Install the Package
You can easily install the tool using cargo:
🧠 How it Works
This tool creates a beautiful terminal-based video player using Rust and ffmpeg. Here is how it works under the hood:
- Video Decoding: It reads a video file using the
ffmpeg-nextcrate and decodes the video streams frame by frame. - Resizing & Scaling: Each frame is scaled down to a manageable terminal size (50x20) and converted to RGB pixel format using bilinear scaling.
- ASCII Mapping: For each pixel, the brightness is calculated. Based on the brightness level, the pixel is mapped to a specific ASCII character from a predefined density scale.
- Terminal Rendering: The ASCII characters are printed to the terminal with their original colors using
crossterm. - Overlay Text: Beautiful Eid greetings in English (ASCII Art) and Arabic are superimposed onto the video output at specific coordinates.
- Frame Synchronization: The tool calculates the delay between frames to match the original framerate of the video, ensuring smooth playback.
كل عام وأنتم بخير وصحة وسعادة وعافية - تقبل الله منا ومنكم صالح الأعمال