Skip to main content

High-performance video memory encoding library (Rust bindings)

Project description

memvid-rs (Python Bindings)

🇰🇷 한국어 (Korean)

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 pip and 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

📄 License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

memvid_rs-0.1.1.tar.gz (242.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

memvid_rs-0.1.1-cp314-cp314-macosx_11_0_arm64.whl (272.4 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

File details

Details for the file memvid_rs-0.1.1.tar.gz.

File metadata

  • Download URL: memvid_rs-0.1.1.tar.gz
  • Upload date:
  • Size: 242.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.10.2

File hashes

Hashes for memvid_rs-0.1.1.tar.gz
Algorithm Hash digest
SHA256 d477b87ccd9f1375599c17467dc08c9225209e49a0fa7ea9426946f5ae3558a4
MD5 be0a92f3c308e7de298c08dc8b994116
BLAKE2b-256 6ee1a31c1a271a20f665170680e02f4b07d2e67d018a9f205fbe1aeed80e101b

See more details on using hashes here.

File details

Details for the file memvid_rs-0.1.1-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for memvid_rs-0.1.1-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c909460cbda56cb9f46516d81121b397e48f71fd4e38f2a046f2fc154671e226
MD5 8cb7061b56ed5f52292c851273ab9ba7
BLAKE2b-256 282113da3948849bc7c01c30ea32fc44ecf4934962cc78465f955455a861762a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page