Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Wiim Mimi fails to play files from MinimServer
25-07-2022, 18:24
Post: #1
Wiim Mimi fails to play files from MinimServer
Hi @simoncn,

I've just picked up a Wiim Mini to play with and to my surprise it refuses to play both flac and mp3 files (the only ones I tested) from MinimServer yet will from both AssetUPnP and Plex running on the same Windows machine. The specs say it supports FLAC and MP3, so I'm at a bit of a loss.

It'll play radio from MinimServer, and if I transcode my flacs to wav it'll play them fine but if I try and stream the files themselves it displays the error message:
Invalid MIME-type or resource not find (code: 714)

Could it be something to do with the way the URL is presented?

Here's a trace log during the Play action
Code:
18:05:19.740 Thread-10: HTTPService: accepted incoming connection
18:05:19.740 Thread-10: HTTPService: waiting for incoming connection
18:05:19.740 Thread-9: HTTPService: received request, Socket[addr=/192.168.20.143,port=50278,localport=9790]
18:05:19.740 Thread-9: HTTPService: adding connection org.jminim.lib.HTTPConnection@529d0299
18:05:19.740 Thread-80: HTTPConnection: reading HTTP request
18:05:19.740 Thread-79: HTTPConnection: writer thread waiting for request
18:05:19.740 Thread-80: GET /minimserver/*/MUSIC_TEST/Brown,*20James/1991*20-*20Star*20Time/CD01/01.01.flac HTTP/1.1
18:05:19.740 Thread-80: User-Agent: Lavf/59.16.100, Accept: */*, Connection: close, Host: 192.168.20.12:9790, Icy-MetaData: 1
18:05:19.740 Thread-80: HTTPConnection: reading HTTP request
18:05:19.740 Thread-79: HTTPConnection: writer thread processing request
18:05:19.756 Thread-79: HTTP/1.1 200 OK, Accept-Ranges: bytes, Date: Mon, 25 Jul 2022 17:05:19 GMT, Content-Length: 11970028, Content-Type: audio/x-flac, Connection: close, Last-Modified: Wed, 16 Feb 2022 16:41:13 GMT
18:05:19.756 Thread-79: writing data: total=11970028 from file Brown, James/1991 - Star Time/CD01/01.01.flac
18:05:19.756 Thread-79: writing 16384 bytes: total=11970028
18:05:19.756 Thread-79: writing 16384 bytes: total=11970028
18:05:19.756 Thread-79: writing 16384 bytes: total=11970028
18:05:19.756 Thread-79: writing 16384 bytes: total=11970028
18:05:19.756 Thread-79: writing 16384 bytes: total=11970028
18:05:19.756 Thread-79: writing 16384 bytes: total=11970028
18:05:19.772 Thread-79: writing 16384 bytes: total=11970028
18:05:19.772 Thread-80: HTTPConnection: end of input stream data
18:05:19.772 Thread-80: HTTPConnection: requestStop
18:05:19.772 Thread-80: HTTPConnection: stopping connection
18:05:19.772 Thread-80: ServerResourceBase: forced socket close: Socket[addr=/192.168.20.143,port=50278,localport=9790]
18:05:19.772 Thread-80: HTTPService: removing connection org.jminim.lib.HTTPConnection@529d0299
18:05:19.772 Thread-79: FileResource: close
18:05:19.772 Thread-79: FileResource.close: terminating reader thread
18:05:19.772 Thread-79: FileResource.close: interrupt during join call
18:05:19.772 Thread-81: FileResource: waitForEmpty caught InterruptedException
18:05:19.772 Thread-79: ServerResourceBase: close
18:05:19.772 Thread-79: HTTPConnection: SocketException writing HTTP response to Socket[addr=/192.168.20.143,port=50278,localport=9790]
18:05:19.772 Thread-79: HTTPConnection: writer thread interrupted
18:05:19.772 Thread-79: HTTPConnection: stopping connection

If there's anything else I can try/supply just let me know.

Thanks
Find all posts by this user
Quote this message in a reply
25-07-2022, 19:45 (This post was last modified: 25-07-2022 19:47 by simoncn.)
Post: #2
RE: Wiim Mimi fails to play files from MinimServer
This log shows that the renderer has started to stream audio data and has then closed the connection. There is no obvious reason for this.

At a wild guess, could it be that this renderer cannot accept the audio/x-flac MIME type (the industry standard for FLAC files)?

Another possibility (perhaps more likely) is that the FLAC file contains an emdedded image that the renderer cannot handle. Transcoding to WAV would remove any embedded image.
Find all posts by this user
Quote this message in a reply
25-07-2022, 20:26
Post: #3
RE: Wiim Mimi fails to play files from MinimServer
(25-07-2022 19:45)simoncn Wrote:  At a wild guess, could it be that this renderer cannot accept the audio/x-flac MIME type (the industry standard for FLAC files)?
I know you can put Asset in a debug mode so I'll try that to see what it's sending.

(25-07-2022 19:45)simoncn Wrote:  Another possibility (perhaps more likely) is that the FLAC file contains an emdedded image that the renderer cannot handle. Transcoding to WAV would remove any embedded image.
I don't have embedded images so it can't be that.

I tried with both BubbleUPnP and Hi-Fi Cast with exactly the same results, but I've just tried by using the accompanying Wiim Home app itself (obviously a serious downgrade from BubbleUPnP) and that does work, so I'll try and track down the MIME type tomorrow and then forward a query onto the manufacturer.

If I get anywhere I'll update here just fyi.

Thanks
Find all posts by this user
Quote this message in a reply
25-07-2022, 20:52
Post: #4
RE: Wiim Mimi fails to play files from MinimServer
Getting that information out of Asset was easier than I thought it was going to be.
From the DIDL it looks basically the same:
Code:
AssetUPnP
<res duration="0:02:45.000" size="11970028" bitrate="176400" bitsPerSample="16" sampleFrequency="44100" nrAudioChannels="2" protocolInfo="http-get:*:audio/x-flac:DLNA.ORG_PN=FLAC;DLNA.ORG_OP=01;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=03700000000000​000000000000000000">http://192.168.20.12:26125/content/c2/b16/f44100/d4075091794238302027-co9D0C688BC59B05C6.flac</res>
MinimServer
<res duration="0:02:45.173" size="11970028" bitsPerSample="16" bitrate="176400" sampleFrequency="44100" nrAudioChannels="2" protocolInfo="http-get:*:audio/x-flac:DLNA.ORG_OP=01;DLNA.ORG_FLAGS=01700000000000000000000000000000">http://192.168.20.12:9790/minimserver/*/MUSIC_TEST/Brown,*20James/1991*20-*20Star*20Time/CD01/01.01.flac</res>

It also gives you a simpler summary

Code:
===========ProcessFileRequest================
http://192.168.20.12:26125/content/c2/b16/f44100/d4075091794238302027-co9D0C688BC59B05C6.flac
=============================================

Content Range: -1 to -1
Opening audio file: D:\MUSIC_TEST\Brown, James\1991 - Star Time\CD01\01.01.flac

Streaming File Untouched [11970028 bytes]: D:\MUSIC_TEST\Brown, James\1991 - Star Time\CD01\01.01.flac
Serve Entity Set to: audio/x-flac

That probably rules out the MIME type, so I'll see if I get any response from Wiim.
Find all posts by this user
Quote this message in a reply
25-07-2022, 20:58
Post: #5
RE: Wiim Mimi fails to play files from MinimServer
Comparing these, I see that Asset UPnP has DLNA.ORG_PN=FLAC and MinimServer doesn't.
Find all posts by this user
Quote this message in a reply
25-07-2022, 21:22 (This post was last modified: 25-07-2022 21:36 by simbun.)
Post: #6
RE: Wiim Mimi fails to play files from MinimServer
(25-07-2022 20:58)simoncn Wrote:  Comparing these, I see that Asset UPnP has DLNA.ORG_PN=FLAC and MinimServer doesn't.
I saw the ORG_FLAGS and managed to make some sense of those but missed that completely!
I just sent an MP3 from Asset and that was tagged appropriately (DLNA.ORG_PN=MP3).

