Jump to content
IGNORED

JRiver to HQPlayer UPNP support added (limited)


Recommended Posts

My solution for using JRiver as a front-end to HQPlayer described in this thread was described by me as "limited". Then it evolved into something which, I believe, is quite full featured.

 

Now I have added a small enhancement to this DIY script to support feeding JRiver and onto HQPlayer from UPNP servers. Don't get too excited though, because once more I have to add the word "limited" to the title. This is because you are limited to sending just one track at a time. There is no possibility at this time for playback of entire albums or playlists.

 

If you are wiling to play DJ though, it can open up the possibility of sending tracks from any source which can be served from an appropriate UPNP server. This can include Qobuz, Spotify, Tidal, or any other sources the UPNP server in question supports.

 

The limitation is caused by the fact that, once J River has handed the url to HQPlayer using my script, J River no longer knows about the URL, and there is no longer any syncing with the UPNP server.

 

I may not have exhausted all the possibilities though. So partly I'm posting this as a cry for help to see if any of you might have some suggestions as to how we could get a UPNP server to send JRiver each subsequent track in an album or playlist, so that my script can then automatically pass the track's url to HQPlayer.

 

I know this can be done with HQPlayer embedded, since that can be a upnp renderer. That solution is limited to linux only though (or a two box/dual boot, Linux and Windows set-up).

 

So far I have tested my solution with mconnect running on IOS. This works fine, excepting the "single track at a time" limit. The disadvantage is that this doesn't support any higher than 16bit 44.1khz and Qobuz can go higher than that with a Sublime or Sublime + subscription.

 

Then I tested using LMS (Logitech Media Server).

 

LMS allows you to play to multiple players and sync them together. It also supports just about every source out there. It is necessary to install the "UPNP Bridge" plug-in and configure it correctly.

 

For one track at a time only, I was able to get LMS in sync with HQPlayer by sending to both foobar2000 (with the UPNP component installed) and JRiver. I told LMS to keep foobar2000 and JRIver in sync.

 

The track gets sent to both foobar2000 and JRIver at the same time, my script passes it from JRIver to HQPlayer and it plays with HQPlayer. Foobar2000 and LMS playback all kept in sync. JRiver itself, of course isn't actually playing anything.

 

I send foobar2000's output to "Null output", so only HQPlayer is actually playing the track.

 

The problem is that when it comes time for LMS to send the next track from the album or playlist, although it does get sent to foobar2000 and my script gets run, that second url is not delivered to JRiver or HQPlayer. Only foobar2000 gets and plays this second and any other subsequent tracks. I know that using 2 (3 including HQPlayer) players in this way is convoluted. I had hope for it though.

 

If anyone here can find a way of getting it working for subsequent tracks, I'll be very eager to learn about your solution.

 

I'll also be interested in any other solutions that could work with my script. Any other UPNP servers and also BubbleUPNP could be interesting.

 

So I've attached my new version of the script below. Those of you who are already using my JRiver to HQPlayer solution for local files, will only need to replace the main powershell script.

 

If you'll be using it for the first time you'll need the full package, also attached.

 

So anyone who has any feedback/suggestions for this, please let me know. Or if you just want to play DJ with your UPNP server, have fun!

 

https://www.dropbox.com/s/1z6f0l589uhk8ke/jrexp.ps1?dl=0

 

https://www.dropbox.com/s/u9a5bo9p5vcytrz/jr-hqp-album.zip?dl=0

Owner of: Sound Galleries, High-End Audio Dealer, Monaco

Link to comment
1 hour ago, Geoffrey Armstrong said:

I may not have exhausted all the possibilities though. So partly I'm posting this as a cry for help to see if any of you might have some suggestions as to how we could get a UPNP server to send JRiver each subsequent track in an album or playlist, so that my script can then automatically pass the track's url to HQPlayer.

 

Playlists and URL lists are handled by the Control Point. So Renderer has only one item at a time and Control Point monitors when it is complete. Server on the other hand is very dummy "web server", apart from having Content Directory it provides to the Control Point...

 

2 hours ago, Geoffrey Armstrong said:

The problem is that when it comes time for LMS to send the next track from the album or playlist, although it does get sent to foobar2000 and my script gets run, that second url is not delivered to JRiver or HQPlayer. Only foobar2000 gets and plays this second and any other subsequent tracks. I know that using 2 (3 including HQPlayer) players in this way is convoluted. I had hope for it though.

 

