Help - Search - Members - Calendar
Full Version: foo_upnp
Hydrogenaudio Forums > Hosted Forums > foobar2000 > 3rd Party Plugins - (fb2k)
Pages: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
bubbleguuum
Download latest version of plugin (0.99.16.1) [BETA]
Download previous version of plugin (0.99.14)[BETA]
Foobar playing a remote item from another foobar instance
Old foo_upnp_mediaserver thread

This plugin allow to:

- Stream your files in your collection and playlists to any UPnP client, hardware (Xbox 360, PS3, ...) or software (WMP, another foobar2000 instance running this plugin, ...).
Album art streaming is supported.
Starting with version 0.95 it is possible to stream music to a remote PC on the Internet (with re-encoding to mp3 support).
That means that you can access and play from work your collection stored at home (see below for details), all within foobar2000

- Browse and play music from any other UPnP server (including this one), hardware (NAS) or software.
- Act as an UPnP Media Renderer (More Info)
- Act as an UPnP Control Point to play music stored on any UPnP Media Server to any UPnP Media renderer on the LAN. (More Info)

The server browser is an UI Element as well as a Columns UI panel called "UPnP browser".

The server part of component will stream the files in your Media library and playlists to other UPnP and DLNA clients (aka renderers),
mainly dedicated hardware (list). It works well to stream to a PS3.
The component can stream any files foobar can play. Files can be streamed in their native format for client that support if or as WAV/LPCM, or even transcoded to mp3.

To let the UPnP clients on the LAN able to see the foobar server you need to configure your firewall to allow multicast udp packets on port 1900 (SSDP).

Streaming from the internet

Suppose you want to access your collection from work. You have to configure the server part of this plugin on your home PC and you'll be using the client (browser) part at work to connect to it.
Configuring remote Internet access is done in the Server/Advanced settings preference page:

- public server IP: this is your static visible internet IP address. If you're using a router and the server runs under a PC using NAT, you'll have to configure your router to redirect incoming traffic
on the configured server port to the private IP of your PC running the server. Example: your public IP is 1.2.3.4 and your PC IP running the server on the LAN is 192.168.1.100, and the server
runs on port 5678. You have to configure your router to redirect incoming traffic on port 5678 to the PC 192.168.1.100 of your LAN. If there's a firewall as well it must be configured to allow
incoming connection on this port.
- login/password: a login and password to protect remote access. This is not super secure but should be sufficient for the purpose. Do not use an important password.

To test that the server is accessible from outside, connect to it with your browser using http://<public ip>:<server port> and you should see a blank page.
Note that it is possible to use port 80 as the server's port. This can be useful if other non-standard ports are not allowed by your admin.

To connect to a remote server, use the contextual menu in the UPnP Browser panel and select "Add remote foobar2000 server". If all goes well after you set the ip/login/port/password,
the remote server should appear in the browser. A remote server can be removed by the context-menu on its node. For security reasons remote items are never persistent and are not valid
anymore after a server restart.

Along with Internet access, it is possible to transcode audio to mp3 to adapt to often limited upload bandwidth. Look into Server/Streamed Audio for configuration.

known issues

- copying the UI element doesn't always work as expected
- seeking in FLAC files streamed as FLAC can give "Unsupported file format" errors
- File operation->copy files works (with servers that supports http seeking), but copied files have no extension (had a solution for this but conflicts with something else)

CODE


0.99.16.1
------------

- fix: crash at plugin init in some rare cases
- fix: controller: crash when adding a renderer with no AVT service (the fake Xbox 360 renderer for example)

0.99.16
----------

- chg: merge with Platinum UPnP SDK 0.5.4, should fix a few crashes and improve stability
- fix: obscure repeated crash in http request code (thanks Yirkha)
- new: in Server's advanced preferences, ability to enable log to file and to set log level. Log file is called foo_upnp.log and overwritten on each foobar2000 launch.
- fix (regression): if there was no previous config file, returned item titles defaulted to the http URL or where just empty
- add: browser: added "Directories" node, shows albums by last directory path component. Need to manually delete foo_upnp_ml_tree.xml for this new node to show up.
- new: browser: can configure action on search: send to active playlist, add to active playlist, send to UPnP Browser Search Playlist
- new: browser: display number of items in a browsed tree node
- new: browser: drag'n drop support of a node containing tracks to a playlist or whatever where tracks are accepted
- fix: browser: in some fail cases, browse and search threads could be left running indefinitely
- add: server: now returns a date if %date% is in the yyyy-mm and yyyy-mm-dd formats (before only yyyy was handled). needed for correct album grouping in WMP
- chg: server: WMP should now know about Album Artist in returned items, needed for correct album grouping.
- chg: server: if connecting client is not foobar2000 and track has %discnumber%, append %discnumber% to album name. Needed for correct album grouping on WMP
- fix: server: items with a real subsong of 0 where improperly detected (the original whole file was streamed instead of the subsong)
- fix: controller: fix bug on event subscription renewal in Platinum. On the second renewal (happening 1h after first subscription), controller would not get any event from the renderer
- fix: controller: UPnP Controller context menu on selected items could sometimes never be shown
- chg: controller now try to identify the renderer to which content is pushed to, and use the appropriate streaming profile. The Default profile is used if no matching could be made.
- fix: controller: "Client decode HTTP streams directly" setting not taken into account when sending a local item to a renderer using the controller. Now the setting in the Default profile is used in that case.
- chg: controller: don't issue 2 consecutive Seek() or SetVolume() when using the respective sliders
- chg: server: now return items sorted using the default "sort incoming by" order: "%album artist%|$if($not($meta(album artist)),%date%)|%album%|%discnumber%|%tracknumber%|%title%". this should correcltly group track by album on the XBOX360 among others.
- fix: server: return %publisher% (dc:publisher) for all UPnP clients. For foobar2000 clients (ie foo_upnp) return specific additional info in DIDL: %discnumber%, %style%, %composer%, %conductor%, %totaltracks%, %totaldiscs%, %compilation%, %vinyltrack%, %rating%.
- new: server: now returns mms:// items (previously they were skipped). Those items uses the "Client decode HTTP streams directly" setting.
- fix: server: when streaming a non-seekable location as PCM (for example relaying a netradio), seeking on the client will return a seek error to prevent bad things.
- fix: server: on foobar exit, a previous long seek operation could hang the app for a loooooooooooong while
- chg: server: the PCM decoder (also used for mp3 transcoding) was failing at some http streams and giving "file not found" errors. Now better with getting technical infos should imply less fail.
- chg: server: reduced buffer size of the PCM decoder for faster play (in the client) of http streams decoded by the server
- new: server: option in streaming profile to apply RG only to files that would be transcoded to mp3 or decoded to PCM according to the rules.
- fix: server: set rate and channels parameters in audio/L16 mime-type when streaming LPCM

