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.0.tar.gz (242.0 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.0-cp314-cp314-macosx_11_0_arm64.whl (271.6 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

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

Hashes for memvid_rs-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cd15e5c8c78f3bcd706117f995a4d49cc644bbfcdba885487b4b0a080ac8a8a0
MD5 9f6096826a7bd493ba99049faf3dc98e
BLAKE2b-256 4af0b447a65bc1fc7c774cbb70c6031894ad08206e3c61c8e54e03a066dc9f0a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for memvid_rs-0.1.0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f3092db435acb0ae7a54adeb7c426b302e8460142c6bfd636b580e916d12c78e
MD5 61ad14aa886f338ebd8350bbcfbd1748
BLAKE2b-256 68a336c759745c4c93f311e59ae7056288d7f60d9057c96cc858eb8646265701

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