This likely happens because JRiver doesn't tell back to the LMS that the track has finished playing...

 

Signalyst - Developer of HQPlayer

Pulse & Fidelity - Software Defined Amplifiers

Link to comment
24 minutes ago, Miska said:

 

Playlists and URL lists are handled by the Control Point. So Renderer has only one item at a time and Control Point monitors when it is complete. Server on the other hand is very dummy "web server", apart from having Content Directory it provides to the Control Point...

 

 

This likely happens because JRiver doesn't tell back to the LMS that the track has finished playing...

 

Thanks Miska. What I was hoping was that because LMS was also in syc with Foobar, and supposedly trying to keep both Foobar and JRiver is sync with each other, it would send the same url to both renderers for the subsequent track. Obviously you're right, though. It must need feedback from each player before it sends the url to each respective player, and it is only getting feedback from Foobar.

 

I'm wondering if Bubble may be a solution here; because I understand Bubble keeps it's own copy of the playlist and knows when to send the renderer the next track. This is supposed to solve the solution where control points would otherwise need to always be powered up; but perhaps the same situation would apply there; i.e. Bubble would also be waiting for that feedback from JRiver, which it would never get.

 

Any chance of a version of embedded for Windows :D

Owner of: Sound Galleries, High-End Audio Dealer, Monaco

Link to comment
4 hours ago, Geoffrey Armstrong said:

I'm wondering if Bubble may be a solution here; because I understand Bubble keeps it's own copy of the playlist and knows when to send the renderer the next track. This is supposed to solve the solution where control points would otherwise need to always be powered up; but perhaps the same situation would apply there; i.e. Bubble would also be waiting for that feedback from JRiver, which it would never get.

 

This is what UPnP Control Point must do anyway, it's the only place holding a playlist...

 

If you are talking about Open Home, not UPnP/DLNA, then yes there is some other entity holding playlist there. In any case feedback from the Renderer is needed.

 

4 hours ago, Geoffrey Armstrong said:

Any chance of a version of embedded for Windows

 

At least I need to complete the Linux version first. And then possibly Mac version. And Windows version depends how much pain and suffering it is, because Windows is not standard compliant with IEEE 1003.1 (aka ISO/IEC 9945) operating system standard, unlike Linux and macOS (to limited extent) are.

 

At the moment I'm very upset about Windows 10, the Fall Creators Update screwed up the registry on my laptop completely so I eventually just threw it out and now it's Ubuntu-only. Out of five Win10 machines I have, two have been screwed up now. The other one cannot do shutdown, it always interrupts shutdown and just returns to login prompt. Luckily it doesn't know yet how to resist pulling the plug... ;)

 

Both macOS and Windows fundamentally lack features I want to use for the Embedded version, so it would be reduced functionality anyway.

 

Signalyst - Developer of HQPlayer

Pulse & Fidelity - Software Defined Amplifiers

Link to comment
3 minutes ago, Miska said:

 

This is what UPnP Control Point must do anyway, it's the only place holding a playlist...

 

If you are talking about Open Home, not UPnP/DLNA, then yes there is some other entity holding playlist there. In any case feedback from the Renderer is needed.

 

 

At least I need to complete the Linux version first. And then possibly Mac version. And Windows version depends how much pain and suffering it is, because Windows is not standard compliant with IEEE 1003.1 (aka ISO/IEC 9945) operating system standard, unlike Linux and macOS (to limited extent) are.

 

At the moment I'm very upset about Windows 10, the Fall Creators Update screwed up the registry on my laptop completely so I eventually just threw it out and now it's Ubuntu-only. Out of five Win10 machines I have, two have been screwed up now. The other one cannot do shutdown, it always interrupts shutdown and just returns to login prompt. Luckily it doesn't know yet how to resist pulling the plug... ;)

 

Both macOS and Windows fundamentally lack features I want to use for the Embedded version, so it would be reduced functionality anyway.

 

It's great to hear there's hope then for embedded to reach all platforms. One of my Win 10 machines got temporarily screwed up as well. On the SGM, of course, we have these updates turned off and review the situation periodically.

 

I noticed that using JRiver or Foobar2000 as UPNP renderers, when I pause in LMS, these renderers also pause; but they don't allow resume. Perhaps it's a setting that needs to be tweaked in LMS.

 

I have no experience of embedded yet. Does it allow all these features:

 

1/ Pause/Resume

2/ Stop

3/ Next Track

4/Previous

 

???

 

Thanks

Owner of: Sound Galleries, High-End Audio Dealer, Monaco

Link to comment
1 minute ago, Geoffrey Armstrong said:

1/ Pause/Resume

2/ Stop

 

Yes, these are renderer side features. And seek, volume control, etc too.

 

2 minutes ago, Geoffrey Armstrong said:

3/ Next Track

4/Previous

 

These are actually Control Point features, it will just send message "here's new URL, start playing it".

 

Signalyst - Developer of HQPlayer

Pulse & Fidelity - Software Defined Amplifiers

Link to comment
56 minutes ago, Miska said:

 

Yes, these are renderer side features. And seek, volume control, etc too.

 

 

These are actually Control Point features, it will just send message "here's new URL, start playing it".

 

Thanks. You know I think the most Kudos for this working to the degree that it does should go to Philippe44 on SB forum; author of UPNP/Bridge.

 

The only chance for it to work better and allow subsequent tracks to be auto loaded is if he could add another option to UPNP/Bridge. This option when selected, would cause each subsequent track in an album or playlist to be treated as a first request for playback of this album or playlist. In other words; as though the user had stopped playback and started again from this new track.

 

It could be viewed as an option to use for renderers whose communication with LMS gets interrupted. It would "wake up" the renderer again and tell it to start playing this next track.

 

On the face of it that doesn't sound too difficult; but I know from experience, that until you really get into the code, you don't know how much of a challenge it would be.

 

It probably wouldn't be perfectly gapless; but that seems to be a common problem with UPNP.  At least it would allow automatic progress through albums and playlists, without having to hit the "next" button manually.

 

So if anyone's in contact with Philippe44 or if you're active on this forum, Philippe, please give this your consideration.

 

I'll send Philippe a message with this request anyway.

 

If hqp embedded does become available for Windows one day, or UPNP renderer capability added to HQP Desktop, this will be a non issue, of course.

Owner of: Sound Galleries, High-End Audio Dealer, Monaco

Link to comment

Geoffrey,

Let me know if you need any help in setting up embedded version.  I currently have JRiver as front end controlled by eos remote running on Android tablet for couple of months.  Link to the guide on page 13 in the embedded thread.  Sorry, I cannot seem to figure out how to quote specific post from one thread and use it another.  If it makes it easier I can created and image file also.

 

 

Link to comment
On 11/16/2017 at 10:30 AM, Geoffrey Armstrong said:

3/ Next Track

4/Previous

 

On 11/16/2017 at 10:33 AM, Miska said:

These are actually Control Point features, it will just send message "here's new URL, start playing it".

 

If the control point must wait until one track ends before telling the renderer to play the next track, how can you achieve gapless playback?

HQPlayer (on 3.8 GHz 8-core i7 iMac 2020) > NAA (on 2012 Mac Mini i7) > RME ADI-2 v2 > Benchmark AHB-2 > Thiel 3.7

Link to comment
1 hour ago, Bob Stern said:

If the control point must wait until one track ends before telling the renderer to play the next track, how can you achieve gapless playback?

 

For that purpose UPnP has method called SetNextTransportURI so that the next URI can be queued up before the previous one finishes. Then the transition happens automatically.

 

HQPlayer can be gapless for both cases though.

 

For those Next/Previous cases Control Point doesn't wait for the previous track finishes, it just sends a new URI that will begin playing immediately.

Signalyst - Developer of HQPlayer

Pulse & Fidelity - Software Defined Amplifiers

Link to comment
4 hours ago, Geoffrey Armstrong said:

This is probably a completely dumb question; but would it be feasible to add UPNP renderer capability to HQPlayer Desktop? …and if so, would that be easier than developing HQPEmbedded for Windows?

 

It is harder. At the moment, if I would make HQPlayer Embedded for Windows, it wouldn't work as UPnP Renderer. Only most of the other functionalities. This is largely because Windows is not standards compliant OS, so it requires double work in lot of areas.

 

If someone wants to take on it, it could be done with the current control API...

 

P.S. And Microsoft is doing it's best to demotivate me to do things on Windows by screwing up Win10 in various ways.

 

Signalyst - Developer of HQPlayer

Pulse & Fidelity - Software Defined Amplifiers

Link to comment

Ok, I understand. So those limitations make upnp functionality impossible at the moment on Windows.

 

If there’s a way to make LMS UPNP bridge talk to HQP on Windows using the control API, without having to go through an interim app, such as JRiver, I’m definitely interested. Would you mind PM-ing or emailing me some basic guidelines?

 

 

Owner of: Sound Galleries, High-End Audio Dealer, Monaco

Link to comment
24 minutes ago, Geoffrey Armstrong said:

Ok, I understand. So those limitations make upnp functionality impossible at the moment on Windows.

 

Yes, building and running Rygel on Windows especially with MPRIS plugin which requires D-Bus is painful.

 

But there's one way that could work. It could be now possible to limited extent run HQPlayer Embedded on WSL, but since it doesn't support audio (or graphics) devices yet (if ever), you'd need to run networkaudiod at Windows side to make it work. Both can be on the same machine simultaneously.

 

If someone wants to try it out, I'm curious to hear the results! Since WSL is under heavy development, just make sure you are at least on Fall Creators Update before trying! Mine, or @shadowlight's scripts could be useful as starting point for setting up starting of D-Bus session bus, Rygel and HQPlayer.

 

When I have time, I may try it out myself.

 

34 minutes ago, Geoffrey Armstrong said:

If there’s a way to make LMS UPNP bridge talk to HQP on Windows using the control API, without having to go through an interim app, such as JRiver, I’m definitely interested. Would you mind PM-ing or emailing me some basic guidelines?

 

I have to say I have completely no idea about LMS, I've never touched it so I'm unable to give any guidance regarding it.

 

Signalyst - Developer of HQPlayer

Pulse & Fidelity - Software Defined Amplifiers

Link to comment

What I've tested on other things, performance of WSL is pretty good because the way it is implemented - Linux kernel system calls implemented as a native Windows kernel module/driver so it can run actual Linux on top of Windows kernel without expensive emulation layer or virtual machine (kernel-on-kernel).

Signalyst - Developer of HQPlayer

Pulse & Fidelity - Software Defined Amplifiers

Link to comment

That's a really interesting idea. I'll also try to find time to test it.

 

I understand you don't have specific knowledge of LMS; but just for my better understanding of HQPEmbedded; if you have a UPNP server app, any UPNP server, and HQPEmbedded is used as the renderer, does there need to be anything else running in between the UPNP server and HQPEmbedded?

 

Assuming the UPNP server has some kind of web-interface or app to choose music, control playback; etc. would there still be a need to make use of HQPControl type calls?

Owner of: Sound Galleries, High-End Audio Dealer, Monaco

Link to comment

I've managed to improve on this solution. My mistake was to be sending Foobar2000's output to Null, when what I needed to do was send it to JRMC and have JRMC output to Null.

 

It's complicated to explain; but it does work with still a few limitations/caveats.

 

I've written a guide for any of you who're intrepid enough to give this solution a go.

 

The ideal solution, I believe,  would be if we can find a way to run HQPEmbedded under windows and/or develop a new solution.

LMS to HQPlayer.pdf

Owner of: Sound Galleries, High-End Audio Dealer, Monaco

Link to comment
10 hours ago, Geoffrey Armstrong said:

I understand you don't have specific knowledge of LMS; but just for my better understanding of HQPEmbedded; if you have a UPNP server app, any UPNP server, and HQPEmbedded is used as the renderer, does there need to be anything else running in between the UPNP server and HQPEmbedded?

 

Assuming the UPNP server has some kind of web-interface or app to choose music, control playback; etc. would there still be a need to make use of HQPControl type calls?

 

UPnP needs three things, Media Server, Control Point and Renderer. HQPlayer Embedded works together with Rygel which can be either or both Media Server and Renderer. You still need a Control Point.

 

My typical setup consists of MinimServer (because it supports also DSF files), Bubble UPnP App (on Android, as Control Point), and HQPlayer Embedded + Rygel.

 

Sometimes there may be also Media Server and Control Point combinations, like the Bubble UPnP App can be (it can also work as local Renderer).

 

As long as these three ingredients exist, things should work.

 

Signalyst - Developer of HQPlayer

Pulse & Fidelity - Software Defined Amplifiers

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...