-
-
Notifications
You must be signed in to change notification settings - Fork 37
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: Failed to read RIFF INFO item value #373
Comments
Hello! Your file has items that are not UTF-8 encoded. What is your local character encoding? If Windows is able to read it, that means the file is using your system encoding. |
UTF-16. |
Hm. It's unfortunate that RIFF doesn't specify a text encoding. We would be able to somewhat reliably detect UTF-16 LE, but there's no BOM either. The only way for us to know ahead of time how to decode the text would be using GetACP() from Windows. Don't know how I feel about having platform-specific code in Lofty, though. |
Maybe we can simply set the way to decode text when reading riff info. Obviously it is not a good way to fix it though. And this is the way how the Taglib support it. StringHandler
|
That would also work. Gonna have to think about this one. For now I'd just recommend changing the encoding of your files to UTF-8, that's what most libraries (outside of TagLib) will exclusively support. |
Being able to use alternate encodings would be nice. In my project I need to build an index of all tag data (title/artist/genre/etc). I'm guessing these files are in UTF16 so I'm having the same issue. They are able to be read in KDE Elisa. I think that project uses taglib though. |
Do your files have other tags? In the case of the file provided in this issue, it has both a RIFF INFO and an ID3v2 tag. Elisa ends up just using the data from the ID3v2 tag and logs UTF-8 errors for the RIFF INFO tag. |
I added metadata to several .wav files with musicbrainz picard. I think picard adds ID3v2 tags and RIFF Info tags to wavs by default. How would I check the tag types? Running I have another file with the ellipses character. It also fails in lofty. No errors in ffprobe or elisa. I have other files with non-english characters. They play in Elisa and I can view the metadata correctly there. When I pass the files into lofty, I get the following error: |
That's probably it. Most serious music players will check all tags to fill in any missing fields. Trying to load a non UTF-8 RIFF INFO tag with Elisa will log errors, and it will fallback to the info it can get from the ID3v2 tag. Elisa just depends on I will say, a hard error shouldn't be the case outside of
I use kid3 to see what tags a file has. It uses TagLib, and with the asset provided in the issue, it ignores any field in the RIFF INFO tag that it can't parse as UTF-8. |
I downloaded the kid3 program. The files that failed to read in lofy had an ID3 and a RIFF tag. Some also had extra tags, but it didn't list a type or any info. I noticed some files display the data correctly in the ID3 tag, but show an empty entry in the RIFF tag. For example, the file with the invalid UTF8 warning when inspected with ffprobe had an apostrophe in the title. It is visible in the ID3 tag, but the RIFF tag shows the title as empty (key exists, no value). Other values were replaced instead. ID3 has a - (dash) in the artist entry while RIFF has a ? (question mark). |
Kid3 puts markers to show that you can add another tag to the file, not necessarily that it's present, BTW.
Yeah, I haven't actually seen anyone make use of TagLib's |
From above, I think in the future |
Interesting! I've never heard of this app, but I think it will be helpful for my project. I was using picard to inspect metadata but this one seems better for what I need. |
Reproducer
I tried this code:
The lofty version is "0.18.2"
Summary
There is an error "Wav: Failed to read RIFF INFO item value"
The Windows Properties page can read the tags in it. I can also play it on Windows Media Player.
Can anyone provide some information about this? Thanks.
Expected behavior
Read tag correctly.
Assets
大哉乾元(洛天依人声版)_MMM.wav
The text was updated successfully, but these errors were encountered: