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.
- CeLux now has basic audio support!
- Decode into tensor, or directly into file.
- ⚡ 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.
pip install celux # cpu only version
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
Library | Device | Frames per Second (FPS) |
---|---|---|
Celux | CPU | 1520.75 |
PyAV | CPU | 350.58 |
OpenCV | CPU | 454.44 |
For more details, see Benchmarks.
This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). See the LICENSE file for details.
- FFmpeg: The backbone of video processing in CeLux.
- PyTorch: For tensor operations and CUDA support.
- Vcpkg: Simplifies cross-platform dependency management.
- @NevermindNilas: For assistance with testing, API suggestions, and more.