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. You can install the program from PyPi using this:
# If you use pip
pip install syncbopy
# If you use uv
uv tool install syncbopy
Alternatively, you can run the code from source. 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:
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)
Metadata
Release files for syncbopy 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| syncbopy-1.0.1.tar.gz | 102.6 kB | Without provenance | Details for syncbopy-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| syncbopy-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for syncbopy-1.0.1-py3-none-any.whl |
Total release size: 125.3 kB
Release files / syncbopy-1.0.1.tar.gz
| Download URL | syncbopy-1.0.1.tar.gz |
|---|---|
| Size | 102.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4870f5aa6c44a036bb2af33dd4a68acf19b958be93651cc4e9b55202ddc02305
|
|
BLAKE2b-256 checksum How to use checksums |
ee5b416f76e2bbcb25291311a9cd320899e632fb77bcd02d5bd99f8c9fa6da61
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|
Release files / syncbopy-1.0.1-py3-none-any.whl
| Download URL | syncbopy-1.0.1-py3-none-any.whl |
|---|---|
| Size | 22.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1802866169ea6cf1fc85e3d9278119af30f85df257c54ea556b6c558a2da84ba
|
|
BLAKE2b-256 checksum How to use checksums |
089e6f88cc59df8964ab030341ee43abdc8ed081582c2f8e0fccafa8b2d039fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|
Security for syncbopy 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.