0.99.14
---------
- server: play unpack:// items as PCM
- server: XBOX360 Album subtree don't use %album artist% anymore in album names to split albums
- server: returned track titles are now configurable with a titleformat script in the server's advanced preferences. Useful for hardware renderers that are not very configurable in the way they present track info
- controller: if Play() fails on a renderer, retry 1sec later (attempt to make buggy renderers work)
- browser: "Add Remote foobar2000 UPnP Server" command now available in the View menu, if the UPnP Browser component is instanciated

0.99.13
---------
- browser: fix: %artist% not appearing with Twonky and possibly other Media Servers (was using dc:creator instead of upnp:artist)
- server: new: can stream cdda:// items. Play works only if cd not playing on the server. Seek is slow
- server: fix: can stream (as PCM or MP3) xa:// items managed by foo_adpcm, and other foo_adpcm items without crashing.

0.99.12
---------
- fix: silly mistake made the Media Server not appear in fb2k browser and WMP
- fix: PlugPlayer profile will transcode Lossless if Internet connection (needs to remove of foo_upnp.xml to be applied, otherwise unckeck manually "lossless" and "internet" for this profile).
- use SDK 30062009

0.99.11
---------

- save foo_upnp.xml in the fbprofile dir
- PS3 profile stream everything as LPCM

0.99.10
---------

- chg: all configuration settings are now stored in an XML file in the user's foobar app data directory (c:\Documents And Settings\<user name>\Application Data\foobar2000\foo_upnp.xml).
It is created on first launch with default settings. If foo_upnp.xml has been edited externally and there's a parse error on load, the file is renamed as foo_upnp.xml.bak and a default
file is created. The foobar console should display a detailed message why it failed loading.

