6 ms·
My problem is, all my music is: a) WAV files with no internal metadata (there is a metadata file alongside though and a album-cover.jpg) (My ripping process pr
by mattowen_uk 5y ago
My problem is, all my music is:
a) WAV files with no internal metadata (there is a metadata file alongside though and a album-cover.jpg) (My ripping process pre-dates the ubiquity of FLAC playback support)
b) stored on a central file server currently only accessible via SMB/CIFS.
And what I want is some remote head-unit solution connected to [powered] speakers running a touch screen UI that presents the lot as a music jukebox.
There's a lot of Android and Linux based front-ends but most of them insist on only indexing locally stored music, and also only supporting file types with built-in metadata support, even though my music is stored in a logical Artist/Album/Track.wav folder/file naming convention.
So I'm stuck. It feels like I need to hand-crank my own solution... but that would take a lot of time I don't have, and never be as nice as some of these established open-source projects.
- codetrotter 5y ago> there is a metadata file alongside though and a album-cover.jpg Is the metadata file in a format that you made yourself or was it produced by a third-party piece of software? And is it text based or binary format? > There's a lot of Android and Linux based front-ends but most of them insist on only indexing locally stored music, and also only supporting file types with built-in metadata support, even though my music is stored in a logical Artist/Album/Track.wav folder/file naming convention. Ok, so if we start off with that part of it, and we ignore the additional metadata file for now. > stored on a central file server currently only accessible via SMB/CIFS. Can you SSH into the server? Or alternatively, manage the server with a locally connected keyboard and monitor? Or is this some kind of NAS box that does not allow you to do any of those kinds of things? Because I have a couple of ideas but it will depend on the specifics of your setup.
- mattowen_uk 5y agoMetadata is XML, but could be easily converted post ripping (as a scheduled batch process I guess) It's currently a file share on a Windows Server box, but at some point will probably move to a dedicated NAS (due to rising energy costs)
- codetrotter 5y ago> It's currently a file share on a Windows Server box I see. I don’t know if the following will really be helpful since there may be some nuances that will differ a bit. But if that installation of Windows has WSL then hopefully the following might be helpful. In summary, my idea is as follows: If you have enough space on the server for it, you could create a new top-level directory next to the one that you currently have for your music, and then create a script that loops over all of the files, transcoding them to flac with ffmpeg and adding metadata with a flac metadata edit tool. (ffmpeg can edit flac metadata too, but I think a dedicated flac metadata edit tool will be more straight forward to use). So on KDE Neon Linux and other Ubuntu based distros, here’s what I’d do, and hoping this might be somehow useful even though you are using Windows: First install ffmpeg, lltag and mediainfo if you don’t have them already: sudo apt install ffmpeg lltag mediainfo Then let’s say that the directory hierarchy for your music was at /data/Music/ so you’d have "/data/Music/Steppenwolf/For Ladies Only/3. Shackles and Chains.wav" etc. Then I’d create a new directory next to the Music directory and name that one "flacs" for example: mkdir /data/flacs Transcoding and tagging. For now we include only artist name, album name and track names, extracted from the directory names and file names in your hierarchy, omitting other metadata such as for example the album cover art. But since we retain all of your original data, you can at a later point delete these flac files and do a transcoding and tagging run where you include more metadata (or do a run that keeps the transcoded files and only edits the metadata of them if you'd like). The idea for now is to do something simple as a first step, and then you can refine it in the future. origdir="/data/Music" flacdir="/data/flacs" find "${origdir}" -mindepth 1 -maxdepth 1 -type d | xargs -I{} basename '{}' | while IFS= read artist ; do mkdir -p "${flacdir}/${artist}" find "${origdir}/${artist}/" -mindepth 1 -maxdepth 1 -type d | xargs -I{} basename '{}' | while IFS= read album ; do mkdir -p "${flacdir}/${artist}/${album}" find "${origdir}/${artist}/${album}/" -mindepth 1 -maxdepth 1 -type f -name '*.wav' | xargs -I{} basename '{}' | while IFS= read trackwav ; do tracktitle="${trackwav%.*}" ffmpeg -i "${origdir}/${artist}/${album}/${trackwav}" "${flacdir}/${artist}/${album}/${tracktitle}.flac" lltag --clear -a "${artist}" -t "${tracktitle}" -A "${album}" --yes "${flacdir}/${artist}/${album}/${tracktitle}.flac" done done done And now if we look at one of the transcoded files with mediainfo: mediainfo "/data/flacs/Steppenwolf/For Ladies Only/3. Shackles and Chains.flac" Then we see among the lines of the output the following, showing us that we have successfully tagged the transcoded file with artist, album and track title: Album : For Ladies Only Track name : 3. Shackles and Chains Performer : Steppenwolf And likewise for all of the other files. All transcoded to flac and tagged with artist, album and track title. And your original wav files and other data remains unchanged where they were, so that you can do more detailed tagging etc in the future.
- kevinmgranger 5y agoIs there a sort of universal format for music metadata? I know image metadata has XMP.
- somidscr21 5y agoid3 is the standard for music metadata https://id3.org/ https://id3.org/
- kevinmgranger 5y agoLooks like it's a standard for embedding within MP3 files. But ss there ecosystem support for reading it from a "sidecar" file? I know digikam can read XMP data from a file that lives alongside image files that don't support such embedding.
- uuddlrlr 5y agoSounds like something a shell script could fix.
- NoGravitas 5y agoI'm reasonably sure that Jellyfin could handle this setup. For music, it normally uses in-file metadata, but lacking that, I think you can give it enough info through paths and filenames for it to look up the metadata online (this is what it does for movies and TV shows). It definitely uses a text-based metadata format (.nfo) internally to cache this metadata, and it probably would be easy to programatically convert your metadata file to this format.
- BunsanSpace 5y agoSounds like you need to a) transcode to flac, at least for the file size limits b) use beets.io or Musicbrainz to match your music and write metadata to them. Updating your library will make it much easier to use with any sort of streaming frontend.
- Svperstar 5y ago>a) WAV files with no internal metadata (there is a metadata file alongside though and a album-cover.jpg) (My ripping process pre-dates the ubiquity of FLAC playback support) Converting your entire .WAV library to .FLAC should be extremely quick on any CPU made in the last 10 years. A good converter will also allow you to tag it while converting. I converted from .APE to .FLAC a few years ago and it took no time at all.