Skip to main content

mixing

Tools for video and audio editing in Python — slicing, fades, audio replace/mix, Ken Burns, thumbnails, subtitles, speech-to-text + filler removal, TTS dubbing, and chapter detection.

pip install mixing

🤖 AI-first: start with the skills & agents

mixing is built to be driven by AI coding agents. The fastest, most reliable way to use it is through the bundled skills and agents in .claude/ — task-oriented playbooks that encode the right functions, the calling conventions, and the gotchas, so an agent gets it right the first time.

Skills (.claude/skills/) — how to use mixing for a task:

Skill Use it for
mixing Start here — router, architecture, the output protocol, extras
mixing-audio slice, fade, crop, concat, overlay, normalize, align, segment audio
mixing-video slice, crop, loop, speed, replace/normalize audio, Ken Burns, thumbnails, subtitles
mixing-transcript transcribe, remove fillers, SRT/prose, chapters
mixing-dubbing TTS re-voicing & SRT translation

Agents (.claude/agents/):

  • mixing-editor — performs an editing task end-to-end ("edit this media …").
  • mixing-dev — works on the mixing codebase.

Using Claude Code? These are discovered automatically from .claude/. The architectural contract they share lives in .claude/CLAUDE.md.


Quick start

import mixing  # cheap: no moviepy/opencv loaded yet

assert mixing.has_ffmpeg()  # most ops need ffmpeg on PATH

# --- audio ---
from mixing.audio import Audio

Audio("song.mp3")[10:30].fade_in(2).fade_out(3).save(output="clip.mp3")

# --- video ---
from mixing.video import replace_audio, ken_burns_video

replace_audio("clip.mp4", "music.mp3", mix_ratio=0.7, output="mixed.mp4")
ken_burns_video("cover.jpg", duration=8, output="cover.mp4")

# --- transcript: remove "uh"/"um" (ElevenLabs Scribe + ffmpeg) ---
from mixing.transcript import remove_fillers

result = remove_fillers("talk.mov", "out/")  # uses $ELEVENLABS_API_KEY
print(result.cleaned_media)

Core ideas (learn once)

The output protocol. Every result-producing function takes one output argument whose role is constant and type is open:

crop_video("in.mp4", 5, 15, output="out.mp4")  # file → writes it, returns Path
crop_video("in.mp4", 5, 15, output="clips/")  # dir  → auto-named file inside
crop_video("in.mp4", 5, 15)  # None → saves beside the input
fade_in("in.mp3", output=lambda audio: audio)  # callable → receives the result

Object producers (audio editing) return the in-memory object when output=None, so you can chain and save when ready. Functions that emit several artifacts qualify the destinations (remove_fillers(media, output_dir=…, output_media=…)).

Lazy & tiered. import mixing (and import mixing.chapters / mixing.srt) pull no heavy backends; moviepy/opencv/pydub load only when you touch a name that needs them. Import the facade (mixing.Video) or the subpackage (from mixing.video import Video).

Sliceable media. Audio and Video are lazy, sliceable, context-managed views:

from mixing.video import Video

with Video("movie.mp4") as v:
    v[10:30].save(output="cut.mp4")  # seconds; v[100] returns a single frame

Requirements

  • ffmpeg on PATH (most operations). macOS: brew install ffmpeg; Debian/Ubuntu: sudo apt install ffmpeg; Windows: download from ffmpeg.org and add bin to PATH.
  • ElevenLabs API key for mixing.transcript / mixing.dubbing (ELEVENLABS_API_KEY, or pass api_key=). Responses are cached on disk, so re-runs are free and offline.
  • Google Cloud auth for AI video generation (mixing.video.genai, Vertex AI Veo).

Optional extras

pip install mixing[audio]      # pydub / ffmpeg-python / soundfile
pip install mixing[widget]     # interactive Jupyter audio widget
pip install mixing[gen]        # Google Vertex AI Veo generation
pip install mixing[llm]        # aix — chapter titling + SRT translation
pip install mixing[clipboard]  # get file paths from the clipboard

What's inside

Subpackage Highlights
mixing.audio Audio, fade_in/out, crop_audio, concatenate_audio, overlay_audio, loop_audio, duck_audio, find_audio_offset, find_segments/extract_segments
mixing.video Video, crop_video, loop_video, change_speed, replace_audio, normalize_audio, overlay_ambient_bed, ken_burns_video/ken_burns_film, concatenate_videos, make_thumbnail, write_subtitles_in_video, SOCIAL_SIZES
mixing.video.genai generate_video (Vertex AI Veo)
mixing.transcript transcribe, remove_fillers, srt_for_media, words_to_srt/words_to_prose
mixing.chapters detect_chapters, Chapter
mixing.dubbing text_to_speech, list_voices, translate_srt, dub_video_from_srt
mixing.srt Cue, parse_srt, dump_srt, seconds_to_srt_time

See the skills for the full, example-driven API of each.

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mixing-0.0.36.tar.gz (23.4 MB view details)

Uploaded Source

Built Distribution

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

mixing-0.0.36-py3-none-any.whl (193.5 kB view details)

Uploaded Python 3

File details

Details for the file mixing-0.0.36.tar.gz.

File metadata

  • Download URL: mixing-0.0.36.tar.gz
  • Upload date:
  • Size: 23.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for mixing-0.0.36.tar.gz
Algorithm Hash digest
SHA256 f627a176570e352e8fc5ae2a477121110de3eea66c959160a148e1bbf263fbbf
MD5 892d4b9582def1e66cd095d3e0200119
BLAKE2b-256 a7494f6ede986ee4ab5ef78e4ceb9cf24255d8e465fc2afe5f86beffe03f38df

See more details on using hashes here.

File details

Details for the file mixing-0.0.36-py3-none-any.whl.

File metadata

  • Download URL: mixing-0.0.36-py3-none-any.whl
  • Upload date:
  • Size: 193.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for mixing-0.0.36-py3-none-any.whl
Algorithm Hash digest
SHA256 416054fc13a7aafb150de3e451316080d87c8791b9b11196ca19d8f4fc1cf0a9
MD5 8a55b136003d30336045588c56a75f97
BLAKE2b-256 b86a3146bf9cb50c6679d01043feebb48c57ffead05d0f0bcf4dc988526cbf04

See more details on using hashes here.

Release history Release notifications | RSS feed

0.0.39

2 files

0.0.38

2 files

0.0.37

2 files

This release

0.0.36 This release

2 files

0.0.35

2 files

0.0.34

2 files

0.0.33

2 files

0.0.32

2 files

0.0.31

2 files

0.0.29

2 files

0.0.28

2 files

0.0.27

2 files

0.0.26

2 files

0.0.25

2 files

0.0.24

2 files

0.0.23

2 files

0.0.22

2 files

0.0.21

2 files

0.0.20

2 files

0.0.19

2 files

0.0.18

2 files

0.0.17

2 files

0.0.16

2 files

0.0.15

2 files

0.0.14

2 files

0.0.13

2 files

0.0.12

2 files

0.0.11

2 files

0.0.10

2 files

0.0.9

2 files

0.0.8

2 files

0.0.7

2 files

0.0.6

2 files

0.0.5

2 files

0.0.4

2 files

0.0.3

2 files

0.0.2

2 files

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