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
