Anyone using Makefiles to encode and manage their music library?

I continue to struggle to get my music library organised and to be able to encode to multiple targets automatically. I have the majority of my CDs ripped as single .wav files with associated cue files from using EAC since 2007!

Each will have the wav file split into multiple tracks and encoded to flac where the files can be tagged more extensively using picard or another tagger.

The problem is that I wish to create multiple target outputs to support multiple players:

  1. mp3s with low resolution art for use on my phone and in the car where the display is small and the artwork is rarely seen.

  2. flacs in play in front of a large resolution TV where the artwork is looked at, so it needs to be high resolution 2k x 2k etc and ideally the viewer supports other images such as the back and booklets.

  3. ā€˜play listā€™ folders containing the files in the playlist. Iā€™m going this way because my understanding is that replaygain works on a folder basis and not at play time. So I will accept the extra cost of storing a duplicate copy of a file if it is needed to have a uniform volume across all the files in the folder. Itā€™s my understanding that If more tracks /files are added to the folder replaygain needs to be redone across all the files

  4. Support for various artist compilations. While the original folder is an archive of the release media, I prefer to split the tracks off the album release and consider each as a ā€˜singleā€™. Sort of like the way @IvanDobsky describes it here.

Iā€™m looked at using cuetools to handle this and itā€™s close, but lacks the flexibility in somecases and doesnā€™t support multiple artwork files. As an old time unix developer, Make and Makefiles were the way to handle multiple outputs and dependencies. Microsoft now offers a linux subsystem on Windows with make, so adopting this will actually make my library more portable and easier to maintain on a non windows hosted environmentā€¦ So, anyone using Make and Makefiles? Any other solutions?

I fixed 1 by upgrading to a FLAC player in the car. Or use a mobile via Bluetooth or AUX cable in car. That avoids the need to have heaps of low quality MP3s hanging around.

For 2 I use KODI on a PC (or small Pi) attached to the TV, but donā€™t ask me which skin as I am still playing with that. Using KODI also means I have Yatse on my phone. And run the KODI web browser on PCs.

Down side is KODI will want the FLACs as it is not great with WAVs and CUE files. Yes, it will play them correctly, but not as smooth as FLACs when you want to use a track from an album WAV in a playlist, etc.

3 - never bothered with Replay Gain. Maybe I notice less as I usually play whole albums.

4 - MP3TAG is one of the best things for creating custom albums. The ability to bulk edit tags, bulk change the track numbering. It makes that kinda bulk edit much faster.

Not really an option, I have a car with carplay built in and the ā€˜low quality MP3sā€™ arenā€™t really an issue quality wiseā€¦ itā€™s a noisy environment and my hearing (ahem) is probably not what it was!

Looking at LMS on a Pi because of the low footprint and good plugin for information.

Yes, WAVs are just an historical artefact for me. Flacs are the intermediate step - where tagging and artwork with picard can happen.

I have a misc music with 4000 songs played on random in the car! The volume difference is noticeable!
4 - MP3TAG is one of the best things for creating custom albums. The ability to bulk edit tags, bulk change the track numbering. It makes that kinda bulk edit much faster.
[/quote]

yes, Tag&Rename is good too!

I donā€™t know what that is. I was not meaning to diss the MP3s, was mainly looking at a way of avoiding keeping two sets of files. My current setup I tend to just link my phone to my car. Currently by AUX cable, but soon going to swap that to Bluetooth. Less media players to manage then.

With your setup Iā€™d see the WAVs as ā€œarchiveā€ and then the FLACS become ā€œmedia serverā€. The nice thing about having all the music properly tagged on server is any media player can be pointed at it.

Been running Winamp again past few weeks and it just chomped up the fully tagged files. I then make playlists on the fly to play on the desktop speakers. I had forgot how fast Winamp is at searching.

Winamp has a rather nice ā€œconvert playlist to new formatā€ option built in. That is a very quick \ simple way to format shift to a USB drive for the car. I gave this a quick check and Winampā€™s format shift only keeps basic tags - but should be fine for the car. It is fast enough to just treat those USB drives as replaceable. No point keeping dual sets of music on the server.

There are no doubt plenty of format shift tools out there. Seems more logical to use one of those to churn out USB sticks of Car Libraries instead of keeping everything twice. (Trying to keep the tags updated on two sets of files seems overkill to me)

Both Android and Apple have Android Play and CarPlay that allows you to link your phone to the Carā€™s satnav display screen either by bluetooth or a cable. If your phone music player is ā€˜car playā€™ aware, it will display onto the screen. You can also talk to the phone and say ā€˜play dark side of the moonā€™ or play ā€˜the long and winding roadā€™ :slight_smile: and it will (assuming you have it on your phone and itā€™s tagged properly) or let you go to the store and buy itā€¦

Keypoint for me is that Iā€™m not looking at the artwork when Iā€™m driving. Iā€™m looking at google maps, and the sound doesnā€™t have to be that ultra good for the car version. Storage is more of a premium for me.

Understand. I want as much or everything on the phone automatically so I donā€™t have to faff with making sure I have the music I feel like listening loadedā€¦ Used to have to manage the set of cds in the house and the set in the car!

Even if there is one set, Iā€™d like to have some automation to manage the dependencies and to automatically re-encode when things change. Iā€™ve given up predicting what they will be, but I just want to be ready. A makefile is one way of doing that.

Agreed. One set of FLACS that are fully tagged and have all the artwork.

The automation Iā€™m looking for it is the format shift toolsā€¦ and the tag updating problem disappears due to automation. So the makefile is one potential automation. cuetools is another. I will take a look at the new winamp.

So if Carplay is controlling the phone, why bother with the format shift? Just copy the FLACs onto the phone and skip the artwork.

My trick is to copy all the album folders I need. Then once copied, I search for all JPGs, sort by name, and just delete the ones not called ā€œcover.jpgā€.

Iā€™m an old fashioned ā€œdrag and drop a copyā€ person as I know I never want my whole collection in the car so avoid too much automation. (Plus my phone ainā€™t big enough!)

Shhhā€¦ I ainā€™t said anything guv. :llama: The old Winamp did format shifting too. But all Iā€™ll say is wait a few days and there many be a ā€œnewly polished oldā€ā€¦ Weā€™ll pickup this conversation in a few days time. :wink: :zipper_mouth_face:

The reason I like format shifting with something like Winamp is it will look at your whole collection, and you can sort by folder, artist, playlists, whatever. Then a simple right click and boosh - Send To ā†’ Format Convertor. And there are a heap of MP3s tagged and ready to go.

The opposite: the phone controls the car system and uses its display and speakers as presentation / user interface devices. Google maps runs on the phone as well.

There are no carplay aware flac players :frowning:

That is a bit rubbish. One reason I never understood this tech in cars - stuck in time without upgrades. And awkward choices of Apps to work them with.

I run a 1990s car, swap the head unit when I need to, and use an Android Phone running Yatse for the media. Which comically means being more up to date on a media system than modern cars. :rofl:

But then I also use a paper map and pre-plan journeys so I am odd. :crazy_face:

If I was working your situation, Iā€™d stick to a simple ā€œdisposable poolā€ of MP3 files. Format shifting albums, playlists, etc to a separated corner of my serverā€™s hard disc. Not worrying about keeping them up to date as it is a pool of audio being used to transfer to the phone and therefore the car.

The central collection in FLAC is the one I would fuss over and keep up to date.

And when I wanted new albums in the car, just format shift to the pool. Copying them from the pool to the phone.

A previous car system I had involved a small heap of SD Cards. Each with different collections of MP3 tagged on them. Different moods. Playlists, albums, etc. Iā€™d swap them around depending on the type of drive I was doing. Would be easy to do similar on a mobile just stacking up custom tagged compilations. By working with pool of MP3s you can then just tag in any way you like, knowing that your main FLAC collection is safe and fully up to date.

