https://github.com/trentonom0r3/celux
CeLux: High-performance video processing for Python, powered by FFmpeg and PyTorch. Ultra-fast video decoding directly to tensors with CPU and CUDA support.
https://github.com/trentonom0r3/celux
ffmpeg libtorch machne-learning python pytorch tensors torch video-processing video-reader
Last synced: about 1 year ago
JSON representation
CeLux: High-performance video processing for Python, powered by FFmpeg and PyTorch. Ultra-fast video decoding directly to tensors with CPU and CUDA support.
- Host: GitHub
- URL: https://github.com/trentonom0r3/celux
- Owner: Trentonom0r3
- License: agpl-3.0
- Created: 2024-09-28T06:37:57.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-01-25T06:10:18.000Z (over 1 year ago)
- Last Synced: 2025-03-25T07:17:29.895Z (over 1 year ago)
- Topics: ffmpeg, libtorch, machne-learning, python, pytorch, tensors, torch, video-processing, video-reader
- Language: C++
- Homepage:
- Size: 194 MB
- Stars: 11
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: docs/CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/Trentonom0r3/CeLux/actions/workflows/createRelease.yaml)
[](LICENSE)
[](https://pypi.org/project/celux/)
[](https://pypi.org/project/celux-cuda/)
[](https://pypi.org/project/celux/)
[](https://pypi.org/project/celux/)
[](https://discord.gg/hFSHjGyp4p)
# CeLux
**CeLux** is a high-performance Python library for video processing, leveraging the power of FFmpeg. It delivers some of the fastest decode times for full HD videos globally, enabling efficient and seamless video decoding directly into PyTorch tensors.
The name **CeLux** is derived from the Latin words `celer` (speed) and `lux` (light), reflecting its commitment to speed and efficiency.
# [Check out the latest changes](docs/CHANGELOG.md#version-060)
- **CeLux** now has basic audio support!
- Decode into tensor, or directly into file.
## 📚 Documentation
- [📝 Changelog](docs/CHANGELOG.md)
- [📦 Installation Instructions](docs/INSTALLATION.md)
- [🤖 PIP installation](docs/INSTALLATION.md#pip-installation)
- [🛠️ Building from Source](docs/INSTALLATION.md#building-from-source)
- [🚀 Getting Started](docs/GETTINGSTARTED.md)
- [📊 Benchmarks](docs/BENCHMARKS.md)
- [🤝 Contributing Guide](docs/CONTRIBUTING.md)
- [❓ FAQ](docs/FAQ.md)
## 🚀 Features
- **⚡ Ultra-Fast Video Decoding:** Achieve lightning-fast decode times for full HD videos using hardware acceleration.
- **🔗 Direct Decoding to Tensors:** Decode video frames directly into PyTorch tensors for immediate processing.
- **🔄 Easy Integration:** Seamlessly integrates with existing Python workflows, making it easy to incorporate into your projects.
## ⚡ Quick Start
```sh
pip install celux # cpu only version
```
```py
from celux import VideoReader, Scale
#import celux as cx
filters = [Scale(width = 1920, height = 1080)]
reader = VideoReader("/path/to/video.ext",
#num_threads: int = os.cpu_count(),
filters = filters,
#tensor_shape: str = 'HWC'
)
for frame in reader:
# do something
```
## 📊 Benchmark Summary
| Library | Device | Frames per Second (FPS) |
|----------|--------------|-------------------------|
| Celux | CPU | 1520.75 |
| PyAV | CPU | 350.58 |
| OpenCV | CPU | 454.44 |
For more details, see [Benchmarks](docs/BENCHMARKS.md).
## 📄 License
This project is licensed under the **GNU Affero General Public License v3.0 (AGPL-3.0)**. See the [LICENSE](LICENSE) file for details.
## 🙏 Acknowledgments
- **[FFmpeg](https://ffmpeg.org/):** The backbone of video processing in CeLux.
- **[PyTorch](https://pytorch.org/):** For tensor operations and CUDA support.
- **[Vcpkg](https://github.com/microsoft/vcpkg):** Simplifies cross-platform dependency management.
- **[@NevermindNilas](https://github.com/NevermindNilas):** For assistance with testing, API suggestions, and more.