Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Solved: mpd error malformed utf-8 characters, possibly incorrectly encoded
#41
The bottom line for me is that stuffing ID3 frames into a RIFF INFO chunk is a hack---allowable as user-defined fields but not standard and the result is not uniformly interpreted by commonly used apps. 

As for malformed UTF-8 characters, perhaps there's some UTF-16, with or without BOM, mixed in? I don't know what the contributed code would do in this case.

Whatever, in Linux at least I can cut and paste the Chinese character strings from the example file into other metadata tagging schemes and they "just work". It's only the pesky WAV format which is causing me problems.

This use of ffmpeg to copy without transcoding and to add the metadata I scrapped is close to a solution [1]

Code:
ffmpeg -i "06 但愿人长久.wav" -c:a copy \
-metadata IPRD="《和谐之声 为祖国祝福 长城独唱音乐会》" \
-metadata IART="谭晶 " \
-metadata IPRT="但愿人 长久" out.wav

The output first lists all the boring ffmpeg configuration info and then gets to the good stuff:

Code:
...
[wav @ 0xc79d20] Discarding ID3 tags because more suitable tags were found.
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, wav, from '06 但愿人长久.wav':
 Metadata:
   album           : ????? ????? ????????
   artist          : ??
 Duration: 00:04:15.85, bitrate: 1411 kb/s
   Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16, 1411 kb/s
Output #0, wav, to 'out.wav':
 Metadata:
   IPRD            : 《和谐之声 为祖国祝福 长城独唱音乐会》
   IART            : 谭晶
   IPRT            : 但愿人长久
   ISFT            : Lavf58.45.100
   Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16, 1411 kb/s
Stream mapping:
 Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
size=   44075kB time=00:04:15.83 bitrate=1411.3kbits/s speed= 436x    
video:0kB audio:44075kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000408%
 
Two points to note: it discards the ID3 data, yay, and it shows it has seemingly written correct values for the RIFF INFO fields (replacing the ??? strings along the way). Here, IPRD is the album title; IART is the artist name; IPRT is the track name. As an aside, in the original file, the RIFF INFO chunk came last. The RIFF INFO chunk comes first in the new file, which makes more sense.

However, we're not out of the woods yet. moOde is correctly displaying the IPRD and IART values as "album" and "artist" but it isn't displaying the IPRT value as "track". It appears to be displaying the file base-name instead, "out" in this case. As well, mediainfo is befuddled by the RIFF INFO fields and isn't displaying the correct glyphs either.

I think I'm done here.

Regards,
Kent

[1] for you nitpickers in the audience, exactly the same result is obtained if I use "album", "artist", and "track" instead of "IPRD", "IART", "IPRT" in this command. I just like using the "standard" keys.
Reply
#42
Either way it' looks like it's not as issue with moOde code but rather with the files themselves.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#43
Agreed.
Reply
#44
agree.
so i think editing the tag will be the best and easiest way for noobie like me lol.

thanks. so i think this issue is solved and can be references for those who has the same issues.

thanks tim and kent.
Reply


Forum Jump: