Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: foo_upnp (Read 1734168 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

foo_upnp

Reply #1000
I do not understand the exact problem and what you did. WAV is not a DLNA type (while LPCM is).
That doesn't mean the TV is not able to play it though.
Usually on DLNA device it is better to use LPCM as its support is mandatory.


The problem is that my Sony Blu-Ray player fails to play wav files if their DLNA type is LPCM.
But if I set DLNA type of .wav filest to MP3 (using some other UPnP server), Sony plays them without any problem.
May be it is a firmware bug of Sony as my player is rather new and it will be fixed later,
but it will be convinient if I could set DLNA type for files myself in configuration.

 

foo_upnp

Reply #1001
Hi bubblegum,

I am the author of Whitebear media server (more info here) and I find that foo_upnp is unable to play music streams served by Whitebear.
The following is the log from Foobar when you try to play a file from Whitebear:

Code: [Select]
Opening track for playback: "http://192.168.1.37:31415/music?track_id=16;tgt_fmt=l16"
Could not read info (Unsupported format or corrupted file) from: "http://192.168.1.37:31415/music?track_id=16;tgt_fmt=l16"
Unable to open item for playback (Unsupported format or corrupted file):
"http://192.168.1.37:31415/music?track_id=16;tgt_fmt=l16"

The following is a capture of the HTTP transaction between Foobar and Whitebear:

Code: [Select]
**** 12:44:54:550 -- Whitebear Media Server:  Request ****
GET /music?track_id=16;tgt_fmt=l16 HTTP/1.1
Host: 192.168.1.37:31415
Connection: close
User-Agent: foobar2000/1.1
Accept: */*
Icy-MetaData:1

**** 12:44:54:825 -- Whitebear Media Server:  Response ****
HTTP/1.1 200 OK
Connection: close
Content-Type: audio/l16
contentFeatures.dlna.org: DLNA.ORG_PN=LPCM
TransferMode.dlna.org: Streaming
Accept-Ranges: none
Server: Andrew Fiddian-Green/1.0, UPnP/1.0, Whitebear Media Server/2.0

>> Connection broken by Foobar after 1'212'416 bytes have been sent

Foobar breaks the connection after about 1 megabytes have been sent. Whereas by contrast, when I play the exact same file in Windows Media Player all 42'366'576 bytes are downloaded, and the file plays fine.
As you can see, I am streaming the file in 16 bit LPCM format (big endian) with 44.1kHz sample rate and 2 channels; this plays fine on other renderers (such as WMP 12), so it is not at all clear why Foobar doesn't like it.

Question: can you please advise why your plugin is not accepting such streams?

{PPS by the way, when you use Foobar as a control point to play a file from Whitebear to (say) WMP then the file is played correctly..}

Regards,
AndrewFG


foo_upnp

Reply #1003
that foo_upnp is unable to play music streams served by Whitebear.

Just thinking about it more, I suppose that the problem may not be in the foo_upnp plugin, but rather in Foobar itself. I just tried Foobar's File Add location function, and it returns the same error.



It's indeed foobar http decoder at work here. For LPCM its expects a Content-Type header of the form.

Code: [Select]
audio/L16;rate=<samplerate>;channels=<channel count>



foo_upnp

Reply #1004
Hi!

I have the same problem as another user some pages before:

I want to use foo_upnp to serve my library to my Samsung LE40B650 TV.
Streaming with Win 7 and/or Samsung share manager works just fine.
The TV can "see" foobar2000 but is not able to show me any contents.
When I select for example "playlists" the TV always prompts me the same message: "Unable to handle request, mediaplayer now returns to the main screen". Also when I use UPnP controler, his color is grey but I can control the volume of the TV( if I play a file from Win7).

I tried 0.99.28  but nothing happens? Any ideas?
(Also when I drag n drop a file on the controler ,on only 0.99.28 it says: "SetAVTransportURI Error:Resourse not found (716)"

foo_upnp

Reply #1005
It's indeed foobar http decoder at work here. For LPCM its expects a Content-Type header of the form.

Code: [Select]
audio/L16;rate=<samplerate>;channels=<channel count>

Thanks for the help. I will try that out, and report back.

As a matter of interest: according to my understanding the correct mime-type is audio/l16 (small "l") rather than audio/L16 (big "L"); do you know if Foobar is clever enough to accept both alternatives?

Regards,
AndrewFG

foo_upnp

Reply #1006
As a matter of interest: according to my understanding the correct mime-type is audio/l16 (small "l") rather than audio/L16 (big "L"); do you know if Foobar is clever enough to accept both alternatives?


According to the RFC it is audio/L16. Most Media Servers (including WMP) use audio/L16 in their protocol info string so you can safely use that.



foo_upnp

Reply #1008
According to the RFC it is audio/L16. Most Media Servers (including WMP) use audio/L16 in their protocol info string so you can safely use that.

Weell. The RFC talks about "Audio/L16" with  large "A" and large "L". And the large "A" is surely wrong...



True...according to another RFC, mime-types in a Content-Type header are not case sensitive. So AuDiO/l16 is valid .

foo_upnp

Reply #1009
True...according to another RFC, mime-types in a Content-Type header are not case sensitive. So AuDiO/l16 is valid

Apropos valid mime types:  I wonder if there is an accepted "standard" way for servers to offer those common audio mimetypes which are not actually standardised (in the sense of having an official accepted RFC). By convention, non standardised mime types have an x- prefix. So my question is whether my server should offer the mime type with x- prefix or without?

Code: [Select]
audio/aac    audio/x-aac
audio/ac3    audio/x-ac3
audio/aiff    audio/x-aiff
audio/flac     audio/x-flac
audio/m4a    audio/x-m4a
audio/mp3    audio/x-mp3
audio/mpeg    audio/x-mpeg
audio/wav    audio/x-wav

audio/x-ms-wma
audio/x-ms-wmv

Regards,
AndrewFG

foo_upnp

Reply #1010
The %<.......>% notation seems broken, at least this simple xml doesn't work:

Code: [Select]
<MediaLibraryTree>
    <SubTree label="Artists">
        <spec type="object.container.person.musicArtist">%<album artist>%</spec>
        <spec type="object.container.album.musicAlbum">%album%</spec>
    </SubTree>    
</MediaLibraryTree>


Also It would be good to show a warning in the  console when it fails to parse the  xml file and fallbacks to its internal default.
Fabulous work bubblegum, thank you very much for your plugins.

foo_upnp

Reply #1011
I don't know if the %<blah>% format is supported by foo_upnp at all, but what you have pasted is definitely not a valid XML.
You ought to write [font= "Courier New"]<spec ...>%&lt;album artist%gt;%</spec>[/font] etc.
Full-quoting makes you scroll past the same junk over and over.

foo_upnp

Reply #1012
I don't know if the %<blah>% format is supported by foo_upnp at all, but what you have pasted is definitely not a valid XML.
You ought to write <spec ...>%&lt;album artist%gt;%</spec> etc.



Indeed, that's the correct way to specify %<blah>%.

foo_upnp

Reply #1013
you're of course right, thank you both!!

foo_upnp

Reply #1014
hmm, with the  above corrected xml tree, UPNP Browser seems to miss most node entries.

The Artists node is about 30 entries long instead of about 500. WMP shows them correctly, so I guess sth is wrong with UPNP browser?
Any ideas?

foo_upnp

Reply #1015
Hi All!
I'm also checking whether Foobar with the foo_upnp plugin, can control the Squeezebox Server through the using of WhiteBear?

What I'm looking for, is when playing a track in Foobar's playlist, it would not using the soundcard in the PC, but instead, it would control the SqueezeBox Server through the WhiteBear, effectively controlling the Squeezebox Hardver playing itself, so hearing the track on it then.

I know there is an addon for SqueezeServer called WaveIn which can achieve similar functionality but it's not perfect, has a delay, and also it may resample the file.

Is above possible with foo_upnp and WhiteBear?

Thanks a lot!

foo_upnp

Reply #1016
I'm also checking whether Foobar with the foo_upnp plugin, can control the Squeezebox Server through the using of WhiteBear?
What I'm looking for, is when playing a track in Foobar's playlist, it would not using the soundcard in the PC, but instead, it would control the SqueezeBox Server through the WhiteBear, effectively controlling the Squeezebox Hardver playing itself, so hearing the track on it then.
Is above possible with foo_upnp and WhiteBear?

Yes.


foo_upnp

Reply #1018
foo_upnp streams perfectly to my WD TV Live, however, I have a few Various Artists albums which I have tagged the following way:



The WD TV Live uses the Album Artist tag to display the currently playing tracks artist, is there anything I can do from foo_upnp's end to fix this?

Thanks


foo_upnp

Reply #1020
A new version of Whitebear has been released that resolves many issues with Foobar.
Please try it and give me feedback

YES! YES!
Thanks for your work!
Now everything is working properly!!
This new version (2.0.1.1051) fixes the problems!

1. When using Whitebear as Media Server, Foobar with using the "UPnP Browser" function, is playing the files from Whitebear properly!

2. When using Whitebear as Media Renderer, Foobar with using the "UPnP Controller" function, Foobar can control the Squeezebox properly! It works!
I messed approx 2 hours until I figured out how it works. For me, it actually needed these:
- In Foobar UPnP settings, in "Streaming Profiles" I created a new profile. The user-agent contains "Squeezebox".
- In this profile, I set these:
  a) Renderer Capabilites: Can decode HTTP and MMS streams directly checkbox ON.
  b) Decoding to PCM: Never to WAV
  c) Playback Stream Capture: Codec: WAV
- In the Server Basic Settings, the Media Server should be started. The Media Renderer no need to be started.
- It took a while until I figured out the following steps as well. Was not so trivial for me.
  I. First you need to open the "UPnP Controller" in Foobar. It also opens a "UPnP Controller Playback Queue" at the same time.
  II. Then you select "Squeezebox (by Whitebear)" in the UPnP Controller. At this point it resets the "UPnP Controller Playback Queue" so pointless tp put files there before.
  III. Now you put files to the "UPnP Controller Playback Queue".
  IV. Now you can press the second Play button which contains a "C" letter in the Controller. It is the function "Play foobar2000 Playback Stream Capture". Or just select the file from this playlist to play with double click so it plays in Squeezebox.
  V. Also very important to keep the "UPnP Controller" window open always during the playback. If you close this, you lose the control functionality!

For this way FLAC plays in Squeezebox for me from Foobar. I'm not sure that a) setting above needed, but b) and c) settings needed I think, otherwise it didn't work for me. But maybe I missed something. This way the file sent as FLAC direcly to Squeezebox.

So thanks for your work andrewfg indeed!

foo_upnp

Reply #1021
Edited out.

foo_upnp

Reply #1022
Quote
YES! YES!
Thanks for your work!
Now everything is working properly!!
This new version (2.0.1.1051) fixes the problems!

I am glad to hear you got it working.

Quote
I messed approx 2 hours until I figured out how it works. For me, it actually needed these:

I don't think you need all of this. For me, it worked perfectly with a normal "out of the box" installation of Foobar. No need to make any settings.

Quote
- In Foobar UPnP settings, in "Streaming Profiles" I created a new profile. The user-agent contains "Squeezebox".
- In this profile, I set these:
  a) Renderer Capabilites: Can decode HTTP and MMS streams directly checkbox ON.
  b) Decoding to PCM: Never to WAV
  c) Playback Stream Capture: Codec: WAV

I'm not sure that a) setting above needed, but b) and c) settings needed I think, otherwise it didn't work for me. But maybe I missed something. This way the file sent as FLAC direcly to Squeezebox.

I don't think you really need such a profile at all. But of the three settings you made, my guess is that a) is the more useful one: this would avoid Foobar doing forced transcoding to PCM if it is not needed (and Squeeze Center can handle most formats itself); but even if Foobar is transcoding to PCM at the Foobar side, the Squeezebox can handle this too, so probably it is just a matter of preference about where you want to do your transcoding. Concerning setting b) I don't really understand that setting, but transcoding to PCM (when needed) is certainly not a bad idea becuase it is the default "raw" format for Squeeze players; (but frankly I don't know the difference between "always to pcm" and "never to wav"). And concerning setting c) I don't know what the captured stream is supposed to be, so I think it's not relevant; (but capture to wav is the default setting anyhow).

Quote
- In the Server Basic Settings, the Media Server should be started. The Media Renderer no need to be started.

The default is for both servers to be running. The Media Server means that Foobar can be a source of music. The Media Renderer means that Foobar can be a sink. The latter is indeed not relevant to Whitebear or Squeeze...

Quote
- It took a while until I figured out the following steps as well. Was not so trivial for me.
  I. First you need to open the "UPnP Controller" in Foobar. It also opens a "UPnP Controller Playback Queue" at the same time.
  II. Then you select "Squeezebox (by Whitebear)" in the UPnP Controller. At this point it resets the "UPnP Controller Playback Queue" so pointless tp put files there before.
  III. Now you put files to the "UPnP Controller Playback Queue".
  IV. Now you can press the second Play button which contains a "C" letter in the Controller. It is the function "Play foobar2000 Playback Stream Capture". Or just select the file from this playlist to play with double click so it plays in Squeezebox.
  V. Also very important to keep the "UPnP Controller" window open always during the playback. If you close this, you lose the control functionality!

I agree. (You need to talk to bubblegum about this). However, the short cut is to select the files in the UPnP Browser Selection and drag them directly to the selected UPnP Controller window. (This adds the files to the UPnP Controller Playback Queue and starts playing the first one). I also do not understand the meaning of the two different Play buttons, but I find that the normal one works fine...


foo_upnp

Reply #1023
Perhaps it is worthwhile explaining the various possible inter relationships between UPnP actors.
Basically there are three different types of actor:

DMS = Digital Media Server
DMR = Digital Media Renderer (aka Player)
DMC = Digital Media Controller (aka Control Point)

Whitebear is a DMS and a DMR. Foobar is a DMS, DMR and DMC.

A DMS does two things: i) it offers a "Content Directory" interface that allows you to browse for music albums, tracks etc., and ii) it can serve the respective music items over an HTTP stream.

A DMR also does two things: i) it offers a player control that allows you to command the player (volume, mute, play, pause, stop, select track URL etc.), and ii) it can download and play the selected track URL from an HTTP stream server.

A DMC is a software that can talk either a DMS or a DMR (or both).

A typical transaction process between actors is a three way triangle as follows:

1) the DMC queries the DMS to enable the user to select a track (whose url is on the DMS)
2) the DMC instructs the DMR that it shall prepare to load the respective track url
3) the DMR (HTTP client) connects to the DMS (HTTP server) to download (and play) the track

The intersting thing is the number of possible combinations between DMS, DMC and DMR. For example, just in the case of Foobar and Whitebear alone, there are the following four different combinations (if you involve third party DMS and DMR, the permutations are more-or-less endless):

a) Foobar(NativeLibrary) => Foobar(Browser) => Foobar(NativePlayer)  -- {obviously this is NOT done via UPnP}
b) Whitebear(DMS) => Foobar(Browser + DMC) => Foobar(NativePlayer)
c) Whitebear(DMS) => Foobar(Browser + DMC) => Whitebear(DMR)
d) Foobar(NativeLibrary) => Foobar(Browser + DMS) => Whitebear(DMR)

Process a) is fully native to Foobar. This is none of Whitebear's business. And it works fine.

In process b) Whitebear is responsible for delivering the Content Directory according to UPnP specifications, and for serving the music stream according to HTTP file streaming specifications. This has been tested with various DMCs and renderers (WMP, Foobar, Asset Control, Sony TV, Oppo Blu-Ray, Cidero, Intel, to name a few). This is pretty stable and it works fine.

In process c) Whitebear is responsible for all functions of process b) -- plus it must be able to, as it were, download and play tracks to itself. Actually Whitebear does not really download to itself, but instead it instructs Squeeze Server to play a given Squeeze library track_id on a given Squeeze player_id. In other words this play to itself feature is native to Squeeze Server and has been extensively tested by other elsewhere. So again it works fine.

Process d) is the trickiest one. In this case, when Whitebear tries to play the music, it actually instructs Squeeze Server to download the given remote url stream (from Foobar's DMS HTTP server) and play it on a given Squeeze player_id. This requires the Foobar server to deliver the music to Squeeze Server in a format that Squeeze Server can understand. Apparently there are still some issues here. But I as the author of Whitebear am powerless to do anything (I am neither the author of Foobar nor Squeeze Server, and there is very little influence I can make on them). The previous poster's 2 hours of messing with Foobar was an attempt by him to enable Foobar to satisfy the expectations of Squeeze Server...

foo_upnp

Reply #1024
However, the short cut is to select the files in the UPnP Browser Selection and drag them directly to the selected UPnP Controller window. (This adds the files to the UPnP Controller Playback Queue and starts playing the first one).

Thanks for this dragging tip! It is useful to know!

It's also possible just drag and drop files from local filesystem (not only from UPnP Browser queue) to the UPnP Controller window, this will add the files to the  UPnP Controller Playback Queue and starts playing the first one. This was what I wanted originally.


Perhaps it is worthwhile explaining the various possible inter relationships between UPnP actors.

b) Whitebear(DMS) => Foobar(Browser + DMC) => Foobar(NativePlayer)
c) Whitebear(DMS) => Foobar(Browser + DMC) => Whitebear(DMR)
d) Foobar(NativeLibrary) => Foobar(Browser + DMS) => Whitebear(DMR)

Apparently there are still some issues here.


Yes, it's definitely worth to see these interactions. Indeed a little messy to recognise what is doing what at first.

Am I correct in below short meanings?
b) Means when you play files from a SqueezeServer library, with Foobar on the local PC to the local soundcard.
c) Means when you simply control the Squeezebox from Foobar. The files are at the SqueezeServer library, and the SqueezeBox is the player. I guess this is only useful if the SqueezeServer library is on a remote NAS. If the SqueezeServer library is on the local PC, then it's no point. Because then it's easier to drag local files to the Controller. In that case, case d) coming up.
d) This is when you want to play files from the local PC filesystem, with the SqueezeBox. I think this is the opposite direction to b). Is it rather should be "Foobar(NativeLibrary) => Foobar(DMC + DMS) => Whitebear(DMR)" ?

As for issues, yes, still there are some. For me, sometimes it stops to play in case of d), and occasionally pink noise came from the speakers. Occured a couple of times yet. But at all it's working and it's good!


Hi bubbleguuum!

Could you might clarify the below settings, regarding the case when Foobar controls the SqueezeBox, aka d) case above? Are these settings do anything for this case?
1) Renderer Capabilites: Can decode HTTP and MMS streams directly checkbox.
2) Decoding to PCM: Decode Never/always to WAV/LPCM.
3) Playback Stream Capture: Codec: WAV/LPCM.

Thanks a lot!