No project description provided
Project description
shrinktunes
shrinktunes is a convenience wrapper for ffmpeg batch jobs. It was originally created for batch converting audio files in a large asset library to various formats, containers, and compression levels.
Usage
Once installed, you can use the shrinktunes command to convert files specified individually or with a glob pattern. Below are some examples.
Convert a Single File
shrinktunes convert "path/to/your/file.wav" -o mp3
Convert Files to Multiple Formats
shrinktunes convert "path/to/your/files/*.wav" -o mp3 -o ogg
Convert with Verbose Logging
shrinktunes convert -v "path/to/your/files/*.wav" -o mp3
Force Overwrite Existing Files
shrinktunes convert "path/to/your/files/*.wav" -o mp3 -f
Installation
You'll need to have FFmpeg installed on your machine to use shrinktunes. If you don't have it installed, the CLI will provide instructions on how to get it based on your platform.
This project uses poetry for dependency management and packaging. To install shrinktunes, first get poetry, then run:
poetry install
Commands
shrinktunes convert
-
<glob_pattern>: A quoted glob pattern for files to convert, e.g. `"path/to/your/files/*.wav"(Note: If you forget to quote it, it won't be interpreted as a glob, but rather expanded by your shell, which will likely result in an error.`)
-
-o <ext>: Output format by file extension; must be specified one or more times. Supported formats are dynamically determined fromffmpeg(seeshrinktunes infofor common formats orffmpeg -formatsfor all of them). -
-v: Enable verbose logging mode -
-f: Force overwrite of existing files
shrinktunes info
You can also use shrinktunes to print information about the available codecs on your system with the info command:
$ shrinktunes info
ffmpeg is installed
Decoders:
aac raw ADTS AAC (Advanced Audio Coding)
avi AVI (Audio Video Interleaved)
flac raw FLAC
m4a QuickTime / MOV
mp3 MP3 (MPEG audio layer 3)
mp4 QuickTime / MOV
ogg Ogg
wav WAV / WAVE (Waveform Audio)
webm Matroska / WebM
Encoders:
avi AVI (Audio Video Interleaved)
flac raw FLAC
mp3 MP3 (MPEG audio layer 3)
mp4 MP4 (MPEG-4 Part 14)
ogg Ogg
wav WAV / WAVE (Waveform Audio)
webm WebM
Note It currently filters down to a few common ones (let me know of obvious oversights).
Use ffmpeg -formats to see the full list (they will still work with shrinktunes if ffmpeg can do it; the list is just overwhelmingly long so we have made it short).
Development
Clone the repository and install the dependencies with Poetry:
git clone https://github.com/your-username/shrinktunes.git
cd shrinktunes
poetry install
Tests
Tests utilize pytest. After installing the dependencies, run the tests with:
poetry run pytest
Or, inside a venv like I do:
$ source .venv/bin/activate
(shrinktunes) $ pytest
Contributing
We welcome contributions! Please open an issue or submit a pull request on GitHub.
License
shrinktunes is open-source software, released under MIT License.
Author
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 shrinktunes-0.1.0.tar.gz.
File metadata
- Download URL: shrinktunes-0.1.0.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fddc77c904795e286a92e3b8bf027df80b0d699125206e3aff93f9fc718c23df
|
|
| MD5 |
8ad301fb6958c8cfb58c19595241cb39
|
|
| BLAKE2b-256 |
6074c92c0e80bef300692e53030652b32cdc21391bfef62c595e359fa0bd85e0
|
File details
Details for the file shrinktunes-0.1.0-py3-none-any.whl.
File metadata
- Download URL: shrinktunes-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
26e5a132407a1472e6bcb1b7b500f630c5dbf6194472b527e76dc100958fdb31
|
|
| MD5 |
93a9a736969fda0daa44d9992a3da0e2
|
|
| BLAKE2b-256 |
56fe558d1638ae45d7fc313b558206985a18e0086841e49955c92b5e5b552027
|