Skip to main content

A tool to easily maintain and synchronise a smaller-size copy of your music library in the OPUS format. For audiophiles who want to put their collections on a mobile device.

Project description

A simple python tool to (incrementally) synchronise a music library to a target directory in compressed OPUS format.

Do you have a mixed (FLAC, mp3, m4a, ogg) library of music? Do you want to put it on your mobile device? syncbopy helps you transcode it to OPUS, carry over tags, and synchronise your library it to your device. On any consecutive runs, only files that have been changed will be updated. Unchanged files are not touched.

How to use

As simple as can be.

syncbopy /path/to/your/music/library/ /path/to/sync/to/

syncbopy takes two main arguments: First is a source library, which is the folder where you keep all your music (e.g. ~/Music/ on linux, or C:/Users/<username>/Music on windows). This folder will not be touched, it will just be read. Then the target library, which is where you want to synchronise to (another folder on your computer, a folder on your phone). You can optionally provide the amount of threads to use using --workers, or specify a target (average) bitrate using --bitrate.

For example: I have my music in ~/Music/, and I have mounted my phone's storage at /mnt/. I use MTP, so I want to have my compressed music library at /mnt/Internal\ shared\ storage\Music\portable. I want to run on 8 threads. I would run the following command.

syncbopy --workers 8 ~/Music "/mnt/Internal shared storage/Music/portable"

Features

  • Converts from many file formats to OPUS.
  • Hand-crafted tag conversion. Maps tags from one format to the other, supporting multiple artists etc.
  • Supports incremental updates. No need to remove everything and sync from scratch, just sync what you changed!
  • Resume after interrupt.
  • Discards all embedded images to save space.
  • Copies over external cover art (cover.png, folder.jpg, etc.)
  • Respects folder structure of your library.

After every write operation, a cache with hashes is updated in the target directory. Because of this, if the synchronisation is interrupted (cancel the script, device disconnected), the script can pick back up where it left off when you restart it.

Installation

Very simple! Make sure you have FFmpeg installed. Then, get the code in this repository:

git clone https://codeberg.org/aidavdw/syncbopy
cd syncbopy

You can then install it, after which you can run it as stated above.

# If you use uv
uv tool install -e .
# If you use pip
pip install .

Alternatively, you can then run the program directly if you have uv:

uv run syncbopy /path/to/music/library/ /path/to/sync/to/

Dependencies

This program uses ffmpeg under the hood. It has been tested with version 4.4.2, but it should run with newer too.

Why OPUS?

mp3 is great, but OPUS is greater. It's pretty well supported by most music player apps, and saves a lot more space for the same quality of audio.

Roadmap

  • Convert png/webp images to jpg on-the-fly
  • Handle deleting songs in the source library
  • Sync playlists (.m3u etc)

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

syncbopy-1.0.tar.gz (102.6 kB view details)

Uploaded Source

Built Distribution

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

syncbopy-1.0-py3-none-any.whl (22.6 kB view details)

Uploaded Python 3

File details

Details for the file syncbopy-1.0.tar.gz.

File metadata

  • Download URL: syncbopy-1.0.tar.gz
  • Upload date:
  • Size: 102.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for syncbopy-1.0.tar.gz
Algorithm Hash digest
SHA256 bbd1282e7c2257762b9341da8216521c015e90f502b34636a3d88d3e0acd1aa7
MD5 000b73228d4010df5f3d848570e2e131
BLAKE2b-256 f7f9c104b82be8c97a10327dab94a58dacd30c24bbbdae14c4480d9bdd37185e

See more details on using hashes here.

File details

Details for the file syncbopy-1.0-py3-none-any.whl.

File metadata

  • Download URL: syncbopy-1.0-py3-none-any.whl
  • Upload date:
  • Size: 22.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for syncbopy-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 acf3daee6ebe89dcb6fc90d5ea897d9db4eddf1d8a3a294697955f0f7f35b218
MD5 81803374c901ac2d40345774c439957a
BLAKE2b-256 f1fc3db1f1966e670dd5748fbfa74c711486216b161438399c6982bf8dcada0b

See more details on using hashes here.

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