MetaFlac batch editor
Project description
mfbatch
mfbatch
is a command-line tool for batch-editing FLAC audio file metadata.
It reads a directory of FLAC files, extracts the existing metadata to an
intelligent text file format that the user can modify to update a large number
of files and dynamic per-file metadata with a minimal number of edits.
mfbatch
is a front-end for metaflac(1)
which must be installed on the
system.
Motivation
I've been reorganzing my sound effects library recently and have had to edit a large number of FLAC files, adding and editing descriptions, normalizing fields etc. and this is one of the tools I've come up with for updating a large number of FLAC files in an easy way quickly. It works completely in the command line and is designed to be used with your favorite text editor.
Workflow
1) Create a new MFBATCH_LIST
file for a directory of FLAC files.
$ cd path/to/my/flacs
$ mfbatch -c
mfbatch
will scan the current working directory and
all subdirectories recursively. You can use a -p
option
to switch to another directory before scanning.
2) Edit the MFBATCH_LIST
file in your $EDITOR
.
$ mfbatch --edit
The MFBATCH_LIST
file will contain a transcript of all of the flac files
in the selected folder along with their current metadata.
:set ALBUM 'Test Album 1'
:set ARTIST 'Test Artist'
:set DESCRIPTION 'Tone file #1, test tone 440Hz'
:setp TITLE DESCRIPTION "^Tone file #(\d+).*" 'Tone \1'
./tone1.flac
:set DESCRIPTION 'Tone file #2, also 440Hz'
./tone2.flac
:unset DESCRIPTION
:set DESCRIPTION 'Tone file #3'
./tone3.flac
The MFBATCH_LIST
format allows you to set metadata once and then write values
to a run of files all at once. Several commands are available to manipulate
the metadata written to the files.
3) After you've made the changes you want to make, write them to the files.
$ mfbatch -W
Writing metadata is interactive, mfbatch
will display the
metdata to be written to each file and metadata can be
edited interactively at a prompt before writing.
Limitations
- Does not support newlines in field values. This is mostly by choice, newlines don't offer any benefit in my preferred sound library programs but this wouldn't be a tough feature to add if anyone needed it.
- Does not support multiple artwork types, everything is stored as type
3
/ (album artwork-front). - Can only store unique field keys, field values of the same key overwrite old values. This is also something that is tailored to my use-case and could be changed if there was interest in doing so.
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
File details
Details for the file mfbatch-0.5.0.tar.gz
.
File metadata
- Download URL: mfbatch-0.5.0.tar.gz
- Upload date:
- Size: 9.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c3975c6e21be0848f97b1bf96b620dc49a1a93e8f4237145edf8e14ba362133d |
|
MD5 | 954ae0332031c2dda8d4839244084c18 |
|
BLAKE2b-256 | 3924f79351fcced43947798049656a089b0dc0b6d22f9285b6df75b3e559fd4b |
File details
Details for the file mfbatch-0.5.0-py3-none-any.whl
.
File metadata
- Download URL: mfbatch-0.5.0-py3-none-any.whl
- Upload date:
- Size: 10.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 086a78290903201b13ec4a1f6d2514d54eac343c85e44c90f5f24b8cba052613 |
|
MD5 | f06a228e296a4f2881453e4352f98497 |
|
BLAKE2b-256 | 8e21a886b72075de720dfc2d69a5243c7fdb3da364b96206180f29fbb20e8669 |