Convert a music library from one format to another
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
will 73c1af2ef8
Turns out argparse handles mandatory argments lol
9 months ago
.gitignore Update README and gitignore 9 months ago
LICENSE.md Add CNPLv7+ License document 9 months ago
README.md Delist mutagen dependency. I'm not using that yet 9 months ago
ansicodes.py Basic functionality complete 9 months ago
main.py Turns out argparse handles mandatory argments lol 9 months ago

README.md

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