- new: it is now possible to stream to several clients (WMP, foobar, PS3, iPhone, etc) using separate streaming configuration for each, called profiles. User can edit/rename/add/remove
profiles in a totally revamped config page. When a client connects, the server will pick up a matching profile if any, or use the Default profile (this one can't be removed).
A client is matched to a profile by one or more substrings of its User-Agent http header.
By default there's a few profiles for standard clients that replace the "Presets" of the previous versions. Now it is like if all old presets were all active at the same time.

- chg: server: removed "Presets" as they are not needed anymore with streaming profiles
- new: server: in a profile, ability to set if 5.1 audio should be converted to stereo or not
- chg: server: removed "Allow Seek" and "DLNA" options. They are always enabled.
- fix: server: album art finally working on PS3 for art that is either jpeg or png
- new: server: it is now possible to populate a generated subtree with a subset of the media library using <SubTree query="<search query>">>. For example you could create
a node with only music from 1995 to 2000.
- new: server: added "Compilations" node in the tree (uses the feature above)
- chg: server: stream unsupported XBOX360 formats to lpcm instead of mp3 transcoding in previous version
- new: server: option to use %album artist% instead of %artists% in returned artist names
- fix: server: do not transcode MusePack to mp3 when transcoding configured to lossless only
- fix: server: potentially fixed a crash
- new: renderer: possible to change the renderer network name
- new: ability to set how verbose debug traces in the console are, by editing foo_upnp.xml.
Look for the "level" attribute of the "console_log" tag in conf. "level" values range from 0 (total SPAM) to 7 (only important messages). The default is 4.

- 0.99.9

- chg: integrated newer version of the UPnP framework (Platinum 0.5.1.0)
- new: now the fb2k icon appear in other upnp software when they list the server and the renderer
- fix: controller (regression): was displaying time with milliseconds
- chg: controller: small changes to better support the Renderer of upcoming PlugPlayer 2.3.1 on the iPod touch/iPhone.
- new: server: now possible to customize the media library tree through an xml description file.
- chg: server/renderer: compute uuid differently
- fix: server: stupid crash introduced in 0.99.8 if DLNA enabled in some cases, when computing album art mime type
- fix: server: WAV streaming: ChunkSize in WAV header was off (didn't see any issue because of that but still a bug)
- fix: server: LPCM/WAV streaming: first audio chunk of files without technical info "samplerate" was not streamed
- chg: server: removed "Generate persistent URLs" option. Now stream URLs are always persistent (and shorter) and composed of a hash, instead of including the filename in the item path.
- fix: server: on XBOX360, do not always transcode to mp3
- fix: server: XBOX360 artist names now honors the "Swap The and A prefix" setting.
- fix: server: fix buffering issue on the PS3 causing network errors or skips (thanks Spoon)
- fix: server: fix rare resampler instanciation failure when resample rate = source rate
- fix: server (regression): WMP12 and possibly 11 could not browse anymore

- 0.99.8

- new: support for the Xbox360
- new: attempt at album art streaming support for PS3 (untested).
- fix: use uuid with chars in lower case else the XBOX360 and possibly other hardware won't connect
- fix: obscure crash when receiving SUBSCRIBE requests


0.99.7

- fix (regression): controller: crash when hitting some playback buttons if no renderer selected
- fix: server: some http requests where not returning the correct byte-range which made the iPhone/iPod http streamer confused
- chg: controller: now more resistant to buggy track info/metadata sent by renderers. Shouldn't stop updating if data is bad
- chg: controller: changed the way end of track is detected to advance in playlist so it works with the iPhone Media Renderer, Philips renderers and possibly more units. A consequence of that change
is that hitting stop directly on the remote renderer (if available) will make the controller play next track.

0.99.6

- fix: controller: context menu action "Play on <renderer name>" would only play the first selected track.
- fix: controller: was not automatically starting the Media Server if not started, when playing a local track to a Renderer
- fix: CUI panels: window was not destroyed when panel removed, giving graphical bugs if panel was in a container such as Playlist Tabs or Tab Stack
- fix: CUI panels: crash when destroying panel in some cases
- fix: (regression) server: was not closing http connection on end of transcoded tracks. Controller did not detect end of such tracks because of this, and was not advancing in playlist
- add: server: new option Server/Advanced Settings/Swap "The" and "A" prefix, in artist names. ie if enabled, "The Beatles" => "Beatles, The"


0.99.5

- fix (regression): controller: crash under CUI if removing UPnP Controller panel and adding it back later if a Renderer had been previously listed
- fix (regression): browser: wrongly displayed error message on successful connection to remote foobar2000 server
- fix: browser: attempt to fix a mysterious rare crash when browsing

0.99.4

- fix: crash on startup when running under Wine
- add: server: option in Server/Advanced Settings to split nodes containing a huge (configurable) number of items (albums or artists for example) by A-Z sub nodes. Should be useful to browse 10K albums on a PS3.
- add: server: PlugPlayer (iPhone/iPod Touch) preset
- chg: server: "By genre" subtree now uses %<genre>% instead of %genre% to dispatch genres (Hi TehLink!).
- chg: server: deny file requests on files that are neither in the Media Library or in a playlist. Previously any file could be accessed (only from the LAN) (Hi saivert!)
- chg: do not parse embedded UPnP devices. Seems to be cause a few crashes.
- chg: merge with the latest UPnP SDK

0.99.3

- controller: crash if dragging any item to any playlist if the Controller Playlist is not created
- renderer: return correct track length instead of 0 in certain cases (needed by PlugPlayer otherwise it won't switch to next track)
- server: option to apply foobar2000 ReplayGain settings to streamed audio. When ReplayGain is applied, all files that are not transcoded to mp3 are streamed as PCM (either WAV or LPCM).
- server/renderer: generate a unique persistent server uuid per PC. Needed not to confuse some control points like PlugPlayer (multiple dead server entries accumulating).

0.99.2

- fix: crashes sometimes on remote UPnP devices disappearance when an action was pending
- chg: browser: displayed date from browse info is not appended "-01-01" anymore
- chg: controller: removed "Use Controller Playlist" checkbox. Now the Controller playlist is always active (ie the playback buttons always operate on this playlist). The other mode was not very spec compliant and not very useful.
- chg: controller: can now drag&drop items from the Album List or from Windows Explorer to the Controller playlist.
- chg: controller: The Controller playlist can now be removed at any time, it will be recreated if necessary.
- chg: controller: removed "Use Controller Playlist" checkbox. Now the Controller playlist is always active. The other mode was not very spec compliant and not very useful.
- chg: controller/renderer:Various changes to make the controller and renderer more standard compliant. Should play nice with WMP12 (Windows 7) which can now send items to the foobar2000 Media Renderer for playing and control remote playback (via the "Send To" context menu in WMP). It is also possible to control WMP12 Media Renderer from the UPnP Controller. See this link for a good overview of WMP12 regarding media servers, renderers, controllers (most of it is also a good introduction to the functionality of this plugin). Potentially also works with Vista WMP11 (untested).
- new: Partial support to connect to the Internet Server on the iPhone/iPod touch using PlugPlayer. Still experimental and not very tested.
The manual URL must be entered in PlugPlayer with the following format: http://public_hostname:port/loginpassword. Login and Password must be concatenated without space. Don't use an important login/password.
Issues: this manual WAN server will be replaced by the LAN one when detected on the LAN. Also the WAN server can remain disconnected when relaunching PlugPlayer. This will get sorted when I get an iPoud Touch.

0.99.1

- fix: crash sometimes in Preference/General/Keyboard Shortcuts pages
- fix: crash when trigerring default action (double-click or Enter) on an item in the UPnP Controller Playback Queue, if the UPnP Controller not launched.

0.99.0

- new: new UI Element / Panel, "UPnP Controller": makes foobar2000 an UPnP Control Point able to control any UPnP Media Renderer.
- new: foobar2000 is now an UPnP Media Renderer, allowing remote control with any UPnP Control Point.
- fix: crashes due to dangling pointer
- fix: crashes when multiple foo_upnp Media Servers on the LAN
- fix: browser: now in the UPnP Browser, it is possible to see multiple foo_upnp Media Servers
- fix: browser: set unknown track length if not track length info present in track browse data
- fix: buggy behaviour when replacing the UI Element by a Splitter
- chg: server: if no %discnumber% in track do not send %discnumber% as '?'

0.98.2

- fix: crash on exit with CUI Browser version
- fix: track duration was not set for items transcoded to mp3
- new: new Browser option to use the "sort incoming files by" filter found in foobar's General configuration. Off by default.
- new: %discnumber% is now retrieved at browse time allowing better sorting

0.98.1

+ fix: server: filenames with '+' in path not recognized
+ fix: server: rare crash in the PCM decoder
+ fix: server/browser: removed a few deadlocks that could hang foobar2000.
+ fix: browser: crash when receiving browse data after server disappeared
+ new: browser: implemented remote search (only on foobar UPnP servers running this plugin)

v 0.98

+ fix: server: 5.1 files not correctly transcoded to mp3 due to missing downmix to stereo
+ fix: server: always transcode Musepack to mp3 for "Lossless only" transcode modes (as otherwise Musepack would be streamed as PCM)
+ fix: crash if playing an upnp item if the UI element of CUI panel was not initialized
+ new: server/browser: ability to enter a hostname instead of an IP to configure or connect to an Internet server. Useful for servers on dynamic IP that have a fixed hostname.
+ new: server: artist nodes in "By artist" tree contains all items of that artist
+ new: browser: option so that a node's content can be the aggregated content of all its loaded subnodes ("Show all loaded content under a node" option).

v 0.97

- new: browser: UI Element
- fix: browser: send items to playlist in the order the server returned them
- fix: server: in ML tree, returned album tracks were not sorted by track number (they'd appear in random order on the client if it was not itself reordering by tracknumber)
- fix: server: decode properly URLs that have the query part URL encoded (should fix non MP3/WMA/AAC formats not working on the PCH and possibly other hardware)

v 0.96

+ fix: a failure to connect to remote a foobar2000 server was making all future connect attempts to fail
+ fix: A remote internet foobar2000 server listed in the UPnP Browser tree was automatically removed after 1800 secs
+ add: display a progress popup when connecting to a remote internet server and a proper failure message if connection fails
+ add: added option to enable debug messages in the console, useful to troubleshoot problematic clients (Server/Advanced Settings)
+ some misc polishing

v 0.95

- remote internet access
- transcoding to mp3
- various small fixes.

v 0.94 (beta)

- chg: preferences are splitted on several pages + pref page for the Browser
- add: browser: fetch remote album art (can be disabled in UPnP browser prefs). Work with components using foobar builtin album art interface
- add: browser: preference settings to automatically remove all remote items in all playlists when a server disconnects (off by default).
Useful with server not generating persistent URLs
- add: server: preference settings to generate non-persistent URLs, simpler to parse for some hardware clients (off by default)
- add: server: preference settings to toggle generation of DLNA protocol info, toggle off may be needed for some hardware clients
- chg (cosmetic): round returned track duration to the nearest greatest second, like foobar does.
- fix: server: always stream Musepack files as WAV/LPCM
- fix: server: files with '(' or ')' in path were not playable

v 0.93
- fix (regression): server was not visible to foobar clients anymore
- fix (regression): WMP was not able to play content streamed as WAV anymore
- fix: on foobar shutdown, server byebye was not notified to clients
- add: preset settings for WMP client
- add: server: added option to not allow seeking (used only to stream to WMP for now)

v 0.92
- fix broken directories dragged into a playlist
- do not allow browsing local server anymore

v 0.91

- new: ability to stream all file formats without any conversion to WAV/LPCM (option "stream all files in their orignal format if possible").
Exceptions are tracks with a subsong id (FLAC + CUE for example) which are always streamed as WAV or LPCM.
- new: option to not list the server in the local UPnP browser
- new: button to quick set server settings for use with this client as the browser in another foobar instance
- fix: save config when running under foo_dockable_panels. This will reset conf but it will be preserved in future versions.
- fix: starting the server in the configuration dialog was using the old settings (not the displayed one)
- fix: plugin was slowing down foobar when exiting app
- fix: better handling of merge of metadata+technical info coming from metadb cache, upnp browse info and http decode info.
- fix: server: ability to stream as WAV/LPCM formats that do not define technical info "samplerate" (hello mods and foo_dumb!)
- chg: server: do not expose upnp:// items to clients else it could get funny!

v 0.9

- fix:removed ugly metadb_display_field_provider causing all sorts of problems.
Now remote items use the upnp:// protocol and persists across foobar sessions.
Metadata retrieved at browse time is augmented with real decoder info at decode time.
The same File Operations than the http filesystem are supported: you can copy remote items, however there's a small issue with it (see notes below)
these items will be playable as long as the remote server is running and the urls valid.
- fix: now able to browse and play music from any UPnP media server. Tested with WMP, Nero Media Home.
- fix: don't crash if no resource in a music item
- add: tree browser now configurable for right and left click action on node. Actions are:
send to current playlist, ad to current playlist, send to new playlist, send to UPnP browser playlist, show context menu.
Use right click somewhere not on the tree to configure this behaviour.

v 0.81

- fix: client now able to play audio converted to WAV by the server

v 0.8

- UPnP browser in the form of a Columns UI panel
- server: fix crash when streaming 24bits/96Khz files in certain conditions.

v 0.7

- added option to stream non standard format (ie not MP3, WMA, AAC) as LPCM as well as WAV. It's also possible to stream standard formats as LPCM or WAV
- added option to resample audio to a list of authorized sample rates. useful for the PS3 which supports only 44.1Khz and 48Khz
- streamed audio on the PS3 no longer cuts randomly in the middle of a track
- added button in conf to aumattically set best options for the PS3.

v 0.6

- Compatibility mode for the xbox 360 (untested).
- WMP11 UPnP client (Vista & Windows 7 only) should now be able to see and play audio from the server. Tested only under Windows 7.
- Most streams playable by foobar should now be streamable to UPnP clients.
- Added an option to pass HTTP stream URLs to clients so they direclty decode it (instead of the server acting like a proxy)
- Streamed tracks should no longer stop streaming before the end
- Tracks in cue sheets now work (and all formats using the subsong index). Tested with FLAC with embedded cue sheet
- Support for lossless format other that 44.1Khz/16bits. Tested with a 88.2/24 bit flac.
- Option to convert 24/32 bits lossless audio to 16 bits with optional dithering.
- Generated HTTP URLs are now persistent accross server restarts (as long as the files are not moved/deleted). Useful for clients that caches this information.
- Client playing a non-existent or problematic file should no longer crash foobar
- Ability to configure the HTTP port used for streaming (default is port 56923)
- Modifying options in the preference dialog restarts the server if necessary
- Stability fixes

v0.5

- clients are now exposed to the Media Library in a tree structure similar to the default config of the Album List component
- preference panel under Tools/UPnP Server. Can configure server name, start/stop server, expose playlists, expose Media Library, stream album art.
-some modifications which may make it work with more UPnP/DLNA clients.
- some initial support for streaming HTTP streams to clients

v0.1

- initial version
--pv--
Hello,
Sorry that this is not directly related to this component. It seems to be very nice feature to be able to use foobar 2000 to get my music collection streamed accross my home network. Now the question is the browser will only work with columns UI or so called hosts. I have looked at foo_dockable_pannels briefly and it still requires a lot of mouse activity to use it. Is there a solution so I can got this thing setup without requiring usage of the mouse?
Canar
I get the following error trying to stream FLACs from one foobar2000 to another:

CODE
Decoding failure at 0:00.000 (Reported file length changed):
"http://192.168.1.10:56923/content/file:%2f%2fN:%5cNew%20&%20Unsorted%5cMochipet%20-%202009%20-%20Master%20P%20on%20Atari%5c04-Marshall_Bass_Stack.flac.wav?convert=wav&samplerate=44100"
bubbleguuum
QUOTE (Canar @ Feb 20 2009, 19:36) *
I get the following error trying to stream FLACs from one foobar2000 to another:

CODE
Decoding failure at 0:00.000 (Reported file length changed):
"http://192.168.1.10:56923/content/file:%2f%2fN:%5cNew%20&%20Unsorted%5cMochipet%20-%202009%20-%20Master%20P%20on%20Atari%5c04-Marshall_Bass_Stack.flac.wav?convert=wav&samplerate=44100"


Yup listed in limitations in the original post, as FLAC is streamed as WAV (FLAC is not a standard UPnP AV audio format). If a dev could explain in which case this error (Reported file length changed) happen I'll be able to correct it.
It probably has something to do with the HTTP Content-length header or the audio size in the WAV header but I'm not sure.
bubbleguuum
QUOTE (--pv-- @ Feb 20 2009, 19:32) *
Hello,
Sorry that this is not directly related to this component. It seems to be very nice feature to be able to use foobar 2000 to get my music collection streamed accross my home network. Now the question is the browser will only work with columns UI or so called hosts. I have looked at foo_dockable_pannels briefly and it still requires a lot of mouse activity to use it. Is there a solution so I can got this thing setup without requiring usage of the mouse?


With foo_dockable_panels you just have to create the window panel once, it will be remembered. But it will remain a separate window.
--pv--
I guess you are using somekind of treeview in the pannel. since foo_dockable_panels does not create top level windows I'd still need to click that window using mouse in order to get to interact with the window. or do I missunderstand completelly? For me docking implies something visual and since I am blind I always feel I don't understand it correctly.
Canar
The size of the file that is reported by your HTTP server is changing. The client receives one value at one time and another value at another time. Specifically, look into the size of the file reported when seeking, as that was explicitly mentioned when I asked Peter directly.
Canar
QUOTE (--pv-- @ Feb 20 2009, 11:00) *
I guess you are using somekind of treeview in the pannel. since foo_dockable_panels does not create top level windows I'd still need to click that window using mouse in order to get to interact with the window. or do I missunderstand completelly? For me docking implies something visual and since I am blind I always feel I don't understand it correctly.
That sounds right.

I suspect that the best use case for you is to use Columns UI, though I really don't know how well that supports the accessibility features you depend on.
bubbleguuum
QUOTE (Canar @ Feb 20 2009, 20:14) *
The size of the file that is reported by your HTTP server is changing. The client receives one value at one time and another value at another time. Specifically, look into the size of the file reported when seeking, as that was explicitly mentioned when I asked Peter directly.


Thanks, this is helpful and I have found where the problem is in my code smile.gif
Canar
I eagerly await the bug-fix release. smile.gif
Canar
Another weird bug: Somehow this component interferes with metadata from my Vorbis stream. With the component, I get no artist/title metadata (but oddly a couple other fields like DISCNUMBER). Without it, everything works as expected.
bubbleguuum
QUOTE (Canar @ Feb 21 2009, 00:28) *
Another weird bug: Somehow this component interferes with metadata from my Vorbis stream. With the component, I get no artist/title metadata (but oddly a couple other fields like DISCNUMBER). Without it, everything works as expected.

I'm not too surprised, it is a side effect of the implementation of a custom metadb_display_field_provider that is the cause of this. It processes a few standard fields for display.
I suspect you have one also, and the two interfere.

When the item is not managed by my plugin, my custom metadb_display_field_provider class just call titleformat_hook_impl_file_info::process_field() (see code below) .
Instead it should let foobar call other providers but I don't know if it is possible (returning false in process_field() will just leave the fields unprocessed...).

Btw 0.81 released (first post) now able to play all audio formats smile.gif.

CODE
bool process_field(t_uint32 index, metadb_handle * handle, titleformat_text_out * out) {

        string8 field;
        get_field_name(index, field);

        const file_info *finfo = NULL;

        if(handle->get_info_async_locked(finfo)) {
            const char *codec = finfo->info_get("codec");
            if(codec && strcmp(codec, "PCM") == 0) {
                browser_window::get_instance()->get_file_info(handle, finfo);
            }
        } else {
            browser_window::get_instance()->get_file_info(handle, finfo);
        }

        if(finfo) {
            bool flag;
            titleformat_hook_impl_file_info hook(handle->get_location(), finfo);
            hook.process_field(out, field, field.get_length(), flag);
        }
        return true;
    }
Peter
bubbleguuum, your metadb_display_field_provider use is critically flawed and probably breaks all mid-stream metadata processing for streams that your component isn't handling, please remove it or your component will be put on the list of problematic components. You're falling back to static track information cached in the metadb, which doesn't contain realtime playback information. If you try to hackfix this, you start feeding playback information to callers that don't want it, which is just as bad.

Rant: no matter how clearly documented the API is, people will just happily ignore what the documentation says anyway and then waste other people's time with "component A can't coexist with component B" problems.
bubbleguuum
QUOTE (Peter @ Feb 21 2009, 02:08) *
bubbleguuum, your metadb_display_field_provider use is critically flawed and probably breaks all mid-stream metadata processing for streams that your component isn't handling, please remove it or your component will be put on the list of problematic components. You're falling back to static track information cached in the metadb, which doesn't contain realtime playback information. If you try to hackfix this, you start feeding playback information to callers that don't want it, which is just as bad.

Rant: no matter how clearly documented the API is, people will just happily ignore what the documentation says anyway and then waste other people's time with "component A can't coexist with component B" problems.


I had the feeling this was broken when I coded it to be honest. I posted a message about it in the development forum a few days ago that went unanswered.
I may be wrong but it looks like file_info cannot be written without being written to disk. In that case how should I proceed if metadb_display_field_provider is innapropriate? Oh yes I could present empty items in the playlist and info will be displayed when played, right ?

Rant: no matter how you ask for help in the development forum on some finer point of the SDK, sometimes you get no anwser. And the documentation does not explain all, far from it.
Peter
The exact thing you asked for is inherently incompatible with the 0.9.x metadb design. If there was a simple answer to your question, you'd probably have gotten one.
Can't you simply accept the fact that the foobar2000 architecture was not designed with your exact scenario in mind and stop trying to hack around the limitations?

I can think of one reasonable solution to this situation - it might seem ugly but it avoids all the landmines:
- Don't pass http:// URLs to foobar2000 - obscure them somehow to generate URLs that existing inputs won't attempt to play - eg. upnpstream://<base64-encoded-original-url-string>
- Implement your own input class that plays your streams and invokes other inputs to do the decoding; you have full power over returned metadata so you can return whatever you want and it stays in the metadb. If your metadata changes in mid-stream, use get_dynamic_info() / get_dynamic_info_track() to signal such changes; components displaying real-time playback information will render that information.
- Since the real HTTP URL is obscured, you might want to return it in tech infos or something like that for people who care.
bubbleguuum
QUOTE (Peter @ Feb 21 2009, 02:43) *
The exact thing you asked for is inherently incompatible with the 0.9.x metadb design. If there was a simple answer to your question, you'd probably have gotten one.
Can't you simply accept the fact that the foobar2000 architecture was not designed with your exact scenario in mind and stop trying to hack around the limitations?

I can think of one reasonable solution to this situation - it might seem ugly but it avoids all the landmines:
- Don't pass http:// URLs to foobar2000 - obscure them somehow to generate URLs that existing inputs won't attempt to play - eg. upnpstream://<base64-encoded-original-url-string>
- Implement your own input class that plays your streams and invokes other inputs to do the decoding; you have full power over returned metadata so you can return whatever you want and it stays in the metadb. If your metadata changes in mid-stream, use get_dynamic_info() / get_dynamic_info_track() to signal such changes; components displaying real-time playback information will render that information.
- Since the real HTTP URL is obscured, you might want to return it in tech infos or something like that for people who care.


Thanks for the info, I'll look into it. One last question: using a custom input class will I have control over the metadata (ie file_info) before the user plays anything (ie starts decoding) ?
Peter
Yes, you can implement your own equivalent of tag reading and return any info you want, it will be kept by the metadb and shown in playlist even before the user plays your streams.
Note that you should add items to a playlist using playlist_incoming_item_filter_v2::process_locations_async() or alike, they will fetch metadata from your input class if necessary. Creating metadb_handles yourself and adding them directly may bypass that, so the metadata won't be seen until the stream is played for the first time.
TomBarlow
Hmm this is probably related to the stuff discussed above that I don't understand, but this component seems to break square brackets across foobar- in playlists, the window title etc, e.g. [%tracknumber%] returns '?' instead of nothing as it should... huh.gif
--pv--
I feel nausea is also doing this in his foo_lastfm_radio. At least he has also been asking how to add his own metadata into the files before playing.

Might there be a chance for native default user interface compatible version in the future?
bubbleguuum
QUOTE (--pv-- @ Feb 21 2009, 21:20) *
I feel nausea is also doing this in his foo_lastfm_radio. At least he has also been asking how to add his own metadata into the files before playing.


I'm applying the method described by Peter and it works well, a rerelease of this plugin is not too far smile.gif.

QUOTE
Might there be a chance for native default user interface compatible version in the future?


When the UI Elements SDK will be available this will be possible.
bubbleguuum
v 0.9 (beta) (first post to download)

- fix:removed ugly metadb_display_field_provider hook causing all sorts of problems. Now remote items use the upnp:// protocol and persists across foobar sessions. Metadata retrieved at browse time is augmented with real decoder info at decode time. The same File Operations than the http filesystem are supported: you can copy remote items, however there's a small issue with it (see notes below)
these items will be playable as long as the remote server is running and the urls valid.
- fix: now able to browse and play music from any UPnP media server. Tested with WMP, Nero Media Home.
- fix: don't crash if no resource in a music item
- add: tree browser now configurable for right and left click action on node. Actions are: send to current playlist, add to current playlist, send to new playlist, send to UPnP browser playlist, show context menu. Use right click somewhere not on the tree to configure this behaviour.

Notes:

- WMP takes a long time to show up in the server list, ususally it appears within a few mins
- Nero media home does not appear in list if started after the plugin
- File operation->copy files works (with servers that supports http seeking), but copied files have no extension (had a solution for this but conflicts with something else)
Canar
Thanks for the new version! It works better than the last version. There are still a few bugs to work out though.

  • Playlists do not appear to update without restarting.
  • I can't seem to be able to use it to stream modules at all. I'm using foo_dumb with cyberride by jester to test.
  • When I manually stop the server, it restarts when foobar2000 is restarted. There are a couple places where I want to use foo_upnp strictly as a client and not as a server.
  • Not a bug, but I'd prefer a proper Preferences dialog page to configure the context menu rather than the current "right-click-on-whitespace" method.
bubbleguuum
QUOTE (Canar @ Feb 24 2009, 00:25) *
Thanks for the new version! It works better than the last version. There are still a few bugs to work out though.

  • Playlists do not appear to update without restarting.
  • I can't seem to be able to use it to stream modules at all. I'm using foo_dumb with cyberride by jester to test.
  • When I manually stop the server, it restarts when foobar2000 is restarted. There are a couple places where I want to use foo_upnp strictly as a client and not as a server.
  • Not a bug, but I'd prefer a proper Preferences dialog page to configure the context menu rather than the current "right-click-on-whitespace" method.


1. Remote library changes notifications to the client are not implemented. The UPnP spec says something about that but it's quite complicated to implement and I'm
not sure that many servers implement it. I'll probably have a go at it just for completeness and the challenge smile.gif
In the current version, once a node is loaded it won't change its content.

2. This format do not define the technical info "samplerate" which the transcode to PCM needs. I can work around that but look for direct streaming of the original file format (FLAC, MOD , whatever) in the next version instead.

3. Works here, not suer what happened (can you reproduce it ?)

4. This will probably gets a conf page as there are more things to configure

Canar
Yep. Easily reproduced. I click the "Stop Server" button, it says the server is stopped. I close foobar2000. I re-open foobar2000. The server is running again.
bubbleguuum
QUOTE (Canar @ Feb 24 2009, 01:02) *
Yep. Easily reproduced. I click the "Stop Server" button, it says the server is stopped. I close foobar2000. I re-open foobar2000. The server is running again.


No problem here. Did you remove foo_upnp_mediaserver.dll ?
Canar
Yes.
Kohlrabi
Great plugin, coincidentally I was just looking for a way to access my Album List remotely, keep up the good work. laugh.gif

Just two features I'm hoping for in the future: Is it possible to expand the program to allow streaming of vorbis files/streams? And is the program expandable to allow transcoding non-streamable formats to MP3/AAC/WMA? (maybe using the builtin foobar converter somehow?)
bubbleguuum
QUOTE (Canar @ Feb 24 2009, 01:34) *
Yes.



Got it! configuration is not saved in foo_dockable_panels but is saved when running columns ui. I'm guessing you use the former.
Canar
You got it.
supertramp
bubbleguuum,

I can't seem to get .90 (or earlier versions) working with Roku Soundbridge client(s). Tried transcoding FLAC (WAV and LPCM), and also pulling down MP3 w/o transcoding, but in all cases SB displays "can't play selection" error message. Cycling through each selected file displays the same error.

I have 2 SB's connected to the network. Browsing from the client devices works fine.

Also, .90 doesn't retain settings. Relaunching foobar returns to default settings in all cases.

Any ideas? Anybody else got it working on Roku devices?

bubbleguuum
QUOTE (supertramp @ Feb 24 2009, 05:19) *
bubbleguuum,

I can't seem to get .90 (or earlier versions) working with Roku Soundbridge client(s). Tried transcoding FLAC (WAV and LPCM), and also pulling down MP3 w/o transcoding, but in all cases SB displays "can't play selection" error message. Cycling through each selected file displays the same error.

I have 2 SB's connected to the network. Browsing from the client devices works fine.


These problems are hard to solve without having the actual hardware to test, each device behaving in its own quircky ways...
I'll put up instructions easy to follow (if you're a bit technical) to sniff the HTTP traffic between the device and the plugin.

QUOTE
Also, .90 doesn't retain settings. Relaunching foobar returns to default settings in all cases.


That's only the case when running with foo_dockable_panels. I'll have a fix for this tonight.
Zbih
hi, with foobar 0.9.6.3 beta 2 it doesn't save changes in upnp media server setting, after foobar restart options go back to default

ps. is it possible to add by album sorting in every playlist (not only in media library) on PS3?
supertramp
If you post instructions for sniffing, I'll try to help out. This might help, however: I have another upnp server that works reliably with the Roku. It maintains and displays a list of quirks for various units. Here are some examples:

Roku Soundbridge: skip child count.
Netgear MP101: replace empty genre, include sessionID, filter international characters
Buffalo Linktheater: Include sessionID, allow visual content, filter international characters
DLink DSM-320: Shrink large images, include sessionID, no server header, allow visual content, filter international characters

The other quirks on the list (i.e., not mentioned above) are: use flat URLs, omit host portion of URL, experimental DLNA

Perhaps this will help track down some compatibility issues?

Jorgo
I'm having the same problems as Supertramp with the Popcorn Hour. I see all the pretty lists but can't play any items.
bubbleguuum
I stongly suspect those device to not like the very long URLs the plugin generates. I have another naming scheme that produce way shorter and simpler URL at the expense of them
not to be valid between server restart which is usually no problem when used with such devices. I'll send you a test version if you wish we'll see how it goes.
In the meantime, can you say if your device works with WMP or Nero Media Home as the server ?


EDIT: I remember reading somewhere that the Popcorn Hour only support UPnP for video.
Galova
oh. my dreams come true

thank you very much. I must try it immediatly
bubbleguuum
Many goodies and polishing in this version! (first post to download)

v 0.91

- new: ability to stream all file formats without any conversion to WAV/LPCM (option "stream all files in their orignal format if possible").
Exceptions are tracks with a subsong id (FLAC + CUE for example) which are always streamed as WAV or LPCM.
- new: option to not list the server in the local UPnP browser (by default it is hidden to local browser)
- new: in configuration panel, button to quickly set server settings for use with this plugin as the client
- fix: save config when running under foo_dockable_panels. On first launch this will reset conf but it will be preserved in future versions.
- fix: starting the server in the configuration dialog was using the old settings (not the displayed one)
- fix: plugin was slowing down foobar when exiting app
- fix: better handling of merge of metadata+technical info coming from metadb cache, upnp browse info and http decode info.
- fix: server: ability to stream as WAV/LPCM formats that do not define technical info "samplerate" (hello mods and foo_dumb!)
- chg: server: do not expose upnp:// items to clients else it could get funny!

known issues:

- seeking in FLAC files streamed as FLAC can give random "Unsupported file format" errors
- in pref page, when closing the page and the server is restarted because of a settings change and the server set to be visible in the local UPnP browser,
this will freeze foobar (deadlock). This does not happen when doing start/stop server manually.
saivert
Warning against foo_dockable_panels:
I advise against using foo_dockable_panels to use the UPnP browser panel. If you need this switch to using Columns UI instead (it's not that different from Default UI in functionality and has been improved a lot since it's early days).
foo_dockable_panels uses hacks to get around things in foobar2000 which is prohibited expressively. Also it uses unstable code and it actually caused foo_upnp to lock up and crash.
foo_upnp has enough bugs as it is (no offense) so adding other unstable components to the mix is not the smartest thing you can do.
Until buublegum is allowed access to the UI Elements SDK or it's released for everybody, the only sane way to use the UPnP Browser is by using Columns UI.
This is not meant as an assault on anyone particular. I'm just trying to help out.

And now for a bug report:
- Using foo_upnp to stream files to itself within the same foobar2000 instance crashes foobar2000.
- Multiple issues with the preferences page as long as the UPnP browser panel is visible. Users are advised to only use foo_upnp as a server or a client, but not both at the same time in a single foobar2000 instance.

Also a tip when using Windows Media Player on the client side to test foo_upnp:
Windows Media Player caches media items from UPnP servers so be sure to restart WMP and refresh the list view to get rid of non-working items. I was caught by this issue after wondering why some options in foo_upnp didn't take effect.
Kohlrabi
QUOTE (bubbleguuum @ Feb 25 2009, 23:59) *
v 0.91

- new: ability to stream all file formats without any conversion to WAV/LPCM (option "stream all files in their orignal format if possible").
Exceptions are tracks with a subsong id (FLAC + CUE for example) which are always streamed as WAV or LPCM.


yay! laugh.gif

will try it out later when I'm home.
bubbleguuum
QUOTE (saivert @ Feb 26 2009, 01:28) *
- Using foo_upnp to stream files to itself within the same foobar2000 instance crashes foobar2000.


More details on this ? It does not crash on my PC but I know it could be problematic.
Send the crash backtrace. It'll be useful as there is debug info and I should now where it crashes.

QUOTE
- Multiple issues with the preferences page as long as the UPnP browser panel is visible. Users are advised to only use foo_upnp as a server or a client, but not both at the same time in a single foobar2000 instance.


In my experience there are potential problems only when doing loopback [local server visible to local client] (see above), which is not very useful to end user and that I'll disable in the next version.
bubbleguuum
v 0.92

- fix broken directories dragged into a playlist
- do not allow browsing local server anymore
Jorgo
QUOTE (bubbleguuum @ Feb 25 2009, 21:30) *
I stongly suspect those device to not like the very long URLs the plugin generates. I have another naming scheme that produce way shorter and simpler URL at the expense of them
not to be valid between server restart which is usually no problem when used with such devices. I'll send you a test version if you wish we'll see how it goes.
In the meantime, can you say if your device works with WMP or Nero Media Home as the server ?

EDIT: I remember reading somewhere that the Popcorn Hour only support UPnP for video.


Here's an excerpt from the PCH Wiki. It states that basic UPnP support is available for both video and audio and a list working controllers:
http://www.networkedmediatank.com/wiki/index.php/UPnP


Peter
QUOTE (bubbleguuum @ Feb 26 2009, 20:13) *
- fix broken directories dragged into a playlist
Out of curiosity: how did you break that in first place? We've had components do things like this before, it would be interesting to know how exactly for future reference.
bubbleguuum
QUOTE (Peter @ Feb 27 2009, 12:52) *
QUOTE (bubbleguuum @ Feb 26 2009, 20:13) *
- fix broken directories dragged into a playlist
Out of curiosity: how did you break that in first place? We've had components do things like this before, it would be interesting to know how exactly for future reference.


It is due a misuse of the undocumented filesystem::get_canonical_path() API. My plugin which use a filesystem subclass, was returning true in this function. It happens that in some cases (dropping the directory in a playlist is one of them) foobar core calls this function (from filesystem::g_get_canonical_path()) even if filesystem::is_our_path () or file_system::supports_content_type() returns false.
returning true in filesystem::get_canonical_path() made the core think my filesystem implementation was handling the directory path, hence the bug.
I'm still not sure what the canonical path is, and what its purpose is.
Curiously since services seems to not be initialized in the same order between foobar runs, sometimes my filesystem impl was registered after the legit file:// impl and there was no bug.

I have another question related to opening files. This plugin defines an input_entry subclass as well as a filesystem subclass. The only filesystem subclass purpose is to allow on upnp:// items the same file operations than http, namely copying remote files. The file operation dialog uses the item path to know what is the file extension for the copied file. I don't have any extension in my upnp:// paths so the copied files would be without extension. To overcome this I added the correct extension to my upnp:// path but in that case, when playing an upnp:// item in most case input_entry::open() was called but to my surprise in other cases it was filesystem::open(). In the case filesystem::open() was called it would then turn to later call the open() function of the http input_entry, which obviously don't work. So it seems the behaviour is different if a path has an extension or not. In my case I'd like it to have an extension to make file operations find the extension, but the call to filesystem::open() gets in the way in normal decoding. Any idea or workaround to solve that issue ?
Kohlrabi
I can't see any foobar UPnP servers in the foobar UPnP browser anymore with version 0.92. WMP sees them fine, but crashes when trying to play vorbis (maybe some directshow filter problem), but plays WAV and MP3.

bubbleguuum
QUOTE (Kohlrabi @ Feb 27 2009, 15:03) *
I can't see any foobar UPnP servers in the foobar UPnP browser anymore with version 0.92. WMP sees them fine, but crashes when trying to play vorbis (maybe some directshow filter problem), but plays WAV and MP3.


probably due to a change in the latest versio. I'll check that later today
Peter
QUOTE (bubbleguuum @ Feb 27 2009, 15:02) *
It is due a misuse of the undocumented filesystem::get_canonical_path() API. My plugin which use a filesystem subclass, was returning true in this function. It happens that in some cases (dropping the directory in a playlist is one of them) foobar core calls this function (from filesystem::g_get_canonical_path()) even if filesystem::is_our_path () or file_system::supports_content_type() returns false.
That API indeed isn't properly documented, I'm sorry for that. I wasn't really expecting third party components to try to reimplement it. Thanks for bringing this to my attention though, I will provide better documentation with the next SDK update.
Anyway, get_canonical_path() is called without is_our_path() checks because it has to accept local filesystem paths without the file:// and turn them into proper file:// strings. You should perform checks for the path being something that you recognize on your own (as you can figure out from filesystem::g_get_canonical_path() code).
QUOTE
Curiously since services seems to not be initialized in the same order between foobar runs, sometimes my filesystem impl was registered after the legit file:// impl and there was no bug.
This is by design. Order of services is undefined and randomized on each startup. Otherwise you could end with DLL loading order always giving you the scenario not triggering service order dependency bugs on your system and never notice anything wrong or be unable to reproduce problems reported by users. Some components that were in circulation long ago did exactly that, sometimes even without the author knowing that there was something wrong ("works for me").
QUOTE
I have another question related to opening files. This plugin defines an input_entry subclass as well as a filesystem subclass. The only filesystem subclass purpose is to allow on upnp:// items the same file operations than http, namely copying remote files. The file operation dialog uses the item path to know what is the file extension for the copied file. I don't have any extension in my upnp:// paths so the copied files would be without extension. To overcome this I added the correct extension to my upnp:// path but in that case, when playing an upnp:// item in most case input_entry::open() was called but to my surprise in other cases it was filesystem::open(). In the case filesystem::open() was called it would then turn to later call the open() function of the http input_entry, which obviously don't work. So it seems the behaviour is different if a path has an extension or not. In my case I'd like it to have an extension to make file operations find the extension, but the call to filesystem::open() gets in the way in normal decoding. Any idea or workaround to solve that issue ?
I'm sorry but I can't think of any way to deal with this right now. This is an inherent negative side effect of the custom input trick. I suppose you could provide a custom context menu command to download files instead and get rid of the filesystem service entirely. I'll consider adding some other way for the File Operations component to determine target file extensions.
Galova
Is it possible in upcoming versions to make it possible integrating plugin's UI into built-in user interface (not as a columns_ui panel)?
callisto
already asked:

QUOTE (bubbleguuum @ Feb 21 2009, 22:38) *
QUOTE
Might there be a chance for native default user interface compatible version in the future?


When the UI Elements SDK will be available this will be possible.

Galova
oh, sorry. i must have missed this
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.