-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for cuesheets #136
Comments
I have ripped my CDs into multitrack FLAC files with embedded cuesheets. I use f2k on Windows and deadbeef on linux to play them. p.s. I don't see relation to #109 if cuesheet is embedded and we leave it as such. |
It seems that mutagen library does not currently support cuesheets embedded as FLAC tags. Neither a quick search gave me another python library, which does it. If anybody knows better, please, comment. |
Do you know what the storage format is for embedded cue sheets? Given documentation on the subject, it might be straightforward to implement without library support. |
Format to my understanding is exactly the same as standalone cue sheets. I have created a class, which parses it and will add to github in a moment. |
At least for multitrack files created with foobar2000 cuesheet is saved as "cuesheet" tag in flac file. Deadbeef linux player also shows these individual tracks. See the code here https://github.com/phaethon/beets/blob/master/beets/util/tagsheet.py parsing cuesheet and being able to regenerate it after changes. I would like to be able to import a single flac file (with embedded cuesheet) and expect beets to treat it in the same way as importing folder of separate tracks. I guess it would require changes all around beets. |
Yes, changes to support this in beets will be pervasive. Many parts of the code currently assume that a path uniquely identifies a track. To begin with, schema changes to support multi-track files will be necessary. |
It would be great to get CUE+IMAGE working. BNot just copy/attach cue, but parse and get track listing. |
Continuing from #1257 for @brunal: If I were trying to attack this, I probably would not start with the importer—I'd start with the data model. It would be an accomplishment on its own to extend
|
And perhaps extend the web plugin so that when you request the file resource for a particular track it will seek to the correct position in the file and only return the track and not the whole file. This way it's transparent for players. (Not sure if this would require physically splitting / transcoding the file) |
Well this is far more ambitious than what I envisioned :-) Such features could be nice but raise issues. The one that bothers me most is how I would export a playlist with only the track #X of a single-file album. Keeping the original single-file album is convenient if I want to keep the inter-track moments, but that's the only benefit I can see. |
Yes, it does seem like a tremendous amount of work. I, for one, am not totally clear on why single-file albums are desirable, but some people do seem to like them. I suppose a kind of half-solution would be to automatically split out FLAC files on import, along the lines of the archive import feature? |
Splitting FLAC on import defeats the main purpose why people love these files. There are 2 reasons, why I love them:
|
I'm really against altering actual files that go into the library. Adding cover art and tagging is ok but splitting flacs is not for many reasons. Prejudice like previous author mentioned and just time it will take (I have 4tb of flacs, some people have more) Ps The 2) mentioned above is not true. My "the wall" flac with separate files plays as well as a single flac. At least in foobar. |
Great! The Hacking wiki page has a brief intro, and the developer section of the main docs has more detailed API information. |
Yes, beets is the geek media organizer. But without doubt, a geek media organizer should understand monolithic FLAC files with embedded cue-sheets. For a full-fledged support of these files I would happily donate to this project! Note that there are two common ways of storing cue sheets in a flac file, see ftrvxmtrx/split2flac#10 (comment) |
Interestingly, both of the things I was thinking about have lead to this issue: automatically splitting monolithic flacs, and having multiple copies/formats of the same track held in the database. My use case is, I get an album, and I want to add the tracks (obviously). If it's a monolithic file, I split the file (which is usually a trivial process unless there's something funky about it, like it was from an LP rip or something). I then import the (possibly newly split) tracks, which autoconvert to flac (via the convert plugin). I do 'beet bad' on the album, just to check everything is ok. Then I do 'beet convert -f opus' to get a mobile-friendly copy of the same album. All of this is relatively straight forward, but if I'm importing a large chunk of my collection at a time, it gets very tedious, very quickly. I mentioned elsewhere about adding the ability to chain subsequent commands to the import command, which would streamline things, and certainly having the ability to split the monolithic file as an option on import would be extremely useful as well. The biggest problem I have is if, when I discover there is a problem with a particular album I have in the library, I then remove it. Fair enough. But I then have to remember and ensure that I also delete the corresponding opus files as well (I use paths to organise). Having some sort of function to record multiple locations for the same track would be useful. However I'm not just here to provide a long winded way of saying 'I agree' :-) One idea I came up with is having a separate db table (as suggested) for the actual files. In my mind, that would consist of a [track foreign key, file location, file position] format. That way commands such as 'remove -d' would cascade down naturally. It would also mean monolithic files could easily be supported, once the information is read from the cue. A problem I do see, however, is checking against MB. Every time I've (accidentally) tried to import a monolithic flac, it either can't find the album at all (I assume because of the chroma fp being weird), or if it does, it lists all the missing files, as it assumes it's just the first track. It would take some very clever pre-processing and possible re-engineering of the chroma fping method to allow it to fp only sections of a file, or, less elegant but more easy to engineer is to temporarily split the monolithic file, do all the checks from that (to ensure the correct album and so on), import the monolithic, and use the cue to assign the track positions for the file, then dump the temp files. |
hi all, any updates ? |
Hello, @proud-wolf! As a matter of respect, please don't post comments like this. If there are any updates, they will already be posted here---there's no information available beyond what you see in the thread. Instead, if you're interested in this ticket, the most useful thing to do is to pitch in and help make some progress yourself! What form that takes is up to you, but participation is always appreciated. |
Hello @sampsyo, I'd like to assist in solving the issue, but I'm less then newbie in Python :( |
Could this be done in the form of a plugin that uses an external command? |
Someone actually took a shot at that in 2016: https://github.com/beetbox/beets/blob/master/beetsplug/cue.py |
Only if we could internalize this as a first step: https://github.com/ftrvxmtrx/split2flac |
I don't know the system, but the above seems a sound inference.
Again, not knowing the system, I suggest adding an Asset type, which would refer either to the single track or the whole album, depending on which is given by a file. Assuming Item is now the name for a file representing a single song, then I would name it instead Basic Item, which simply wraps a single Asset. The type Sequential Item might then represent a song in a whole-album file, given by the pairing of Asset (i.e. album) and Sequence Number (i.e. track id). If both Asset and Item have a separate tag set, then the tags of the Item would not clobber those of the Asset. Note that for external cue sheets an asset would be either the cue sheet file (which references an audio file) or the pairing of the two files. The main objective should be not splitting an album but preserving it whole, though there are reasons for splitting it, as well. |
It preserves the full data of the original album, retaining the value but eliminating the hassle of the physical media. |
I'm personally developing tools for myself to organized single-file albums here https://github.com/cmpute/Fluss/blob/main/fluss/cuesheet.py. It already can parse cuesheet from standalone cuesheets, embedded cuesheets from flac, id3, ape tags. It also handles the override relationships between normal tags and cuesheet tags. Just list here for a reference if you guys are going to implement support for this. I personally stored all my music using single-file format since it's easier to maintain and easier to check with AccurateRip. Maybe in future I will export some of my favorite tracks to separate files and organize them with beet. |
It seems, from earlier discussion, the main obstacle for integration in this application is the constraints of the existing internal data model. |
This issue was automatically migrated from Google Code.
Original author: jmbyl...@gmail.com (February 28, 2012 04:14:16)
Original issue: google-code-export/beets#351
The text was updated successfully, but these errors were encountered: