Skip to content

Commit

Permalink
Improve instructions in README
Browse files Browse the repository at this point in the history
  • Loading branch information
crisbal committed Oct 19, 2022
1 parent 6057c76 commit 6bab200
Showing 1 changed file with 45 additions and 17 deletions.
62 changes: 45 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,46 +1,74 @@
# album-splitter

Do you have a music album as a single file (locally or on YouTube), with all its tracks joined together? Do you want to split that album in its single tracks? Do you want to tag these tracks so your music player can get all the required info from them?
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.

This script is for you!
Common use cases covered:

* music album on YouTube to download and split into tracks
* full audiobook to split into chapters
* music tape/cassette rip to split into tracks
* digitalized vinyl to split into tracks

All you need is:

* The file to split OR an URL of a YouTube video
* Timestamps for each track, for example:
* `00:06 - When I Was Young`
* `03:35 Dogs Eating Dogs`

## How to install

First time only:

+ Install `ffmpeg`
+ Install ```Python 3```
* Linux: `apt install ffmpeg` (or equivalent)
* Windows: [Official website](https://ffmpeg.org/)
* MacOS: [Official website](https://ffmpeg.org/) or `brew install ffmpeg`
+ Install `Python 3` (a version newer or equal to `3.7` is required)
* Linux: `apt install python3` (or equivalent)
* Windows: [Official webiste](https://www.python.org/)
* MacOS: You should have it already installed
+ Clone/Download this repository
+ `cd album-splitter/`
* [Click here](https://github.com/crisbal/album-splitter/archive/refs/heads/master.zip) to download it as a ZIP and extract it
* Or use `git clone https://github.com/crisbal/album-splitter/`
+ Open your terminal app and navigate to where you have extracted/cloned the `album-splitter` project
* For example: `cd Downloads/album-splitter`
* Use `ls` (or `dir` on Windows) to check that you are in a folder containing a `README.md`
+ `python -m venv venv`
+ Create a virtual environment: `python3 -m venv venv`
+ Activate the virtual environment
* Linux: `source venv/bin/activate`
* Linux/MacOS: `source venv/bin/activate`
* Windows: `./venv/Scripts/activate`
* You will need to do this step everytime you want to use the software
+ Install the package
* `pip install .`
* `python3 -m pip install .`
+ You are ready to go!

After the first time:

+ Open your terminal app and navigate to where you have extracted/cloned the `album-splitter` project
+ Activate the virtual environment
* Linux/MacOS: `source venv/bin/activate`
* Windows: `./venv/Scripts/activate`
+ You are ready to go!

## Quick guide (from a local album)

+ Create a copy of the `tracks.txt.example`, rename it as `tracks.txt` and
delete the lines starting with #.
+ Create a copy of the `tracks.txt.example`, rename it as `tracks.txt`
+ Open `tracks.txt`
+ Add tracks info in this format:
+ Add your tracks timestamps info in this format:
* `<start-time> - <title>`
* A track on each line
* See *Examples* section, many other formats supported
+ Run the script
* Basic usage: `python -m album_splitter --file <path/to/your/album.mp3>`
* More in the *Examples* section
+ Wait for the splitting process to complete
+ You will find your tracks in the `splits` folder
+ You will find your tracks in the `./splits/` folder

## Quick guide (from a YouTube video)

+ Copy the YouTube URL of the album you want to download and split
+ Find in the YouTube comments the tracklist with start-time and title
+ Create a copy of the `tracks.txt.example`, rename it as `tracks.txt` and
delete the lines starting with #.
+ Create a copy of the `tracks.txt.example`, rename it as `tracks.txt`
+ Open `tracks.txt`
+ Copy the tracklist in the file, adjusting for the supported formats
* `<start-time> - <title>`
Expand All @@ -56,7 +84,7 @@ This script is for you!

The 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](https://stackoverflow.com/a/41207442) is how you can do it on Linux/macOS. [This](https://sourceforge.net/projects/ffmpeg-batch/) or [this](https://stackoverflow.com/a/56244203) might help for Windows instead. You can adopt such snippets to do other processing, such as changing bitrate.
For example to convert from `.wav` to `.mp3` you can use FFmpeg. [Here](https://stackoverflow.com/a/41207442) is how you can do it on Linux/macOS. [This](https://sourceforge.net/projects/ffmpeg-batch/) or [this](https://stackoverflow.com/a/56244203) might help for Windows instead. You can adopt such snippets to do other processing, such as changing the bitrate.

## Examples

Expand Down Expand Up @@ -103,11 +131,11 @@ To get the full help and all the available options run `python -m album_splitter

## Need help?

If you need any help just create an Issue or send me an email at the address you can find on my profile.
If you need any help just [create an Issue](https://github.com/crisbal/album-splitter/issues) or send me an email at the address you can find on my profile.

## Want to help?

If you want to improve the code and submit a pull request feel free to do so.
If you want to improve the code and submit a pull request, please feel free to do so.

## License

Expand Down

0 comments on commit 6bab200

Please sign in to comment.