-
Notifications
You must be signed in to change notification settings - Fork 38
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 splitting single-file FLAC files with cue. #141
Comments
Unfortunately, no, that is not something this application is going to do. This app has no external dependencies, and I don't know the first thing about cutting up music files like that. Future versions will probably have triggers, so you can execute a script (like the one you linked) after an extraction is finished. EDIT: 1/3/22: While unpackerr still doesn't support this feature, command hooks have been added. Unfortunately these files are not often compressed so the command hook never fires for these. The script below may be useful to others that stumble into this thread. |
Ok thanks! |
Hello @sdfg2 Unpackerr is working great for me as well, and I actually came over here to request the same thing - did you ever find a solution? |
Do these Flac files come in a compressed archive? (rar/zip files) |
No, what happens is the FLAC file is one continuous file, and there will also be a second file (*.cue) that contains the instructions on how to split it into separate tracks.
There are a variety of open source libraries and command line programs that simplify the process.
|
It sounds like the downloader application needs to trigger the script in this case. I still just don't know how this process would fit into what unpackerr does. Surely someone has solved this, somewhere.... Wishing you both the best of luck! |
Thanks for considering!
I think it seems sensible as it’s a common post-download step that needs to be done before a *arr application can complete the import process. I also understand it’s not quite a straightforward as decompression/extraction.
I’ll keep looking, meanwhile if you do wind up adding a step for your application to trigger a script I’ll give that a shot.
Best Regards,
Mike
|
I did add this, but if the Flac files are not compressed to begin with, Unpackerr won't do anything with them. I'll keep thinking about this, and more thoughts are welcomed. |
Yup! I created a bash script that runs on completion of a torrent in transmission.
It relies on split2flac. It's a nasty bodge, and it could probably be refined/optimized/whatever up the wazoo, but this works for me. There will be outlier cases that it fails on and requires manual intervention. Also I don't know what's up with the encoding on some of these cue files but it will actively create multi-gigabyte files if it trips up on something - I keep meaning to put some kind of timeout and cleanup but never get round to it. As always DO NOT RUN A BASH SCRIPT FROM A STRANGER ON THE INTERNET IF YOU CANNOT UNDERSTAND WHAT IT DOES AND HOW. |
fwiw, unpackerr has command hooks now, but it will only work on files that are compressed. That's probably useless for this feature request. The above script looks like a good place to start. I might recommend to @sdfg2 to commit that into a git repo or at least a gist. This way others can contribute code and ideas. It can slowly grow into something more awesome. I'm going to continue to leave this issue open to increase visibility. I'm open to ideas too. If someone can point me to a Go library that handles the FLAC-cutting stuff I'd find this feature to be much easier to implement. EDIT: This may do it, and now I need to learn more about FLAC. And acquire some... https://pkg.go.dev/github.com/mewkiz/flac |
From the same author of split2flac https://github.com/nilzeronull/unflac Works very well, output directory can be set with arg -o |
Not super fond of calling out to |
Unfortunately there's nothing else that does it... at least I didn't find it |
I linked a go flac library above. Just needs time, and I don't really do audio stuff, so this is new to me. It can even parse out the album cover. Seems pretty cool. https://github.com/mewkiz/flac/blob/v1.0.8/meta/meta_test.go#L246-L268 |
I'm not really good at go so I can't help much... |
I'm not one to do things half way unfortunately. If someone else wanted to try to make unpackerr call out to |
Understandable. |
There's a pretty tight integration with the xtractr library. Unpackerr makes a call to an xtractr method to find "Extractable" files. So the first thing you'd need to do is change how that call works so it can also find flac+cue. I don't think that can go in the xtractr library, so a new function needs to be written to check for cue/flac. Once you find them, pass them into the code you linked. And by that, I mean rewrite that code into a sub-package in unpackerr. The other problem is that code has no license, so you can't really copy/paste it. |
Thanks, that's a good start. The code has been published at least once with the MIT license as a package: https://voidlinux.pkgs.org/current/voidlinux-main-aarch64/unflac-1.0_2.aarch64.xbps.html I will ask the author to provide one. |
Lookig forward to this if you get it working!
Best Regards,
Mike
…________________________________
From: mann1x ***@***.***>
Sent: Saturday, May 6, 2023 1:16 AM
To: Unpackerr/unpackerr ***@***.***>
Cc: Mike Prachar ***@***.***>; Comment ***@***.***>
Subject: Re: [Unpackerr/unpackerr] Support for splitting single-file FLAC files with cue. (#141)
Thanks, that's a good start.
The code has been published at least once with the MIT license as a package:
https://voidlinux.pkgs.org/current/voidlinux-main-aarch64/unflac-1.0_2.aarch64.xbps.html
I will ask the author to provide one.
—
Reply to this email directly, view it on GitHub<#141 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AFOEDLGW6CFJRAHLG6BXDVLXEYCERANCNFSM5BJZZB3Q>.
You are receiving this because you commented.Message ID: ***@***.***>
|
Hello,
I love this, it's amazing, I was wondering if at some point it might support extracting single-file flacs using something like https://github.com/ftrvxmtrx/split2flac ?
The text was updated successfully, but these errors were encountered: