Skip to main content

MetaFlac batch editor

Project description

GitHub last commit

Lint and Test

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


Download files

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

Source Distribution

mfbatch-0.6.0.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

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

mfbatch-0.6.0-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

Details for the file mfbatch-0.6.0.tar.gz.

File metadata

  • Download URL: mfbatch-0.6.0.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for mfbatch-0.6.0.tar.gz
Algorithm Hash digest
SHA256 e178a2f945b05e684c1140f862c51519d801954c477dd28a824150a7dfb7290b
MD5 f5cd4c8acc3f40a8d40b6af23ff4808b
BLAKE2b-256 751f3913f859be047e8254393f86e93a87797560858ea418f5b1b3a539a753fe

See more details on using hashes here.

Provenance

The following attestation bundles were made for mfbatch-0.6.0.tar.gz:

Publisher: python-publish.yml on iluvcapra/mfbatch

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mfbatch-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: mfbatch-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 11.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for mfbatch-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6bb60df40480a16e0b52d5f7c9fe8df6f0bdcad59617d94e730b0d933c87b7a3
MD5 0d3236bcdf97e5432af1f1ffd7f4d793
BLAKE2b-256 8e995162810eafd584258a2db04c4ea01bbd2e305a64e271fdc19f7d3ec3bdad

See more details on using hashes here.

Provenance

The following attestation bundles were made for mfbatch-0.6.0-py3-none-any.whl:

Publisher: python-publish.yml on iluvcapra/mfbatch

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page