Tiny CLI to extract and tag audio tracks from video files via ffmpeg.
Project description
Product intent
- Extract production-ready audio from lecture/screencast videos without a DAW.
- Provide predictable defaults while surfacing audio engineering knobs only when needed.
- Run entirely from the terminal so it fits into automation scripts and batch workflows.
Requires
ffmpeg/ffprobeon PATH (brew install ffmpegon macOS).
UX design
Mental model
- Primary verb is
extract; everything else is an option that describes the desired audio file. - Default behaviour: first audio track, full timeline, export as high-quality
mp3next to the source file. - Advanced controls are flat flags (no subcommands) to keep the command memorable.
User journey
- Discovery -
sound-track-extract --helplists one-liners for common tasks so a new user can copy/paste. - Pre-flight - tool validates: source exists, ffmpeg installed, output path writable, and timecodes sane. Errors are plain-English with fixes.
- Execution - renders a short status block (input -> output, duration, selected format) before running ffmpeg.
- Completion - success message with location + file size; failures forward stderr and exit non-zero for scripting.
Key interactions
sound-track-extract video.mp4-> default mp3 export (320 kbps, stereo, original length).--format wav|flac|aac|oggswitches container/mode; CLI auto-adjusts sane defaults (e.g., bitrate ignored for lossless).--start/--endallow clipping a segment; acceptsHH:MM:SSor seconds.--sample-rate,--channels,--bitratetune technical audio output, grouped by option help text.--output-dirand--name-templatecontrol where/how files are named (placeholders:{stem},{format},{track}).--title/--artist/--album/--commentembed metadata; status panel now shows detected duration for confidence.--list-tracksprints detected audio streams,--audio-trackpicks one, and--forceoverwrites existing exports.--dry-runprints the ffmpeg command without executing, enabling trust before use.- Clear error copy for common mistakes (missing ffmpeg, overlapping timecodes, unwritable folders).
Usage
uv run sound-track-extract kdd_lec7.mp4
# or run the module directly
uv run python -m sound_track_extract.cli kdd_lec7.mp4
Frequently used recipes
- Quick mp3:
sound-track-extract talk.mov - Lossless FLAC:
sound-track-extract talk.mov --format flac - Clip a quote:
sound-track-extract talk.mov --start 00:10:05 --end 00:12:20 - Inspect tracks:
sound-track-extract talk.mov --list-tracks - Pick a dubbed track:
sound-track-extract talk.mov --audio-track 1 - Custom destination:
sound-track-extract talk.mov --output-dir exports --name-template "{stem}_clean" - Tag metadata:
sound-track-extract talk.mov --title "Lecture 7" --artist "KDD" - Automate:
find . -name '*.mp4' -exec sound-track-extract {} --format wav --force \;
Development
uv sync # install deps
uv run --extra dev pytest
uv run sound-track-extract --help
See CHANGELOG.md for progress snapshots.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sound_track_extract-0.1.0.tar.gz
(10.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sound_track_extract-0.1.0.tar.gz.
File metadata
- Download URL: sound_track_extract-0.1.0.tar.gz
- Upload date:
- Size: 10.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ff539e407356acbaa69253e0708296d70036bde50991f0abe4235551143f4bc9
|
|
| MD5 |
19898221af55b9a0efab8e5948653d42
|
|
| BLAKE2b-256 |
ca835f847a5a4d72beb9c63f5a3f3069ab175d922f7c5a6f33929c3ef33eb7fa
|
File details
Details for the file sound_track_extract-0.1.0-py3-none-any.whl.
File metadata
- Download URL: sound_track_extract-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
26adc86d153bf98db197d397ea4a46edddfaef49f3fffc9709dad536050fb39d
|
|
| MD5 |
dd5e21f1e557057a807dfbc19f428e78
|
|
| BLAKE2b-256 |
8f17cec08fa78b07f6e8328d572ec05122bed44451b03e1d500a61598319adf2
|