-
Notifications
You must be signed in to change notification settings - Fork 157
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 RIFF INFO chunk metadata (AVI, WAV, XMA, xWMA, RMI, DLS) #207
Comments
Original comment by Christoph Reiter (Bitbucket: lazka, GitHub: lazka): Some thoughts on the API: Add a RIFFFileType and a RIFFInfoTags for exposing the info block. Make RIFFFileType subclasses for WAV, AVI, RMI etc. One problem regarding RIFFInfoTags is the text encoding of the info block. Possible solutions there is to expose the values as bytes or allow passing in a preferred encoding (defaulting to latin-1) |
Original comment by Amias Channer (Bitbucket: amias_channer, GitHub: Unknown): I could really use this functionality and would be happy to help code and test it, i'm new to mutagenx internals so might need some pointers. I am currently using mutagenx in some code to test an audio playing system and have a library of sample files with which to test it. |
I would like to contact Amias Channer in order to work on the wav support. Does anyone here know where I could find him? |
+1 on mutagen support for WAV files. Trying to use python's wave module to find bitsPerSample and sampleRate for WAVs created by ffmpeg from 24-bit flacs, and it fails miserably. ffmpeg -i CDImage.flac -acodec pcm_s24le output.wav Already using mutagen to extract the same info from FLACs so being able to use it for WAV would be ideal |
I am also interested on this. I have WAV and WMA files I would like to be able to parse. Thanks. |
Related to issue quodlibet#207
Contains an ID3v2 header.
Started initial RIFF/WAVE implementation. I start with being able to read basic stream information such as:
Although this is not an official standard (neither there is a much better alternative), I will store metadata using ID3v2. I will use MusicBrainz Picard and my own library music-metadata to cross check functionality. Constructive contribution is more then welcome, I have 0 experience with Python. |
Related to issue quodlibet#207
@lazka, can you help me out with some coding? self._RiffFile__fileobj.seek(self.__next_offset)
self._RiffFile__fileobj.write(pack('<4si', id_.ljust(4).encode('ascii'), 0))
self._RiffFile__fileobj.seek(self.__next_offset)
chunk = RiffChunkHeader(self._RiffFile__fileobj)
self[u'RIFF']._update_size(self[u'RIFF'].data_size + chunk.size) (source: /mutagen/wave.py:190) I want to access |
@lazka: Thanks! How to store metadata in RIFF/WAV files is not straight forward thing: Looks like there are two options (which can be combined):
There is also some inconsistency in storing the ID3v2.3 chunk, some application use 'id3 ', others use 'ID3 '. This is how some applications handle the RIFF/WAV metadata:
Notice that I did not found a single application which was able read from the RIFF/INFO tag; although it is apparently written in addition to the ID3v2.3 chunk. Useful stuff:
|
[edit: oops misread.. ignore previous]
Cool, thanks for testing all those. Last time I checked for AVI I think I remember that VLC and Windows explorer did read the INFO block there. But I might be miss-remembering or it only does so for AVI and not for WAVE. Ignoring the INFO chunk seems fine for now.. |
Related to issue quodlibet#207
Related to issue quodlibet#207
Related to issue quodlibet#207
Related to issue quodlibet#207
Related to issue quodlibet#207
Related to issue quodlibet#207
Related to issue quodlibet#207
Related to issue quodlibet#207
Related to issue quodlibet#207
I guess this is related to #538? |
This was also discussed in #559. Overall regarding the issue here the proposed patch by @postlund looks mostly good for read support. Encoding support could be improved maybe. Also this could be extended with some ideas from https://github.com/metabrainz/picard/blob/master/picard/formats/wav.py#L39-L219 for more supported tags and write support. |
Is .wav support a thing? If so what is the correct usage import for using mutagen as a module? I wanted to be able to do something like "from mutagen.mp3 import MP3" |
@StealthyExpertX WAVE in general is supported. The easiest way to load a file into mutagen independent of format is: from mutagen import File
file_path = "./test.wav"
f = File(file_path) For WAVE Regarding tags mutagen supports ID3 tags embedded as a RIFF chunk. This is also supported by some media players, e.g. foobar2000, Media Monkey and MP3Tag can read and write those tags. See also the table further up in this ticket. Not supported right now is reading / writing tags inside an INFO chunk, as e.g. supported by Windows. Adding support for this is what this issue here is about. It's a rather limited format (rather restricted set of tags, no support for different character encodings), but often the only tagging supported for WAVE files. |
Originally reported by: Freso Fenderson (Bitbucket: Freso, GitHub: Freso)
https://en.wikipedia.org/wiki/Resource_Interchange_File_Format#Use_of_the_INFO_chunk
https://en.wikipedia.org/wiki/Resource_Interchange_File_Format#INFO_chunk_placement_problems
https://en.wikipedia.org/wiki/Resource_Interchange_File_Format#RIFF_Info_Tags
See also discussion downstream in beetbox/beets#1160 and http://tickets.musicbrainz.org/browse/PICARD-653
The text was updated successfully, but these errors were encountered: