High-performance video memory encoding library (Rust bindings)
Project description
memvid-rs (Python Bindings)
Memvid-rs combines the performance of Rust with the ease of use of Python. It encodes text data into QR codes and then into video frames, allowing for efficient storage and retrieval of large datasets.
This project exposes the core logic written in Rust (MemvidEncoder) as a Python module via PyO3.
Attribution: This project is a port reimplemented in Rust based on the ideas and design of Olow304/memvid. We deeply appreciate the innovative approach of the original project.
🚀 Key Features
- High Performance: Leverages Rust's parallel processing and efficient memory management for fast text-to-video conversion.
- Pythonic: Easy to install via
pipand use naturally as a Python object. - Strong Compression: Significantly reduces storage space via Text -> QR -> Video (H.264/H.265) conversion.
📦 Installation
From Source (Development)
Requires Rust and Python development environments.
# 1. Install Rust & FFmpeg
brew install rust ffmpeg
# 2. Create and activate virtual environment
python3 -m venv .venv
source .venv/bin/activate
# 3. Install Maturin
pip install maturin
# 4. Build and install
maturin develop --release
From PyPI (Recommended)
pip install memvid-rs
From GitHub
pip install git+https://github.com/drivenbycode/memvid-rs.git
💻 Usage
import memvid_rs
# 1. Initialize Encoder
encoder = memvid_rs.MemvidEncoder()
# 2. Add Text
# add_text(text, chunk_size, overlap)
text_data = "Memvid-rs is fast and efficient. " * 100
encoder.add_text(text_data, chunk_size=200, overlap=20)
# 3. Build Video
try:
encoder.build("output.mp4", "index.json")
print("Video created: output.mp4")
except Exception as e:
print(f"Error: {e}")
⚠️ Requirements
- System: macOS (Tested), Linux, Windows
- Runtime:
ffmpeg(Required for video encoding)- macOS:
brew install ffmpeg
- macOS:
📄 License
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file memvid_rs-0.1.0.tar.gz.
File metadata
- Download URL: memvid_rs-0.1.0.tar.gz
- Upload date:
- Size: 242.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.10.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd15e5c8c78f3bcd706117f995a4d49cc644bbfcdba885487b4b0a080ac8a8a0
|
|
| MD5 |
9f6096826a7bd493ba99049faf3dc98e
|
|
| BLAKE2b-256 |
4af0b447a65bc1fc7c774cbb70c6031894ad08206e3c61c8e54e03a066dc9f0a
|
File details
Details for the file memvid_rs-0.1.0-cp314-cp314-macosx_11_0_arm64.whl.
File metadata
- Download URL: memvid_rs-0.1.0-cp314-cp314-macosx_11_0_arm64.whl
- Upload date:
- Size: 271.6 kB
- Tags: CPython 3.14, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.10.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f3092db435acb0ae7a54adeb7c426b302e8460142c6bfd636b580e916d12c78e
|
|
| MD5 |
61ad14aa886f338ebd8350bbcfbd1748
|
|
| BLAKE2b-256 |
68a336c759745c4c93f311e59ae7056288d7f60d9057c96cc858eb8646265701
|