Bringing it back home exporting your YouTube Music library - bliss

Bringing it back home exporting your YouTube Music library - bliss

Bringing it back home: exporting your YouTube Music library. YouTube Music is a popular service amongst digital music collectors. Like its predecessor did, Google Play Music, it allows file uploads, so your existing, lovingly curated library could be uploaded to the cloud, listened to anywhere, and it would benefit from being backed up by Google. But what about when it’s time to move on? The service would not be attractive if you were unable to take your library back.

Fortunately you can, but the state of the library when exported is not quite as we’d like. Here’s how to use bliss to fix your Youtube Music backups! The techniques in this article also help Google Play Music users handle their exported music libraries, because the exports are in the same basic format.

The closure of Google Play Music in October 2020 was met with disappointment by many music collectors. Although still a streaming service, Google Play Music (GPM) permitted uploads of existing music files. It was a music lockerwhich allows certain advantages; an existing music library, lovingly built, can be backed up securely online. With other streaming services like Spotify not allowing uploads, some were worried they wouldn’t be able to secure a cloud-based home for their music libraries.

They needn’t have worried; YouTube Music stepped into that gap. Google offered an easy transfer from one service to the other. But for those not interested in moving to the new service (many preferred GPM) or those that gave YouTube Music a try and had decided against using it, how were they to retrieve their music library now? Google offer a service called Takeout which is a way of exporting data from different Google services.

Takeout can be used to export YouTube Music libraries, including the actual music files and some playback statistics. And, up to October, GPM also allowed your library to be downloaded in the same way. Unfortunately, the reactions to the exports generated by Takeout were not wholly positive. Some bemoaned the lack of structure in the resulting export: Seriously Google?

You force me away from Google Music, and then the damn takeout download has ALL MP3 files in a single directory, not grouped into albums? Man. Way to waste my time. :-(((( — halvarflake (@halvarflake) October 4, 2020. In addition, many reported missing tracks although it appears that simply trying again can sometimes make the missing tracks appear in subsequent attempts.

On the upside, reports suggested the files are tagged which is probably the most essential thing. So long as you have the tags you can identify your music easily, and restructure it as you require. Let’s get to the bottom of this and provide a little clarity on Takeout exports. Requesting a Takeout. Let’s take a look at a Takeout music export; broadly, the same findings apply both to YouTube Music’s exports and Google Play Music’s.

Via Takeout, you can request your YouTube data to be exported. First, you have to scroll through all of the Google services listed; this includes Drive, Chrome, Photos and many, many more.

Once you get to the bottom of the list and find YouTube you’ll also realise, of course, that YouTube extends to much more than just your music library. To request only your music related data, click the All YouTube data included button and make sure to choose just music-library-songs and music-uploads (the former includes music library stats and spreadsheets of the structure of your music library, the latter is the files you have uploaded themselves).

Click Next step and you’ll get a few more options, and then a request for your export will be generated. A short while later you should get a notification that the export is ready for download. Once downloaded, it’s time to open the archives and see what we’ve got! Takeout X-ray. The structure of the Takeout archive is the same for both YouTube Music and Google Play Music: All files are in one folder - music-uploads - with no sub directories.

That’s repeated in GPM: The only real difference in terms of structure is the naming of the Google Play Music / YouTube Music directory. In addition, the filenames themselves have a different pattern, but it’s unclear to what extent this depends on the original uploaded filename. In the case of YouTube Music, the filenames do not have the track numbers in, even though the original uploaded files did. There’s one CSV file for each song.

The CSV contains some metadata not stored in the music files which relate to the use of the streaming service, for example play counts and ratings: Disambiguation is a challenge. Both services disambiguate identical filenames by appending a `(1)` suffix (or subsequent integer). However, there appears no deterministic way that this is decided, and no reference from the CSV files to the music files.

So the only way of knowing which track is which is by inspecting the tags (or listening!). In addition, disambiguation appears a little over eager. For example, the album name is disambiguated in the filename because there are multiple tracks in any given album. And yet it's not required, because the filename would be unique based on the track names alone.

An aside: any “in progress” uploads get an auto generated filename: … so it might be worth waiting for any uploads to finish before creating your “Takeout”. The biggest problem is the file and folder names in the export. An album-per-folder offers a hint to software to group the tracks into an album. These exports might make importing the music more difficult because all of the files are in one folder. There's no sequencing of tracks inside a release, so players that rely on filenames (e.g.

car stereos) can't play the music in order for any given album. This was not confirmed, but if the folder is of arbitrary size this could cause problems in some OSes and filesystems which have maximum numbers of files per folder. In general, having an enormous folder like this is cumbersome and hard to work with. In summary, then, while a Takeout treats your tags well, we need to do something about the filenames. File naming is the type of thing you want to do once, and it’s best done early.

Let’s use bliss to fix the filenaming into a sane structure. Fix YouTube Music exports with bliss. Your first decision is to choose how to store your music files in your filesystem. I generally recommend something like: This provides the minimum metadata to communicate identity and structure of the release and it does not include fields like GENRE which might change in future. You don’t want to be changing your music file and folder naming. Once you’ve decided, download bliss, install and run: Download Download Download.

Remind me. bliss does not work on mobile platforms. It does run on most desktop/server platforms: To receive a link to the download in your email enter your email address below. Hopefully this makes it easier to get started when you're back at your computer. The first page you’ll see is the setup page: Choose the location of your music files.

This should be the folder into which the Takeout archive was extracted.

Bringing it back home exporting your YouTube Music library - bliss

Click Next. On the next page, you get the chance to add your rules. In this case, we’ll set a rule to make sure all the files are stored in our desired location. Click Add a rule > Configure next to File paths and then set this pattern: This mimics our desired pattern we described above. If you want something different, click Custom paths to explore the different ways you can customise the file paths. Make sure the rule is set to run in Manual mode first.

Click Scan library and apply rules and bliss will begin assessing your music files. As bliss scans, it works out which track is in which album. Once it has an idea of your albums it can work out what the file path should be. Those files it can see that are not named according to your file pattern will be shown: You can click the Fix all file paths link to fix all the files in this album, or click more info to see the current and target file paths.

In fact, I encourage you to do this early on to make sure bliss is suggesting appropriate file locations. Once you’re more confident you can fully automate the file renaming. Either fix all outstanding issues in the Inbox by clicking Select by type > check Fix folder and file structure > Fix all or by changing the rule to run automatically - in the settings page change Manual to Automatic.

Once you’re done, you should have a reorganised music folder, with all your YouTube Music/Google Play Music organised into folders. Thanks to Timo Schmidt for letting me see the structure of his Google Play Music Takeout export. The Music Library Management blog. I'm Dan, the founder and programmer of bliss.

I write bliss to solve my own problems with my digital music collection.