Skip to content
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

WAV Support #2300

Open
haakobja opened this issue Dec 2, 2016 · 17 comments
Open

WAV Support #2300

haakobja opened this issue Dec 2, 2016 · 17 comments

Comments

@haakobja
Copy link

@haakobja haakobja commented Dec 2, 2016

Please allow WAV-files to be imported

@jackwilsdon jackwilsdon added the feature label Dec 2, 2016
@sampsyo

This comment has been minimized.

Copy link
Member

@sampsyo sampsyo commented Dec 3, 2016

Hi! As with #1160, do you have any references for how metadata tags might be saved in .wav files? Is there a standard way, or even a de facto common practice?

You might also be interested in reading #250, the thread about AIFF support (which we now have).

@haakobja

This comment has been minimized.

Copy link
Author

@haakobja haakobja commented Dec 6, 2016

It seems that the WAV-format may contain metadata-blocks of different types: http://wavmetadata.blogspot.com
https://en.wikipedia.org/wiki/Resource_Interchange_File_Format

I do not know of if there is a de facto common practice. But it would be nice to be able to import wav-files. Currently I haven't been able to do so. It may of course be that I haven't found the correct way to import wav files into my beets library.

@sampsyo

This comment has been minimized.

Copy link
Member

@sampsyo sampsyo commented Dec 6, 2016

You're right; it's currently not possible.

The problem, as you've no doubt surmised, is that we don't know exactly how to write tags to WAV files. Mutagen doesn't support it, so this is unlikely to happen immediately.

I know this isn't much of a solution, but have you considered switching to a more widely used lossless format, such as FLAC or ALAC?

@haakobja

This comment has been minimized.

Copy link
Author

@haakobja haakobja commented Dec 7, 2016

Yes, I could convert the wav to flac. In that case, it would be nice to use the convert plugin during import. I do not think it is run during import now, or have i configured it wrong?

@sampsyo

This comment has been minimized.

Copy link
Member

@sampsyo sampsyo commented Dec 7, 2016

Hmm, interesting—no, convert-on-import won't quite work here, because beets needs to be able to read the metadata even for files that it's just converting. So, at least for the moment, you'd need to use some other tool to do the conversion. Interesting idea, though!

@brandonwkipp

This comment has been minimized.

Copy link

@brandonwkipp brandonwkipp commented Jan 19, 2017

What if instead of trying to insert metadata tags into wav files, which sort of isn't recommended since it messes with the container structure, one still had the ability to rename wav files based on user configuration?

@sampsyo

This comment has been minimized.

Copy link
Member

@sampsyo sampsyo commented Jan 19, 2017

Yes, that's another option—supporting some file types that can't store metadata at all. It's worth considering, but we haven't done that for any other formats yet, so it would require a few architectural (and documentation) changes.

@RollingStar

This comment has been minimized.

Copy link
Contributor

@RollingStar RollingStar commented Jan 22, 2017

This may create even more problems, but what about converting the WAV to FLAC, leaving the WAVs where they are (or wherever the user wants them), and importing the FLAC files to the normal sorted library location for beets?

@sampsyo

This comment has been minimized.

Copy link
Member

@sampsyo sampsyo commented Jan 22, 2017

Right—in fact, that could be accomplished already with the convert plugin if beets was allowed to scan WAV files.

@khimaros

This comment has been minimized.

Copy link

@khimaros khimaros commented Oct 5, 2017

I would be quite happy with an "import wav, convert to FLAC, write metadata" approach. Would this be a lower friction route than full support for non-metadata storing formats?

@sampsyo

This comment has been minimized.

Copy link
Member

@sampsyo sampsyo commented Oct 5, 2017

It probably would; yes! But either would be a worthy project.

@khimaros

This comment has been minimized.

Copy link

@khimaros khimaros commented Oct 5, 2017

@sampsyo -- if someone were interested in working on this functionality, do you have design guidance or pointers for where to start looking?

@sampsyo

This comment has been minimized.

Copy link
Member

@sampsyo sampsyo commented Oct 6, 2017

@khimaros Good question! I can think of two good places to start:

  • Take a look at the existing filefilter plugin. That intercepts "import tasks" (as they're called) from the importer pipeline and drops them if they don't match a pattern. A hypothetical new plugin could work much the same way—it gets new ImportTask objects, checks whether they contain WAV files, and transcodes them to FLAC, and then continues. We'd also need to add some new API to tell the importer that it's OK to load WAV files without reading their metadata.
  • Look at the code in importer.py for handing compressed archives (e.g., zip files). The unarchive method in ImportTaskFactory is the central piece there. We could build in a similar check for files that need transcoding.

And then there's also the alternative of just supporting files without embedded metadata. The places to look for that are read_item in importer.py and the from_path method on Item in library.py. The current logic tries opening the file with MediaFile and, if that fails, says that the Item object could not be created. We could instead use a list of known metadata-free audio format extensions to allow some files that can't be read.

@koflesinge

This comment has been minimized.

Copy link

@koflesinge koflesinge commented Sep 17, 2018

Perhaps this could ne helpful :
http://bwfmetaedit.sourceforge.net/
This is how metadata are stored in wave BWF format ( Brodcast Wave )

@Evidlo

This comment has been minimized.

Copy link

@Evidlo Evidlo commented Nov 10, 2018

Tagging is still possible with audio fingerprinting via the chroma plugin.

@morgajel

This comment has been minimized.

Copy link

@morgajel morgajel commented Apr 23, 2019

As someone looking to use Beets for managing a sound FX library, I don't often have control over filetypes; I'd love to be able to import WAVs, even if I have to manually tag them.

@arcresu arcresu added the mediafile label Apr 29, 2019
@arcresu arcresu added this to the MediaFile++ milestone Jun 3, 2019
@sampsyo

This comment has been minimized.

Copy link
Member

@sampsyo sampsyo commented Jan 16, 2020

Just wanted to point out that there has been some activity on WAV support in Mutagen lately in quodlibet/mutagen#408. If you're interested in making this work, perhaps you can help out there. 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
10 participants
You can’t perform that action at this time.