yt-splitter (youtube albums)

Submit command line tools that you find here.
Post Reply
Message
Author
User avatar
juverax
Posts: 369
Joined: Mon Jun 11, 2018 5:19 am

yt-splitter (youtube albums)

#1 Post by juverax »

yt-splitter (youtube albums)

TUTORIAL: How to download albums from youtube, separate and save each title (aka chapter) in a folder named according to the name of the video.

This is achieved with ffmpeg and two CLI utilities developed by: https://github.com/nicolaasjan
1 - The youtube downloader: https://github.com/nicolaasjan/yt-dlp
2 - The youtube splitter: https://github.com/nicolaasjan/yt-splitter

Start by creating a folder (named e.g. ytalbums or whatever name you want) and place these 5 files in the newly created folder:

1 - ffmpeg.exe (there are several places where you can get ffmpeg …)
2 - ffplay.exe
3 - ffprobe.exe

4 - yt-dlp.exe ( direct download link: https://github.com/nicolaasjan/yt-dlp/r ... lp_win.zip If you use Chrome, it displays a warning saying that the file may be malicious, just select keep)

5 - yt-splitter.exe ( direct download link:: https://github.com/nicolaasjan/yt-split ... indows.exe )


Open the folder "ytalbums" in console mode (by typing simply cmd in the address bar of your ytalbums folder)


You are now ready to download and split your album.
For example, if you want to download and split the titles of the video: https://www.youtube.com/watch?v=aJBorSy25zU

 In the console window, enter
yt-splitter https://www.youtube.com/watch?v=aJBorSy25zU and hit "Enter"
and wait until the process is completed.

The mp3 files are saved in a folder named after the title of the video, in this example,
the folder name is: "Teresa Stratas sings Songs by Kurt Weill (14)"
Each mp3 file is named according to the description provided after the video tile on that youtube web page..
Note that the naming process works correctly except for the 1st title (you will have to rename it manually).

This example, is my first experiment with yt-splitter, and I did not have the time and patience to look for another album, the content of which might be more appealing …..
What is more, in this example https://www.youtube.com/ has set the volume to very low.
However, after amplification of each track, I was pleased with the final technical result.

User avatar
Midas
Posts: 6727
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

Re: yt-splitter (youtube albums)

#2 Post by Midas »

While I currently use FFmpeg and yt-dlp for this purpose, I had never heard about yt-splitter -- thank you for bringing it, along with the detailed tutorial, to TPFC's community attention, juverax. 8)

Apparently the original author is https://github.com/redsolver/yt-splitter, two forks away from the one you referenced above.

One additional note, however: if you can avoid the transcoding to MP3 format, please do so -- MP3 is now an ancient format who hasn't benefited from the latest developments in audio compression in both software and hardware.

Keeping your files in the native MP4 (i.e., AAC), for example, is so much better (as many, many resources around the web will undoubtedly attest)...

User avatar
Andrew Lee
Posts: 3063
Joined: Sat Feb 04, 2006 9:19 am
Contact:

Re: yt-splitter (youtube albums)

#3 Post by Andrew Lee »

This looks really interesting. Thanks for sharing!

I did, on rare occasions, had a need for doing this, and have resorting to other, more labour-intensive ways of splitting the album. I am sure this utility will make the job easier when the need arises again.

User avatar
juverax
Posts: 369
Joined: Mon Jun 11, 2018 5:19 am

Re: yt-splitter (youtube albums)

#4 Post by juverax »

At Midas:
Thank you for the reminder concerning the use of MP4 instead of MP3.
Since most of the time I deal with (very) low quality audio files (typically vinyl rips), and because I already have an arsenal of MP3 tools to deal with these files, I never really bothered to look at something else. But definitely, I am going to look for similar tools that can deal with MP4.

On another note, Midas said
Apparently the original author is https://github.com/redsolver/yt-splitter, two forks away from the one you referenced above.
it is worth keeping in mind that there may be several forks to an initial project. In the case of tools such as yt-dlp and yt-splitter, it is vital to have access to more thant one resource, because youtube changes its algorithms frequently ... :cry:

User avatar
Midas
Posts: 6727
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

Re: yt-splitter (youtube albums)

#5 Post by Midas »

juverax wrote: In the case of tools such as yt-dlp and yt-splitter, it is vital to have access to more thant one resource, because youtube changes its algorithms frequently...
I completely agree. 8)

freakazoid
Posts: 1212
Joined: Wed Jul 18, 2007 5:45 pm

Re: yt-splitter (youtube albums)

#6 Post by freakazoid »

juverax wrote: Tue Apr 18, 2023 10:31 am 5 - yt-splitter.exe ( direct download link:: https://github.com/nicolaasjan/yt-split ... indows.exe )
As others have stated, I haven't heard of yt-splitter before, but I can definitely see this being useful for compilations and mixtapes only posted on YouTube so thanks for mentioning yt-splitter, juverax!
Midas wrote: Wed Apr 19, 2023 4:00 am One additional note, however: if you can avoid the transcoding to MP3 format, please do so -- MP3 is now an ancient format who hasn't benefited from the latest developments in audio compression in both software and hardware.

Keeping your files in the native MP4 (i.e., AAC), for example, is so much better (as many, many resources around the web will undoubtedly attest)...
Definitely agree with this, Midas! In fact, even in MP4/AAC isn't the best audio codec nowadays. YouTube uses the WEBM/OPUS audio codec, which is way better.
is it stealth? ;)

User avatar
Midas
Posts: 6727
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

Re: yt-splitter (youtube albums)

#7 Post by Midas »

freakazoid wrote: In fact, even in MP4/AAC isn't the best audio codec nowadays. YouTube uses the WEBM/OPUS audio codec, which is way better.
Well, the jury is still out on that one, with the score looking like a tie: https://en.wikipedia.org/wiki/Codec_listening_test.

Personally, I stick with whatever MP4 (webm still isn't as universal) flavor is being served by YT -- and prefer Opus for voice/lower bandwidth cases... :|

Figuhr
Posts: 1
Joined: Mon Jul 03, 2023 10:09 am

Re: yt-splitter (youtube albums)

#8 Post by Figuhr »

Thank you for this great software!

Under Windows the program works perfectly.
Unfortunately the album covers are not saved in the 3Tag. Is there a suggested solution for this?

User avatar
Midas
Posts: 6727
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

Re: yt-splitter (youtube albums)

#9 Post by Midas »

Figuhr wrote: Unfortunately the album covers are not saved in the 3Tag. Is there a suggested solution for this?
Not the ideal automated solution -- but with Kid3 (/https://www.portablefreeware.com/?id=2859) you can do that manually... :|

freakazoid
Posts: 1212
Joined: Wed Jul 18, 2007 5:45 pm

Re: yt-splitter (youtube albums)

#10 Post by freakazoid »

For albums, I do not save the cover artwork directly into the audio file, but rather as a separate file named folder.jpg. Most Windows and some Android music apps will pick up that image in the same directory.

There's a python script called CoverLovin2 that can download cover artwork into your album's directory: https://github.com/jtmoon79/coverlovin2. Haven't tested this one myself though. Also requires a Discogs access token.
is it stealth? ;)

araiza
Posts: 1
Joined: Thu Oct 19, 2023 4:26 am

Re: yt-splitter (youtube albums)

#11 Post by araiza »

Folder.jpg Method: Save cover artwork as a separate file named folder.jpg in the album's directory; compatible with most Windows and some Android music apps.

Post Reply