Package: album-splitter
album-splitterUsealbum-splitterto 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:music album on YouTube to download and split into tracksfull audiobook to split into chaptersmusic tape/cassette rip to split into tracksdigitalized vinyl to split into tracksAll you need is:The file to split OR an URL of a YouTube videoTimestamps for each track, for example:00:06 - When I Was Young03:35 Dogs Eating DogsHow to installFirst time only:InstallffmpegLinux:apt install ffmpeg(or equivalent)Windows:Official websiteMacOS:Official websiteorbrew install ffmpegInstallPython 3(a version newer or equal to3.7is required)Linux:apt install python3(or equivalent)Windows:Official webisteMacOS: You should have it already installedOpen your terminal appCreate a virtual environmentpython3 -m venv venvActivate the virtual environmentLinux/MacOS:source venv/bin/activateWindows:./venv/Scripts/activateInstall album-splitterpython3 -m pip install album-splitterYou are ready to go!After the first time:Open your terminal appOptional, update album-splitter:python3 -m pip install --upgrade album-splitterActivate the virtual environmentLinux/MacOS:source venv/bin/activateWindows:./venv/Scripts/activateYou are ready to go!Quick guide (from a local album)Create a copy of thetracks.txt.example, rename it astracks.txtOpentracks.txtAdd your tracks timestamps info in this format:<start-time> - <title>A track on each lineSeeExamplessection, many other formats supportedRun the scriptBasic usage:python -m album_splitter --file <path/to/your/album.mp3>More in theExamplessectionWait for the splitting process to completeYou will find your tracks in the./splits/folderQuick guide (from a YouTube video)Copy the YouTube URL of the album you want to download and splitFind in the YouTube comments the tracklist with start-time and titleCreate a copy of thetracks.txt.example, rename it astracks.txtOpentracks.txtCopy the tracklist in the file, adjusting for the supported formats<start-time> - <title>A track on each lineRun the scriptBasic usage:python -m album_splitter -yt <youtube_url>More in theExamplessectionWait for the Download and for the conversionWait for the splitting process to completeYou will find your tracks in the./splitsfolderOutput FormatThe 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.wavto.mp3you can use FFmpeg.Hereis how you can do it on Linux/macOS.Thisorthismight help for Windows instead. You can adopt such snippets to do other processing, such as changing the bitrate.ExamplesDownloading and splitting an album from YouTubeThis is the album I want to download and split:https://www.youtube.com/watch?v=p_uqD4ng9hwI find the tracklist in the comments and I copy that intracks.txt, eventually adjusting it to a supported format for the tracklist00:06 - When I Was Young
...
14:48 - Pretty Little GirlI executepython -m album_splitter -yt "https://www.youtube.com/watch?v=p_uqD4ng9hw"and waitOnce the process is complete I open the./splitsand I find all my songs:When I Was Young.mp3
    ...
    Pretty Little Girl.mp3These 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.Splitting and tagging with Author and Album a local fileI somehow got the fileDogsEatingDogsAlbum.mp3that I want to splitI set the tracklist intracks.txt(same tracks as before)I executepython -m album_splitter --file DogsEatingDogsAlbum.mp3 --album "Dogs Eating Gods" --artist "blink-182" --folder "2012 - Dogs Eating Dogs"The software will execute, it will split the album, and mp3-tag each track with the author and the album name I passed as a parameter (as well as track number and name). It will also put the files in the folder passed as an argument (instead of putting them in the default./splitsfolder)Supported formats for the track list (tracks.txt)These are just some examples, find more intracks.txt.example.[hh:]mm:ss - TitleTitle - [hh:]mm:ssTitle [hh:]mm:ssTo just see which data would be extracted from the tracklist use the option--dry-run.Available OptionsTo get the full help and all the available options runpython -m album_splitter --helpNeed help?If you need any help justcreate an Issueor send me an email at the address you can find on my profile.UpdatingTo update to use the latest version of album-splitter you can usepython3 -m pip install --upgrade album-splitterWant to help?If you want to improve the code and submit a pull request, please feel free to do so.LicenseGPL v3