music-library-converter/README.md

1.1 KiB

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