Skip to main content

fxcue

Tell your users where the effects go.

fxcue analyses a video and returns an effects plan: a list of timestamped effect cues (zooms, transitions, shakes, whooshes…), each with the reason it was placed there. It is built for developers making beginner-friendly editing apps, auto-clippers and video tools. Your app decides how to show or apply each cue.

fxcue demo: original video on the left, fxcue's suggested effects applied on the right

Left: the original. Right: fxcue's plan applied by the example preview script. Footage: Big Buck Bunny © Blender Foundation, CC BY 3.0.

   0:02.0  transition  1.0  scene change
   0:02.0  whoosh_sfx  1.0  scene change
   0:12.4  zoom_in     0.6  loud moment
   0:45.2  shake       0.7  strong hit
  • Fast, offline and lightweight. No GPU and no AI model downloads.
  • Explainable: every cue says why it was placed.
  • Never cluttered: built-in spacing keeps effects from piling up.
  • Pluggable: add your own detectors and rules.
  • Plain JSON output that any language can read.

Install

pip install fxcue

fxcue reads video through FFmpeg. If FFmpeg isn't on your system, the bundled imageio-ffmpeg binary is used automatically.

Quickstart

import fxcue

plan = fxcue.plan("video.mp4", style="energetic")
for cue in plan.cues:
    print(cue.time, cue.effect, cue.reason)
plan.save("plan.json")

Or from the command line:

fxcue video.mp4                    # print the plan
fxcue video.mp4 -o plan.json       # save it as JSON
fxcue video.mp4 --style calm

See a plan

examples/preview.py renders a rough preview of a plan (effects, sound effects and labels) so you can judge it by eye and ear:

python examples/preview.py video.mp4 preview.mp4 --side-by-side

It's an illustration: in your app, apply cues with your own effects.

Effects

Effect names are generic, so your app can map each one to its own assets.

Effect Kind Placed on (energetic style)
transition visual scene changes
whoosh_sfx audio scene changes
zoom_in visual loud moments
punch_zoom visual very loud moments (replaces zoom_in)
impact_sfx audio very loud moments
shake visual strong hits
flash visual strong music beats

Styles

Style Min gap between visual effects Max visual effects per minute Uses
calm 4 s 6 transitions, zooms on very loud moments
energetic 1.5 s 20 everything above (default)
vlog 2.5 s 12 transitions + whooshes, zooms

There is never more than one visual effect at the same moment. When effects collide, story moments win over decoration: scene change > loud moment > strong hit > music beat, then the stronger one. A sound effect is dropped when the visual effect it belongs to is dropped.

JSON output

{
  "schema_version": 1,
  "duration": 6.0,
  "style": "energetic",
  "cues": [
    {"time": 2.0, "effect": "transition", "strength": 1.0,
     "reason": "scene change", "source": "scenes", "duration": 0.5, "priority": 3,
     "explanation": "The picture changes completely here: a new shot starts"}
  ]
}

duration is a suggested length in seconds; apps may ignore it. Load a saved plan with fxcue.Plan.load("plan.json").

Show beginners why

Every cue has a short reason ("loud moment") and an explanation with a measured, checkable number, something a beginner can verify by listening or watching:

0:09.5  zoom_in     About 19 dB louder than the rest of the clip, roughly 3.7x as loud to the ear
0:11.9  transition  The picture changes completely here: a new shot starts
0:21.4  flash       On the beat of the music (about 123 BPM)

Each cue also has a strength from 0 to 1, so your app doesn't have to treat every suggestion the same. For example, apply strong cues and offer weak ones as optional:

apply   = [c for c in plan.cues if c.strength >= 0.6]
suggest = [c for c in plan.cues if c.strength < 0.6]

Re-plan part of a video

Trimmed the outro or swapped a scene? Keep the cues your user already accepted and get fresh suggestions only for the part that changed:

accepted = fxcue.Plan.load("accepted.json")          # or a list of Cue objects
plan = fxcue.plan("video_v2.mp4", start=42.0, keep=accepted)
  • start / end (seconds) limit where new cues are suggested.
  • keep cues come back unchanged; new suggestions keep their distance from them and respect the style's per-minute limit. Kept cues past the end of a trimmed video are dropped.

From the command line: fxcue video_v2.mp4 --start 42 --keep accepted.json -o plan.json

Customise

Your own rules replace the style's rules but keep its spacing:

from fxcue import Rule

plan = fxcue.plan("video.mp4", rules=[
    Rule("scene_change", ["flash", "whoosh_sfx"]),
    Rule("loud_peak", ["shake"], min_strength=0.5),
])

Event kinds from the built-in detectors are scene_change, loud_peak, beat and onset.

Your own detector, for example one using an AI model:

from fxcue import Event

class LaughDetector:
    name = "laughs"
    needs = "audio"          # or "video"

    def detect(self, media):  # media.path, media.audio (samples, rate) or None, media.duration
        return [Event(time=12.3, kind="loud_peak", strength=0.9, source=self.name)]

fxcue.register_detector(LaughDetector())   # used by every plan() call from now on

How it works

video ─► detectors ─► events ─► style rules ─► spacing pass ─► plan
  • scenes: hard cuts, found with PySceneDetect
  • loudness: moments much louder than the clip's own typical level (librosa)
  • beats: music beats and strong hits (librosa)

Roadmap

  • Optional preview render, so you can see a plan applied
  • Optional AI detectors (speech emphasis, laughter, faces)
  • More effects and styles, contributed by the community

Contributing

Contributions are welcome, especially new detectors, styles and effect ideas. See CONTRIBUTING.md.

Licence

MIT © Anal Kanti Roy. See LICENSE.

Metadata

Release files for fxcue 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fxcue 0.3.0
File Size Uploaded Provenance Actions
fxcue-0.3.0.tar.gz 2.9 MB With provenance Details for fxcue-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for fxcue 0.3.0
File Interpreter ABI Platform Actions
fxcue-0.3.0-py3-none-any.whl Python 3 none any Details for fxcue-0.3.0-py3-none-any.whl

Total release size: 2.9 MB

Release files / fxcue-0.3.0.tar.gz

Download URL fxcue-0.3.0.tar.gz
Size 2.9 MB
Tags Source
SHA-256 checksum
How to use checksums
337095780ac90035bea35781a9b4d946bfa9d3996814c615da473e8462e1dfd8
BLAKE2b-256 checksum
How to use checksums
c9ccb09fb88d3db9b4e7fcd0993f5bc1f81a13c80a0bddef9c25bf95af37b58e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

Release files / fxcue-0.3.0-py3-none-any.whl

Download URL fxcue-0.3.0-py3-none-any.whl
Size 17.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5c5f820f589e78fc41f8d7f1278498bc78d896c482a88fa4edded266b3aa300f
BLAKE2b-256 checksum
How to use checksums
ec752ac14a8c8e5faa68ad7ad5d9eee96f3044701909c53063847c557f5ae98e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

Security for fxcue 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for fxcue-0.3.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page