![]() |
[SOLVED] mpd error malformed utf-8 characters, possibly incorrectly encoded - Printable Version +- Moode Forum (https://moodeaudio.org/forum) +-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3) +--- Forum: Support (https://moodeaudio.org/forum/forumdisplay.php?fid=7) +--- Thread: [SOLVED] mpd error malformed utf-8 characters, possibly incorrectly encoded (/showthread.php?tid=4859) |
RE: mpd error malformed utf-8 characters, possibly incorrectly encoded - chaos333 - 05-20-2022 (05-18-2022, 02:55 PM)Tim Curtis Wrote: Cool. I'll add them to upcoming 8.1.0 thanks. but still the mpd erro malform problem happen when i choose chinese album to play and not solve yet. i though it was solved after clear cache. but even after i reconnect the first Nas and read the chinese alburms, it happen again. dont know how to proceed.. RE: mpd error malformed utf-8 characters, possibly incorrectly encoded - the_bertrum - 05-20-2022 (05-20-2022, 04:52 AM)chaos333 Wrote:(05-18-2022, 02:55 PM)Tim Curtis Wrote: Cool. I'll add them to upcoming 8.1.0 Are there Chinese characters in the filename or path to the file? RE: mpd error malformed utf-8 characters, possibly incorrectly encoded - Tim Curtis - 05-20-2022 (05-20-2022, 04:52 AM)chaos333 Wrote:(05-18-2022, 02:55 PM)Tim Curtis Wrote: Cool. I'll add them to upcoming 8.1.0 That error which is referenced in your first post https://moodeaudio.org/forum/showthread.php?tid=4859&pid=41037#pid41037 looks like it might be coming from the front-end Javascript routine that tries to parse the JSON encoded metadata being sent by MPD. Zip up one of the files and PM a download link to @TheOldPresbyope and myself and we will take a look at the Browser console with Debug logging turned on (System config). The code block below from playerlib.js is what may be generating the error. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError Code: // Always have valid json RE: mpd error malformed utf-8 characters, possibly incorrectly encoded - chaos333 - 05-21-2022 (05-20-2022, 11:23 AM)Tim Curtis Wrote:hi Tim,(05-20-2022, 04:52 AM)chaos333 Wrote:(05-18-2022, 02:55 PM)Tim Curtis Wrote: Cool. I'll add them to upcoming 8.1.0 thanks. but how i can proceed to zip? sorry i know nothing of the linux scrip and i can only using ssh to log into the moode.. please if yo have time, show some detail step for a newbie like me to do. thanks. RE: mpd error malformed utf-8 characters, possibly incorrectly encoded - chaos333 - 05-21-2022 (05-20-2022, 06:17 AM)the_bertrum Wrote:(05-20-2022, 04:52 AM)chaos333 Wrote:(05-18-2022, 02:55 PM)Tim Curtis Wrote: Cool. I'll add them to upcoming 8.1.0 sorry to say, but both... path to the files + alburm name and song name.. RE: mpd error malformed utf-8 characters, possibly incorrectly encoded - TheOldPresbyope - 05-21-2022 Look up thread for my post about tests with synthetic files using either Greek or Chinese characters in metadata and in file names. Result: I didnt have a problem.. I'm still dubious about the specific metadata in the OP's WAV files. Looking forward to seeing the latest. Regards, Kent RE: mpd error malformed utf-8 characters, possibly incorrectly encoded - chaos333 - 05-27-2022 lucky you are kent. still no solution yet. but seems it will happen when i play chinese character albums. and some times not. i dont know why. RE: mpd error malformed utf-8 characters, possibly incorrectly encoded - TheOldPresbyope - 05-27-2022 @chaos333 Let's review, shall we? As I understand it, there are three aspects to your issue
In my limited testing, Kid3 does not touch the RIFF fields and so can't fix the contradiction between RIFF INFO and ID3 tags. This even though it indicates it knows there is an RIFF INFO chunk present. It does appear to succeed in reorganizing things though. I don't know if this reorganization is helpful, benign, or harmful. No tool I commonly use to manipulate metadata in media files has shown itself able to edit the mixture of RIFF INFO metadata and ID3 metadata in your WAV file (exiftool looked promising but on examination I find it treats RIFF files as read-only). OTOH I'm not comfortable working with WAV files so perhaps I'm missing something simple. I suppose one could delete the RIFF INFO chunk and then create a new one containing only pre-defined RIFF fields. One might even be able to accomplish this using only ffmpeg but that's outside my experience. I outlined an alternative approach: first use ffmpeg to convert the WAV file to FLAC (which gets rid of the inconvenient RIFF approach to metadata) and then touch up the metadata in the VORBIS_COMMENT block that results. It seems to me this could be scripted in several different ways but I suggest you ask on other, more general forums such as https://hydrogenaud.io/ or elsewhere. Regards, Kent RE: mpd error malformed utf-8 characters, possibly incorrectly encoded - Sehnsucht - 05-27-2022 (05-27-2022, 05:59 PM)TheOldPresbyope Wrote: @chaos333 I had loads of problems with dodgy tags in flac files depending on the player. In the end I decided to clean them up by deleting all tags except the ones I care about. In Linux you could: Code: metaflac --show-tag DATE --show-tag TITLE --show-tag GENRE --show-tag ARTIST --show-tag ALBUM --show-tag TRACKNUMBER --show-tag DISCNUMBER "$1" | metaflac --remove-all-tags --import-tags-from=- "$1" Or write the tags to an intermediate file, editing them and then writing them back. RE: mpd error malformed utf-8 characters, possibly incorrectly encoded - Tim Curtis - 05-28-2022 (05-27-2022, 04:36 AM)chaos333 Wrote: lucky you are kent. Its most likely because the standard JSON format that moOde uses for data transfer between client and server does not support non-UTF8 characters that are present in "Many Chinese songs and song directories.." as described below by developer @lazybat Code: // Many Chinese songs and song directories have characters that are not UTF8 causing json_encode to fail which leaves the libcache json file empty. Replacing the non-UTF8 chars in the array before json_encode solves this problem (@lazybat). He contributed some code a few years ago that replaces a pattern of non-UTF8 characters by ? to prevent an empty Library. You could try to edit your file metadata to be JSON compliant or just live with the ?. You could also try contacting @lazybat on Github https://github.com/lazybat |