mp32png
Pack MP3 files into PNG images and extract them back — with bit-identical guarantees.
Install
git clone <repository>
cd mp32png
pip install .
Usage
mp32png pack song.mp3 song.png
mp32png pack song.mp3 song.png --cover
mp32png pack song.mp3 song.png --cover cover.jpg
mp32png extract song.png song.mp3
mp32png extract song.png
mp32png verify song.png
mp32png hash song.mp3
mp32png hash song.png
Commands
| Command | Description |
|---|---|
pack |
Pack MP3 into PNG |
extract |
Extract MP3 from PNG |
verify |
Verify PNG container integrity |
hash |
Calculate SHA-256 hash |
How It Works
The MP3 binary data is stored in custom PNG ancillary chunks (dMP3).
The visible PNG image is a cover — either extracted from the MP3's ID3 tags,
provided explicitly, or auto-generated.
Data is split into 1 MiB chunks. Each container stores:
- Magic bytes (
MP3PNG) - Format version
- Original filename
- MIME type
- File size
- SHA-256 checksum
- MP3 binary data
Bit-Identical Extraction
mp32png pack original.mp3 packed.png
mp32png extract packed.png restored.mp3
sha256sum original.mp3 restored.mp3
Both hashes will match exactly.
License
MIT
Release files for mp32png 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mp32png-1.0.0.tar.gz | 12.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mp32png-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 25.1 kB
Release files / mp32png-1.0.0.tar.gz
| Download URL | mp32png-1.0.0.tar.gz |
|---|---|
| Size | 12.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1e8a82b0f55c4b32b3354b59df0f65a1453e6a3ad36bef2b820e5d5dae90cbf1
|
|
BLAKE2b-256 checksum How to use checksums |
bce3978975a889dc7ba8ca918bb46e929d4dfe053bfa46fb9862caf674ffca90
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Release files / mp32png-1.0.0-py3-none-any.whl
| Download URL | mp32png-1.0.0-py3-none-any.whl |
|---|---|
| Size | 12.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a8787d152b6445c0364c3b677ce699e47612b158a0f93ceea202834ddad8133e
|
|
BLAKE2b-256 checksum How to use checksums |
be9c2b5018c1a4b1fe688e7be156ee915474d62d4bcf80074709da64430e027e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|