I take it this isn't mandatory in ProtocolInfo (given MinimServer works with everything else I've tried it with)?

I'll try to see if Plex sends this too, but Plex is a beast so I'm not very hopeful :-)
Find all posts by this user
Quote this message in a reply
25-07-2022, 22:08
Post: #7
RE: Wiim Mimi fails to play files from MinimServer
When I looked at this a few years ago, I was careful to include only those values that are part of the DLNA specification: MP3, AAC_ISO_320, AAC_ISO and LPCM.

Can you repeat this exercise with an MP3 file? In this case, MinimServer should be sending DLNA.ORG_PN=MP3.
Find all posts by this user
Quote this message in a reply
25-07-2022, 23:02 (This post was last modified: 25-07-2022 23:15 by simbun.)
Post: #8
RE: Wiim Mimi fails to play files from MinimServer
Yes MinimServer does send 'DLNA.ORG_PN=MP3' for mp3's so maybe it's not that that's causing the problem.

Code:
AssetUPnP
<res duration="0:03:22.000" size="8114100" bitrate="40010" bitsPerSample="16" sampleFrequency="44100" nrAudioChannels="2" protocolInfo="http-get:*:audio/mpeg:DLNA.ORG_PN=MP3;DLNA.ORG_OP=01;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=037000000000000​00000000000000000">http://192.168.20.12:26125/content/c2/b16/f44100/d7567312460699755660-coDCB071445BC34CFF.mp3</res>
MinimServer
<res duration="0:03:22.762" size="8114100" bitrate="40000"                    sampleFrequency="44100" nrAudioChannels="2" protocolInfo="http-get:*:audio/mpeg:DLNA.ORG_PN=MP3;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=01700000000000000000000000000​000">http://192.168.20.12:9790/minimserver/*/MUSIC_TEST/John,*20Elton/2021*20-*20The*20Lockdown*20Sessions/CD01/01.01.mp3</res>

Looking at the control point metadata for AssetUPnP (see image attached) it seems to offer multiple streams, I have no idea how to control that (if I even can), but maybe Asset always streams, which does work in MinimServer.

In the DIDL, Asset flags the mp3 streams and the WAV stream with 'DLNA.ORG_CI=0' and the L16 as 'DLNA.ORG_CI=1'. Given the WAV stream can't be the native file, that flag must be more nuanced than just native file vs stream I guess.

EDIT: BubbleUPnP does indicate that a FLAC/MP3 is being played from Asset.


Attached File(s) Thumbnail(s)
   
Find all posts by this user
Quote this message in a reply
25-07-2022, 23:14
Post: #9
RE: Wiim Mimi fails to play files from MinimServer
Stream #1 and stream #4 seem identical.

You can offer the same multiple streams in MinimServer by using MinimStreamer and setting stream.transcode to mp3:-/wav/L16
Find all posts by this user
Quote this message in a reply
08-03-2023, 09:14
Post: #10
RE: Wiim Mimi fails to play files from MinimServer
Just to close this off, I think it's a bug in WiiM, nothing to do with MinimServer at all.

It seems that if there's a dot in the filename (in addition to the dot before the file extension) and there are fewer than 4 characters between it and the final dot then WiiM fails with the MIME type error, and given that my filenames are discnumber.tracknumber it was failing on all of them, but not the transcoded ones because they were suffixed with $!transcode.wav.

I don't know why they're even processing the file extension as they'll have already been sent the MIME-type.

AssetUPnP was working because it doesn't pass the actual filename, it uses some internal hash like structure.

Not sure how the renderer worked when being sent the files from the WiiM app as opposed to a third party one either.

Anyway, it's now reported so will hopefully be resolved at some point.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)