I too started off down this road, but as long as you keep the original CUE AND the one thatā€™s created by CUETools when you split the tracks out (that will include any track 1 pre-gapā€™s) then thereā€™s nothing lost, and itā€™s trivial to go back to a single image if you ever wanted.

You can calculate replaygain at a TRACK or ALBUM level. I only store TRACK replaygain and only use it when Iā€™m shuffling (because I want all the tracks that are playing to be at approximately the same volume); if Iā€™m listening to an album Iā€™ll turn replaygain off and adjust the volume as necessary (because I want to hear it as the artist intended). If you stored TRACK replaygain then you wonā€™t need to duplicate your playlist files.

Out of interest, why are you doing this? If I wanted to group them outside of their album Iā€™d create a playlist. Are you doing it to get earlier tag information?

In foobar I have two conversion processes, one for a Sonos system (MP3) and one for a portable player (OGG) I use for running, but I havenā€™t automated them as I only convert as needed. Alongside the conversion steps I have two routines that modify the tags according to the target (as Sonos and the Fiio have poor tag support compared to MimimServer). I guess it could be automated, but Iā€™ve never thought about it. If you know exactly what you want I wouldnā€™t have thought itā€™s that complicated (with or without foobar).
illustrate have a product called TuneFusion that is designed for this purpose, but I have no idea how flexible it is.

2 Likes

I donā€™t use the feature myself, but the convert plugin in beets could be interesting to you.

Actually you should only need to keep the CUE file that CUETools creates in order to recreate the image perfectly, itā€™s only because I amend this file for my own purposes that I also need to keep the original.

I rip with EAC to an image then use CUETools to split them.
I only keep the CUETools CUE sheet if itā€™s needed for the individual FLAC files to be verified against AccurateRip and CTDB, this is primarily if:

  • The disc has a pregap in track 1

  • Itā€™s a data disc and I need REM DISCID in the CUE to identify the correct release

  • If the disc contains tracks that have multiple index points and Iā€™ve split that track out in order to have a cleaner browsing experince (I can have one title per file instead of 7 titles concatenated together)

Another recommendation thatā€™s a bit of a ā€˜gear shiftā€™ - I would give Plex a try.

I have the free version and it deals with a multi-terrabyte collection impressively, on my phone and on my TV. It will transcode from lossless to your selected bitrate on the fly, for car travel etc.

I feel your pain having to re-encode files all the time! Give it a test run and see how it goes. A quick Google indicates it works with CarPlay but Iā€™ve never tried it.

1 Like

Thanks for the Plex suggestion. I did not realise there is a free version. Will have a lookā€¦

Regarding re-encoding, I donā€™t do it all the time. At the moment, a brute force encode of everything takes a day or so! The reason for thinking of Make is that a correctly written makefile will determine what has changed, what is dependent on that and therefore what needs to be re-encodedā€¦

1 Like

I wrote https://github.com/dseomn/cohydra to handle this problem for myself. Itā€™s very not-user-friendly I think, but if youā€™re comfortable with python it might work.

Thanks, Iā€™ll have a lookā€¦ will be a while as lots on the list at the moment!

A very late replyā€¦ apologies!

I generally buy compilations as a cheap way of buying the 'hits and not all of the album or that extra track the record company put on the release to get me to buy the songs againā€¦ Splitting the songs into separate folders lets me treat them as the original releases:

  1. Easily download and use the original artwork - either the single or the album it came from. Most software seems to only be able to handle a simple model of one artwork file per folder - folder.jpg / cover.jpg etc.

  2. Use the metadata from the original release such as the release date.

  3. My music player(s) Apple itunes / music doesnā€™t handle compilations well/properly and consistently across the apple landscape. The summary is track artists get lost. (but this is a separate long discussion). Switching out of apple land is not an option.

  4. Able to copy the music file to a folder of ā€˜songs to put on shuffleā€™ and replay gain all of them

  5. Static playlists donā€™t work well is apple land. (Show in a separate list, so not really an option

  6. I donā€™t loose anything by doing this