No description
This repository has been archived on 2025-01-18. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
Find a file
2018-10-08 18:30:00 -05:00
.gitignore Initial commit 2018-10-08 18:30:00 -05:00
convert-library.py Initial commit 2018-10-08 18:30:00 -05:00
LICENSE Initial commit 2018-10-08 18:30:00 -05:00
README.md Initial commit 2018-10-08 18:30:00 -05:00

convert-library

A Python script I use personally for converting/copying my music library in preparation for putting onto devices with limited storage space.

Usage

usage: convert-library.py [-h] [-i --input] [-d --dir]

A utility for converting all music files to a lossy equivalent and to a new
location, preserving directory structure and copying album artwork..

optional arguments:
  -h, --help  show this help message and exit
  -i --input  Directory that marks the root of the library structure.
  -d --dir    Directory to output new library to.

This script will walk the entire directory tree of input/, use ffmpeg to convert all lossless audio files to ogg opus at 192kbps, and copy all others and album art, preserving directory structure, to dir/.

Currently, this script considers these following supported files:

Lossless audio:

  • *.flac
  • *.alac
  • *.wav

Lossy audio:

  • *.mp3
  • *.m4a
  • *.ogg
  • *.opus

Album art filenames:

  • albumart
  • cover
  • folder
  • front

Album art file extensions:

  • *.jpg
  • *.png