A mass treatment script for extracting part of audio files using FFMPEG
Project description
Audio extract
Batch extract part of multiple audio files It's a wrapper around FFMPEG. Give these guys a thumbs up ! https://www.ffmpeg.org/
Build
See build.md
installation
prerequisites
- ffmpeg installed
- python installed
- download and install the wheel file for CLI or gui-x.x.x. from here [https://github.com/makiwara-fr/extract_audio_exercept/releases/latest]
How to - Graphical interface
- Download
audio_extract.exefrom here [https://github.com/makiwara-fr/extract_audio_exercept/releases/latest] - Put it where ever you want
- click on the file to launch it
How to - CLI
installation
pip install batch-audio-extract
After installing, the wheel.
In any working directory, create a file parameters.yaml (see example below). If undefined, default parameters will apply.
input_dir: input
output_dir: output
first_second: 0
last_second: 120
input_file_extension: [mp3, wav]
Then launch command in a terminal, in the directory of the parameters.yaml file
audio_extract
see more with
audio_extract --help
Parameters for parameters.yaml
| Parameter | Description | Default Value |
|---|---|---|
input_dir |
The directory containing the audio files you want to process. | Current directory |
output_dir |
The directory where the extracted audio clips will be saved. The output format is original_filename_extract.mp3. |
./output/ |
first_second |
The start time (in seconds) for the audio extraction. | 0 |
last_second |
The end time (in seconds) for the audio extraction. | 60 |
input_file_extension |
A list of file extensions to be considered for processing. | [mp3, wav] |
path_ffmpeg (optional) |
The path to the FFMPEG bin directory if it's not in your system's PATH. |
Not set |
debug (optional) |
Enables debug mode for more verbose output. | False |
Parameters for CLI
All parameters from the parameters.yaml file can be overridden via command-line arguments.
| Argument | Description | Corresponding yaml parameter |
|---|---|---|
-d, --debug |
Enable debug mode. | debug |
-i, --input |
Input directory containing audio files. | input_dir |
-o, --output |
Output directory for extracted audio files. | output_dir |
-s, --start |
Starting second for the audio excerpt. | first_second |
-e, --end |
Ending second for the audio excerpt. | last_second |
-f, --fade |
Fade duration in seconds (0 for no fade). | fade_d |
Examples
-
Extract the first 30 seconds of all audio files in the
my_audiodirectory and save them tomy_extracts:audio_extract --input my_audio --output my_extracts --start 0 --end 30
-
Extract audio from second 60 to 120 with a 3-second fade in/out:
audio_extract --start 60 --end 120 --fade 3
-
Run in debug mode using a custom input directory:
audio_extract --debug --input /path/to/your/audio
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
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 batch_audio_extract-0.6.0.tar.gz.
File metadata
- Download URL: batch_audio_extract-0.6.0.tar.gz
- Upload date:
- Size: 288.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d1a833ac954f19383918e4a997eed879ded590dc0789974e0ebf1c1724e4cef
|
|
| MD5 |
1fcf79de1df6792d0327ffe8fab3bdc2
|
|
| BLAKE2b-256 |
7116d436111172367678499023a874c5fff70ebcf34859b77780f9c3ce075a66
|
Provenance
The following attestation bundles were made for batch_audio_extract-0.6.0.tar.gz:
Publisher:
release.yml on makiwara-fr/audio_extract
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
batch_audio_extract-0.6.0.tar.gz -
Subject digest:
7d1a833ac954f19383918e4a997eed879ded590dc0789974e0ebf1c1724e4cef - Sigstore transparency entry: 763777884
- Sigstore integration time:
-
Permalink:
makiwara-fr/audio_extract@6617ee1d223cd45e274ab8c4bd8ddb5e04d81020 -
Branch / Tag:
refs/tags/v0.6 - Owner: https://github.com/makiwara-fr
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@6617ee1d223cd45e274ab8c4bd8ddb5e04d81020 -
Trigger Event:
release
-
Statement type:
File details
Details for the file batch_audio_extract-0.6.0-py3-none-any.whl.
File metadata
- Download URL: batch_audio_extract-0.6.0-py3-none-any.whl
- Upload date:
- Size: 9.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d15ab63231cd0f22c718070d77b037080fe8a8f03fbfc0e303ea3c33270b437a
|
|
| MD5 |
e7bcb1c57afe87424204aaf094da2130
|
|
| BLAKE2b-256 |
165b16d4d97c1002bbd5e7e49dc95a2fcd70f3f3d27d8f8e53f234af787b809a
|
Provenance
The following attestation bundles were made for batch_audio_extract-0.6.0-py3-none-any.whl:
Publisher:
release.yml on makiwara-fr/audio_extract
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
batch_audio_extract-0.6.0-py3-none-any.whl -
Subject digest:
d15ab63231cd0f22c718070d77b037080fe8a8f03fbfc0e303ea3c33270b437a - Sigstore transparency entry: 763777885
- Sigstore integration time:
-
Permalink:
makiwara-fr/audio_extract@6617ee1d223cd45e274ab8c4bd8ddb5e04d81020 -
Branch / Tag:
refs/tags/v0.6 - Owner: https://github.com/makiwara-fr
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@6617ee1d223cd45e274ab8c4bd8ddb5e04d81020 -
Trigger Event:
release
-
Statement type: