Split single-file MP3 albums into separate tracks. Downloads from YouTube supported.
Use album-splitter to automatically split any audio file (youtube videos, albums, podcasts, audiobooks, tapes, vinyls) into separate tracks starting from timestamps. album-splitter will also take care of tagging each part with the correct metadata. If your file is on YouTube, you can download it automatically.
Common use cases covered:
All you need is:
00:06 - When I Was Young
03:35 Dogs Eating Dogs
First time only:
ffmpeg
apt install ffmpeg
(or equivalent)brew install ffmpeg
Python 3
(a version newer or equal to 3.7
is required)
apt install python3
(or equivalent)brew install python3
python3 -m venv venv
source venv/bin/activate
./venv/Scripts/activate
python3 -m pip install album-splitter
After the first time:
source venv/bin/activate
./venv/Scripts/activate
album-splitter
:
python3 -m pip install --upgrade album-splitter
tracks.txt.example
, rename it as tracks.txt
tracks.txt
<start-time> - <title>
python -m album_splitter --file <path/to/your/album.mp3>
./splits/
foldertracks.txt.example
, rename it as tracks.txt
tracks.txt
<start-time> - <title>
python -m album_splitter -yt <youtube_url>
./splits
folderThe format of the output tracks is the same as the format of the input (same extension, same codec, same bitrate, ...), it simply does a copy of the codec. If you want to convert the output tracks to a different format, you can do this using additional tools.
For example to convert from .wav
to .mp3
you can use FFmpeg. Here is how you can do it on Linux/macOS. This or this might help for Windows instead. You can adopt such snippets to do other processing, such as changing the bitrate.
https://www.youtube.com/watch?v=p_uqD4ng9hw
tracks.txt
, eventually adjusting it to a supported format for the tracklist00:06 - When I Was Young
...
14:48 - Pretty Little Girl
python -m album_splitter -yt "https://www.youtube.com/watch?v=p_uqD4ng9hw"
and wait./splits
and I find all my songs: When I Was Young.mp3
...
Pretty Little Girl.mp3
These songs are already mp3-tagged with their track name and track number, but not their author or their album, since we have not specified it.
DogsEatingDogsAlbum.mp3
that I want to splittracks.txt
(same tracks as before)python -m album_splitter --file DogsEatingDogsAlbum.mp3 --album "Dogs Eating Gods" --artist "blink-182" --folder "2012 - Dogs Eating Dogs"
./splits
folder)tracks.txt
)These are just some examples, find more in tracks.txt.example
.
[hh:]mm:ss - Title
Title - [hh:]mm:ss
Title [hh:]mm:ss
To just see which data would be extracted from the tracklist use the option --dry-run
.
To get the full help and all the available options run python -m album_splitter --help
If you need any help just create an Issue or send me an email at the address you can find on my profile.
To update to use the latest version of album-splitter you can use python3 -m pip install --upgrade album-splitter
If you want to improve the code and submit a pull request, please feel free to do so.
GPL v3