Jump to content
IGNORED

J River to HQPlayer


Recommended Posts

Wish someone would write a user friendly interface that integrates HQPlayer and JRiver. I'd be happy to pay for one.

 

Keep an eye on the following thread - HQPlayer Linux Desktop and HQPlayer Embedded. So far couple of folks have gotten it working with some minor issues (stopping DSD seems to crackle for 5 seconds or so). It is still early and the version of embedded that is being used is bleeding edge / alpha stage.

Link to comment
Keep an eye on the following thread - HQPlayer Linux Desktop and HQPlayer Embedded. So far couple of folks have gotten it working with some minor issues (stopping DSD seems to crackle for 5 seconds or so). It is still early and the version of embedded that is being used is bleeding edge / alpha stage.

 

Looked at that thread. All sounds too complex for me and appears to require Linux. I'm running Windows.

Link to comment

Just going back to the original simple, windows only, solution, I've managed to add some value to it :)

 

It is now possible to start playback from any desired track in an album. This means that navigation within the same album is possible. When using JRemote playback in HQPlayer should follow what you select for play in JRemote.

 

It will always clear and reload HQPlayer's playlist even when navigating within the same album. Even though this isn't the most efficient method, in practice the response is fast.

 

So if any of you are still using this simple Windows solution you may want to try this version.

 

Now that Ted has started a separate thread for the HQPlayer Embedded/Linux solution perhaps we can just keep this thread for the Windows only simple solution?

 

Thanks to shadowlight for deriving a powershell version from my original .bat script. My new version is a modified version of the powershell script. You will need this as well as my modified version of the .cmd file to make this work.

 

Note I've produced two versions of the ps script. The 'jrexp' version writes to a log file to aid in debugging. If you choose to use this version you will need to alter the path to the log file in the script. The path to hqp-control.exe now corresponds to where HQPlayer currently installs itself on Windows.

 

The three files are here:

https://dl.dropboxusercontent.com/u/86110007/software/JRiver-HQP.zip

 

This new version relies on the track numbers being the first two characters of the file name within the Windows file system. This is usually the case; but if any of your track naming in the file system doesn't correspond to this, playback from anything other than the first track will fail.

 

This method also does not currently take into account multiple discs within a single album where the naming scheme is "1-01" for disk one track one, "2-01" for disc two track one; etc. So only single albums are supported or box sets separated into single albums where the tracks are numbered 01, 02, 03… (If single numbers are used 1,2,3… that should also work) Or box sets which are organised into one big album.

 

Finally if you like playing back playlists from JRiver, this solution won't work for that. It's just album based. For playlists I suggest you export them to a .m3u8 file and load that manually into HQPlayer.

Geoff

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

Link to comment

Geoff,

Thanks for doing this. A couple questions:

1) both versions of ps script look identical (and both have log.text in them). What is the diff; I changed the path to the log file but no log exists so far.

2) although the local (to my server and HQP) JRiver works fine, the JRemote that talks to that JRIver works a bit weirdly. See screenshots. Although the 10CC album was picked, and is indeed loaded into HQPlayer (green highlighted boxes) and playing the correct track, my iPad's JRemote shows a different album in Now Playing (red highlighted boxes) and that album does not show up in any other player picked ( this device or something called Humax RVU Mediarenderer). Furthermore, the 10CC track does not decimate the elapsed time. And moreover, if I were to chose the 2L album in the now playing window and try to play track 4 HQPlayer would load it yet play track 1.

 

Update: I found the 2L album playing in the local JRIver but not in HQPlayer. I removed it. Now, when I pick an album from Jremote it loads in HQPlayer but does not load in JRiver, and therefore does not show in Jremote's Now Playing ("nothing is currently playing" is the message in any JRemote player). The picked album, like 10CC, shows in JRemote but does not activate any play or elapsed time icons, and does not show what song is playing. I have to look at my HQP (through RDC) to see that.

 

comparo.png

Link to comment
Geoff,

Thanks for doing this. A couple questions:

1) both versions of ps script look identical (and both have log.text in them). What is the diff; I changed the path to the log file but no log exists so far.

2) although the local (to my server and HQP) JRiver works fine, the JRemote that talks to that JRIver works a bit weirdly. See screenshots. Although the 10CC album was picked, and is indeed loaded into HQPlayer (green highlighted boxes) and playing the correct track, my iPad's JRemote shows a different album in Now Playing (red highlighted boxes) and that album does not show up in any other player picked ( this device or something called Humax RVU Mediarenderer). Furthermore, the 10CC track does not decimate the elapsed time. And moreover, if I were to chose the 2L album in the now playing window and try to play track 4 HQPlayer would load it yet play track 1.

 

Update: I found the 2L album playing in the local JRIver but not in HQPlayer. I removed it. Now, when I pick an album from Jremote it loads in HQPlayer but does not load in JRiver, and therefore does not show in Jremote's Now Playing ("nothing is currently playing" is the message in any JRemote player). The picked album, like 10CC, shows in JRemote but does not activate any play or elapsed time icons, and does not show what song is playing. I have to look at my HQP (through RDC) to see that.

 

[ATTACH=CONFIG]33815[/ATTACH]

Thanks for your feedback Ted.

 

First of all I checked to make sure I sent both .ps files and they are different.

 

The jrexp.ps1 version will output to a log. You do need to change the .cmd file as well so that it points to this version.

 

jrexp.ps1 should help you in identifying any problems with albums that won't play.

 

As far as jremote and jriver are concerned this tool is behaving as expected.

 

It's purpose is simply to use jremote/jriver to say I want play this album through HQPlayer.

Or I want to play this album starting with whatever track I tap/double-click on in jremote/jriver.

 

jremote can only follow whatever is playing in Jriver and nothing is playing in Jriver. You have handed over to the external command which is "call-jr-ps.cmd" then in turn jr.ps1 or jrexp.ps1 soon as you choose to play an album or start from a track whose file format you've associated with the external custom command.

 

There is a disadvantage to this in that you can't follow HQPlayer's track progress in either jremote or jriver.

 

I also think there's an advantage though, because you are not using the resources on the machine JRiver is running on for JRiver to playback the track.

 

This also means there is no possibility for using the playback controls, Stop/Pause/Fast forward/Rewind/Next/Previous in JRemote or Jriver. Just select the Album or track from the album you want playback to begin from and that's it.

 

If you want to end a listening session just choose the last track from an album (and pick a short one) That track will stay in HQPlayer until the next listening sessions commences.

 

The other constraints are that this tool is relying on the filenames in the file system. Not on the tags that may be set in those files.

 

At the moment this means that track numbers can only be determined by the actual file names and the naming scheme is limited to track number in the format 01 …099

 

Any other file naming schemes will cause the tool to default to playing the entire album beginning with the first track.

 

So the following file naming schemes won't work:

 

1-1 or 1-01, 2-… ;etc. for multi disk sets.

1/, 2/ or 1., 2.; etc.

 

Only music files with the naming scheme beginning with the track number scheme 01 - 099 will work.

 

So there is room for improvement in these respects.

 

Hope it helps!

 

Geoff

jrexp.ps1.zip

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

Link to comment
  • 3 weeks later...

I have re-written this Powershell script from the ground up and now it is far less limited.

 

The main limitation to bear in mind is that there is no support for the playback controls; Stop, Pause, Resume, Next and Previous either from Media Center or J-Remote. Play is instigated from Media Center or J-Remote from whichever track you wish to play. All the tracks from that album are loaded or from the disk the track belongs to in a multi-disc (Box-Set). Then playback begins in HQPlayer from the track chosen for play in Media Center or J-Remote.

 

Full navigation is available by just selecting the track you want to play from the album. The album won’t be re-loaded in HQPlayer if it is already there. HQPlayer will simply play from the new track you just selected in Media Center or J-Remote.

 

As mentioned above multi-disk boxed sets which appear as a single album in Media Center are now supported and in that case only the disk of the current track you’ve chosen to play using Media Center will be loaded in HQPlayer.

 

I tested with a box-set consisting of 1,150 tracks. To work properly this relies on the naming scheme; “1-1 …50-8; etc. to identify it as a multi-disc album.

 

The actual disc number and track number though are supplied by J River itself. It turns out you can send more than one argument to an external app from J River; but this is sent as one string which I’ve comma delimited, so I can break it down when it arrives at my Powershell script.

 

After testing with numerous albums the one problem I encountered was with an album name that contained an ampersand (&). The filename was being cut at the ampersand, so of course, it didn’t work. 

 

I solved this by including a function in the string that’s passed to the external app from j River. The function simply replaces the ampersand with the ampersand preceded with the ‘^’ character. This is the “escape” character for BAT and CMD files.

 

If you come across any albums which don’t play it could be due to another character which causes problems that I haven’t come across in my testing.

 

The distribution includes a log file. Please send me this if you get any errors. If a character causes a problem as the ampersand did, hopefully I’ll also be able to solve it by similarly escaping the offending character in this function.

 

So this is the string that needs to be passed from J River to my Powershell script via the CMD file:

 

"Replace([Filename], &, ^&),[Disc #],[Track #]"

 

You’ll need to browse to the command file within the ‘File Types’ window within J River’s options. It’s the command file ‘CMD’ that J River needs to send the arguments to. When browsing to this CMD file you’ll need to choose ‘All Files(‘*’) within the ‘Select Filename’ dialog, else the CMD file won’t show up.

 

Then enter the above string in the ‘Arguments’ field after choosing ‘External Program (Custom)’ as the ‘Playback Method’

 

You’ll need to repeat this procedure for each of the File Types you wish to be played back by HQPlayer, instead of J River.

 

File types not supported by HQPlayer may now be played through HQPlayer via the creation of temporary files.

 

The temporary files will be created in the same location as the script itself. You can place this script anywhere you wish, including on a RAM Disk. So if you want the temporary files written to the RAM Disk that is where you’ll also want to install this script and all its associated files.

 

The last line in the CMD file is the path of the Powershell script. You will have to edit this to be the path where you have actually installed the script and all its associated files including this CMD file.

 

ffmpeg is used for the creation of the temp files and is included with this distribution. All the files including the ffmpeg folder must be kept in the same structure and relation as you received them in the distribution.

 

Note: For Apple Lossless files to work you will need to associate both ‘ALAC Audio (M4A)’ and ‘AAC Audio (m4a, aac, 3ga)’ to this script. Don’t ask me why. It’s the only way I could get it to work.

 

Finally you may want to edit a couple of lines in the Powershell script; ‘jrexp.ps1’ itself.

 

This will only be necessary if…

 

1/ You’ve installed HQPlayer in a non-standard location. Which means a location other than: ‘"C:\Program Files\Signalyst\HQPlayer Desktop 3\hqp-control.exe"

 

Currently this path is found at line 65.

 

Be careful doing this. Only alter the string within the quotation marks to reflect the correct path, then save the script.

 

2/ You want the temporary files created in a different format from ‘.flac’ (the default).

 

In that case you need to edit the line that reads $tempExt = '.flac' to reflect the format you want the temp files in, e.g. $tempExt = ‘.wav’ and save the script.

 

Obviously it takes a little longer for temp files to load in HQPlayer and for playback to begin, than for files which are in an HQPlayer supported format, which simply need to be loaded from their location in the file system.

 

Any temporary files that were created are deleted when a track from a new album is chosen for playback and replaced (where necessary) by the tracks from that new album.

 

That’s it! I hope some of you manage to get some fun out of this and please let me know if you have any comments/suggestions.

 

The distribution is here:

 

https://dl.dropboxusercontent.com/u/86110007/software/J River to HQPlayer.zip

 

Cheers,

 

Geoff

File Association.JPG

Browse to the cmd file.JPG

Choose the CMD file.JPG

Calling app.JPG

Place to edit path to hqp-control.exe.JPG

Place for editing temp file type.JPG

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

Link to comment

Great work, as always, Geoffrey.

 

Are you saying it now accepts single digit track numbers (and hopefully leading zeros too) ?  I made sure, in MP3, that I had all mine 01, 02, etc.  No big deal.

2 hours ago, Geoffrey Armstrong said:

I tested with a box-set consisting of 1,150 tracks. To work properly this relies on the naming scheme; “1-1 …50-8; etc. to identify it as a multi-disc album.

 

Link to comment

Hi Ted, Yes that's correct, because I'm now getting the track number from J River's tags. So as long as the tags are set correctly the tracks should play.

 

This also has the advantage that wav and any other files can make use of this as they can all have tags within J River.

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

Link to comment

Wow.  I just took a look at the new script and you have put in a lot of effort.  Good job.

 

Does it make more sense to move the hqpctrl and hqpip variables to the top of the script with the other variables that are defined?  Moving them might make it easier for folks to change them instead of potentially messing up the script while trying to update.  Just my 2c :-)

Link to comment
5 hours ago, shadowlight said:

Wow.  I just took a look at the new script and you have put in a lot of effort.  Good job.

 

Does it make more sense to move the hqpctrl and hqpip variables to the top of the script with the other variables that are defined?  Moving them might make it easier for folks to change them instead of potentially messing up the script while trying to update.  Just my 2c :-)

Good idea, thanks and done!

jrexp.ps1

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

Link to comment

When I pick an album from JRemote all is well, at first.  But, if during album playback I pick, say, track 5, then HQplayer will show only track 5.  Is that correct?   IF so, seems like a lot of reloading if I pick, next, say, track 9.

Link to comment
10 hours ago, ted_b said:

When I pick an album from JRemote all is well, at first.  But, if during album playback I pick, say, track 5, then HQplayer will show only track 5.  Is that correct?   IF so, seems like a lot of reloading if I pick, next, say, track 9.

No, that shouldn't be happening. I did find a bug yesterday that could be causing this. Please try this corrected version.

jrexp.ps1

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

Link to comment
  • 2 weeks later...

Geoff,

Amazing stuff, especially taking the time to create a guide! 

 

Two questions and a clarification:

1)  Do you find that using a JRIver instance on any non-HQPlayer machine (i.e somehwere else on your network) is better than "bogging down" the HQplayer machine with JRMC activity, as little as it may be?

2) If one implements filter/mode etc changes from one album to another does HQplayer continue to play or does this require an internal auto-restart (i.e any pops or clicks associated with restarting HQPlayer may be heard)

 

Clarification: I notice that it is not mentioned in the guide, but one should set up JRiver as Media Sever (options -> start up) if one does not want the GUI overheard but still wants JRiver running.

Link to comment
10 hours ago, ted_b said:

Geoff,

Amazing stuff, especially taking the time to create a guide! 

 

Two questions and a clarification:

1)  Do you find that using a JRIver instance on any non-HQPlayer machine (i.e somehwere else on your network) is better than "bogging down" the HQplayer machine with JRMC activity, as little as it may be?

2) If one implements filter/mode etc changes from one album to another does HQplayer continue to play or does this require an internal auto-restart (i.e any pops or clicks associated with restarting HQPlayer may be heard)

 

Clarification: I notice that it is not mentioned in the guide, but one should set up JRiver as Media Sever (options -> start up) if one does not want the GUI overheard but still wants JRiver running.

Thanks Ted,

 

1) I haven't tested with a JRiver instance on another machine. It should work fine because I just load the file names. So as long as they are are valid, it should be ok. Grateful if you could test this. As to whether it's better than "bogging down" the HQPlayer machine with JRMC activity, again since I haven't tested, I can't say if there's really a difference. My feeling is JRMC activity in server mode is negligible. In fact I can't really detect any difference between this and quitting JRMC and just dragging and dropping the files onto HQP. That's on the same machine, of course. I do know that having the network button engaged on HQPlayer Desktop, does seem to have a detrimental effect on SQ, from our tests on the SGM.

 

2) When making filter changes I send the Stop command to HQPlayer first. This should avoid any pops. During development of this I found that you can appear to have made a filter change (HQP shows the new filter), when actually the previous filter is still being used. This happens if you just set the filter without sending Stop first. If I issue the stop command it ensures the new filter is applied, as well as hopefully, avoiding pops.

 

I agree one should set up JRiver as Media Sever to avoid overhead, and will add it to the next version of the guide.

 

I did notice a bug yesterday evening which prevented correct navigation when temporary files are created and loaded into HQP. I've fixed this with the attached version. You only need to replace the main ps1 script to apply this fix.

 

Best,

 

Geoff

 

 

 

 

 

 

 

 

 

change log.txt

jrexp.ps1

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

Link to comment

I made a change to this file with the version I posted on Friday, to enable easy edits of the two file locations without having to edit the powershell script itself. No changes to the file on the last edition posted yesterday.

 

From now on I plan to only release changes to the Powershell script itself, so only that should need to be replaced for new versions.

 

I will probably update the pdf guide for the next release as well.

 

The call-jr-ps.cmd file should look like this:

 

set datapath=%~dp1
set filepath=%~f1
set extension=%~x1
set hqpath=C:\Program Files\Signalyst\HQPlayer Desktop 3\hqp-control.exe
powershell -executionpolicy bypass C:\Users\geoffrey\Downloads\jr-hqp-album\jrexp.ps1

 

Best,

 

Geoff

 

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

Link to comment

I'm getting nothing loaded into HQP.  While watching in RDC (while using ither JRMC or Jremote) the script loads and something happens in the powershell dialog, but then it closes too fast to read. 

 

The log entry (other than stats) is this:

PS>$global:?
True

Link to comment

I went back to "Replace([Filename], &, ^&),[Disc #],[Track #]" instead of the longer argument that creates new fields.  The albums now load.  I don't create temp files nor need HQP filter flexibility from JRiver.  We'll see if this simply works.

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...