Convert a music library from one format to another
Find a file
2023-08-06 17:01:33 -06:00
.gitignore Update README and gitignore 2023-08-02 23:33:13 -06:00
ansicodes.py Basic functionality complete 2023-08-04 21:53:47 -06:00
LICENSE.md Add CNPLv7+ License document 2023-08-02 22:09:38 -06:00
main.py Turns out argparse handles mandatory argments lol 2023-08-06 17:01:33 -06:00
README.md Delist mutagen dependency. I'm not using that yet 2023-08-04 21:55:44 -06:00

music-library-converter

A basic Python script that recursively scans a directory and replicates it in the target directory with all the audio files converted to the target format.

Untested outside of Linux. Your mileage may vary.

Features

  • Compatible with any input format supported by ffmpeg without needing it to be specified
  • Replicates directory structure
  • Can also copy other files
  • Preserves metadata (not cover art yet. working on it) (or can strip it, if you want)
  • Output bitrate can be controlled
  • Ignores files that already exist in the target directory

Motivation

I use Syncthing to copy my entire music library to my phone as an alternative to streaming services, and thousands of lossless FLACs take up more space on there than I'd like, so I wrote a Bash script to automatically convert them to MP3s. Being a Bash script written by me, it wasn't very good, so I decided to rewrite it in Python.

TODO

  • Preserve embedded cover art
  • Don't ignore files when origin file is newer than target
  • Alert user when source directory doesn't exist or target directory already has files
  • Progress display

Dependencies

  • ffmpeg
  • pydub