Skip to main content

A blazing fast video editing library wrapping FFmpeg native filters.

Project description

core-flux (Concisely Optimized Render Engine - FFmpeg Linear User Xtension)

A high-performance video editing library built entirely on top of native FFmpeg filters. By bypassing Python-level pixel manipulation and compiling operations directly into a single native filter graph, core-flux runs at maximum speed with a beautiful, chainable API.


Installation

pip install core-flux

Quick Start

from core_flux import FastVideo

# Trim, crop, speed up, convert to B&W, and render instantly
(FastVideo("input.mp4")
 .trim(start_time=2, end_time=12)
 .crop(x1=100, y1=100, width=1280, height=720)
 .speedx(1.5)
 .blackwhite()
 .render("output.mp4"))

Features

  • Chainable API — Compose operations fluently in a single, readable expression.
  • FFmpeg-Native Speed — Zero Python processing bottleneck; your timeline is compiled into a native C-level graph.
  • Advanced Multi-Format Export — Render high-quality crisp GIFs using dual-pass palette generation or pull out pure audio streams instantly.
  • Audio Control — Easily scale volume, mute streams, or add entirely new external audio backdrops.

API Reference

FastVideo(input_path)

Load a media file for editing.

video = FastVideo("input.mp4")

.trim(start_time, end_time)

Cut the video and audio between two timestamps (in seconds).

video.trim(0, 10)

.resize(width, height)

Scale the video to the given dimensions in pixels.

video.resize(1920, 1080)

.crop(x1, y1, width, height)

Crop a specific region of the video frame starting from coordinates (x1, y1).

video.crop(100, 100, 640, 480)

.rotate(angle)

Rotate the video frame natively. Accepts 90, 180, or 270 degrees.

video.rotate(90)

.speedx(factor)

Speed up or slow down both video playback and audio pitch together (e.g., 2.0 for 2x speed, 0.5 for slow-mo).

video.speedx(2.0)

.blackwhite()

Convert the video to cinematic black and white.

video.blackwhite()

.adjust_colors(contrast=1.0, brightness=0.0, saturation=1.0)

Adjust contrast, brightness, and saturation. Values above 1.0 increase the effect; below 1.0 decrease it.

video.adjust_colors(contrast=1.2, saturation=1.5)

.fade_out(start_fade, duration=1.0)

Add a smooth fade-to-black effect starting at start_fade seconds.

video.fade_out(start_fade=8.0, duration=2.0)

.with_volume_scaled_to(factor)

Scale the audio volume (e.g., 0.5 for half volume, 2.0 to boost it).

video.with_volume_scaled_to(0.5)

.without_audio()

Completely strip the audio track from the output.

video.without_audio()

.replace_audio(new_audio_path)

Swap the current audio track for a separate external media file.

video.replace_audio("soundtrack.mp3")

.render(output_path, format_type='video')

Compile the filter graph and write the result to disk.

  • format_type='video': Exports standard .mp4 video.
  • format_type='gif': Generates a high-quality, palette-optimized GIF.
  • format_type='audio': Drops the video stream and exports raw audio (e.g., .mp3 or .aac).
# Save as video
video.render("output.mp4")

# Save as crisp high-quality GIF
video.render("reaction.gif", format_type="gif")

Requirements

  • Python 3.8+
  • FFmpeg installed and available on your PATH

License

MIT

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

core_flux-0.2.1.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

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

core_flux-0.2.1-py2.py3-none-any.whl (3.6 kB view details)

Uploaded Python 2Python 3

File details

Details for the file core_flux-0.2.1.tar.gz.

File metadata

  • Download URL: core_flux-0.2.1.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.33.0

File hashes

Hashes for core_flux-0.2.1.tar.gz
Algorithm Hash digest
SHA256 b3473a9f8cdc6632b2f2cd7c7042d147c3aa31661e2c6574bfd0a009fa0c0746
MD5 0516f0518f9f7ca4616e29fd4bccf4d9
BLAKE2b-256 dec83bc76ed882702515a7be305e4d3c4ae4c9d8fe75a28c648ff4d70615f345

See more details on using hashes here.

File details

Details for the file core_flux-0.2.1-py2.py3-none-any.whl.

File metadata

  • Download URL: core_flux-0.2.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.33.0

File hashes

Hashes for core_flux-0.2.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 9c75b3f6c02c783f8fb885e07a3a305e4e06375bcd8f35eb074a0ceac5e83276
MD5 072097a2e4e1ade14d76d2e4ef0fe5b7
BLAKE2b-256 c5f2f13262d66da220827706961c0bcc7f7db3ade32bf121bd2ae331d575f49d

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