-
Notifications
You must be signed in to change notification settings - Fork 19
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
Reading/writing to BWF converted to FLAC? #247
Comments
Hi @ktmf01, personally I'm interested in this and suggested adding it to the scope as well as one point, but the goal of the project was admittedly fully focused on BWF. Since BWF is lack on some of the chunk ordering, we could make the metadata edits go faster by voided chunks at the header when we had to write larger chunks at the end. |
To my knowledge there are currently no applications capable of working with the foreign metadata except the I also see the problem with possible discrepancies in different kinds of metadata. However, this is a possibility with WAV too of course: some applications write ID3 data to WAV in a Superficial (and easy to maintain) support could be achieved by simply bundling BWF MetaEdit with the latest |
It is valuable but value is difficult to estimate due to chicken and egg issue, current BWF MetaEdit users like uncompressed content. But it is interesting to suggest to use FLAC without losing metadata, as we do with RAWcooked (FLAC by default, PCM in option), and showing that we can still edit them.
If you are not disappointed if it is not used immediately, go ahead :).
There may be an issue there, IIUC it is not possible to put metadata at the end of the file so any expansion of metadata requires full rewrite of the file. BWF MetaEdit supports both rewrite and append to the end, so with FLAC it would be only one method supported.
They are considered opaque and kept as is only.
Later it could be a FLAC metadata editor :), but as a first step just working on RIFF tags is fine.
It would help for some automation but slow, I was thinking more on implementing a basic reader/writer of FLAC header without decompression/compression. Note: I need to read RIFF tags in FLAC, in MediaInfo, so people can see that the FLAC file has the BWF metadata. |
I've been studying the internals of BWFMetaEdit, and I think the best (least intrusive) way to do this is by adding a wrapper layer between ZenLib and BWFMetaEdit. If a plain BWF file is read, the wrapper will pass data through to/from ZenLib directly, if it reads FLAC it should decode the metadata to memory op opening the file and decode the audio on-the-fly (only if MD5 generation/verification is requested) I have one question though: is adding a dependency on libFLAC possible/desirable/permitted, or should this feature be self contained? |
it is acceptable to have the dependency. With dlopen if not too difficult, as it is not a feature everyone will use, no need to load the lib if not a FLAC file. Thank you for your interest and good luck, the code is a bit messy (me hiding...) |
BTW, maybe longer term, but a button "Store in FLAC" (and also "Revert to WAV") as an advertisement for FLAC storage may be nice, for hinting people that they could save storage space and still get their exact WAV file if needed (similar to how RAWcooked does). |
After more digging and a bit of planning, it seems better to not rely on integrating libraries but instead using the
Would this pose problems with packaging? The binaries are licensed under GPL, I can't change that of course. The linux packages can simply add a 'recommend' to install |
Let's start with that.
As there is no lib link, it is fine. |
Recently I've been busy improving the
--keep-foreign-metadata
feature of theflac
command line tool. As I understand it, it is used by some people to compress BWF files including all metadata. As it seems BWF MetaEdit is a very valuable tool to work with BWF data, would it be considered valuable to work on adding support for reading/writing BWF metadata directly to FLAC?I was thinking of implementing this (contributing a PR), but not without first seeking some approval. After all, the functionality of this tool suggest a high level of standardisation, and FLAC isn't a standard yet of course.
Considering the difficulty of implementing and maintaining this, I don't think FLAC's way of storing metadata is very complicated. In fact, it is quite close to how RIFF works, but the ordering is a little more strict. I think the biggest hurdle here is that while a new chunk can just be concatenated to a RIFF file, FLAC mandates all metadata to be at the start of a file, meaning all data has to be moved to make room for a new chunk (if no padding is available for use)
The text was updated successfully, but these errors were encountered: