INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Auto Change Sample Rate?  (Read 3017 times)

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72534
  • Where did I put my teeth?
Auto Change Sample Rate?
« on: February 23, 2021, 01:24:54 pm »

I'd like to ask your opinion on this.  I have two different machines that can play to more than one device.  Sometimes one may need 48kHz and another will need 44.1kHz. 

Right now, MC will pop up a "Something went wrong with playback" message that tells you how to use DSP Studio > Output Settings to fix the problem.

Matt made a change recently to try to address this in one direction.  It made me think we could do better.

Would it work for you if we just made the change and popped up a 5 second message telling you what we'd done?  That way, playback would work and you'd be notified of the change.
Logged

AndrewFG

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3392
Re: Auto Change Sample Rate?
« Reply #1 on: February 23, 2021, 01:28:56 pm »

Yes. Good idea.

Indeed I think you could do the same with DLNA (e.g. auto convert to L16 ..)
Logged
Author of Whitebear Digital Media Renderer Analyser - http://www.whitebear.ch/dmra.htm
Author of Whitebear - http://www.whitebear.ch/mediaserver.htm

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: Auto Change Sample Rate?
« Reply #2 on: February 23, 2021, 01:46:02 pm »

I don't like that idea for two reasons:

1. The guess MC makes as to what sample rate to use is often bad. For example, when trying to play at 384k (which is not available) it will suggest 96k, instead of 192k (which is available).

2. When MC makes this change, it permanently alters your Output Format settings.  So one bad track while you're not watching the screen, and MC makes a persistent change to your settings and you're not aware.  Then future playback is (wrongly) resampled when it need not be.

I think this "auto fix by default" concept would only be good if it were optional, or only persisted for the current track (meaning the settings would immediately revert and the next unplayable track would throw another warning).
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2674
Re: Auto Change Sample Rate?
« Reply #3 on: February 23, 2021, 02:36:59 pm »

I think it should ask and wait if the user just started a track/playlist (because the user is there), and should automate the change if it finds a problematic track in the middle of "playing now" (user may not be in front of the PC, so it's nice that playback doesn't stop).

I agree with Wer that any change should be temporary and only for the problem track; the next track should again revert to the normal playback settings (unless it also needs a change).

What about adding an info Field to store the [Last Play Info] ? This way the user could view, a posteriori, which tracks had to be converted. It could store the successful play info like "device X, mode Y (resampled)", or errors like "device X, mode Y (failed - unsupported mode)".
Logged

terrym@tassie

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 505
Re: Auto Change Sample Rate?
« Reply #4 on: February 23, 2021, 05:06:01 pm »

YES Jim,

I think a product that exists to play music should by default play the music.

I also agree that it should be agile and only resample a given track where necessary and log the changes.

I would suggest an option in the DSP which defaulted to 'agile resampling' but could be set to enforce strict "Stop playback' if the specified sample rate was not achievable.

Very slightly degraded playback or no playback? I know which I prefer.
Logged
Good manners cost nothing.
Bad manners can cost you your reputation
― B.D.Hawkey

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: Auto Change Sample Rate?
« Reply #5 on: February 23, 2021, 05:18:08 pm »

Except there already IS an option for playback to always succeed by default:

Auto configure output settings on playback error = YES


What this thread seems to be about is whether to add a new option in addition to YES/NO/ASK, or to remove the ASK option and replace it with YES, BUT NOTIFY.

Terry, you already get what you want by setting the existing option to YES.
Logged

AndrewFG

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3392
Re: Auto Change Sample Rate?
« Reply #6 on: February 23, 2021, 05:24:54 pm »

It sounds as though there should be a yes/no/auto setting for this; and IMHO for regular mortal users, the default setting should be auto. As terry said, it should by default play something.
Logged
Author of Whitebear Digital Media Renderer Analyser - http://www.whitebear.ch/dmra.htm
Author of Whitebear - http://www.whitebear.ch/mediaserver.htm

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: Auto Change Sample Rate?
« Reply #7 on: February 23, 2021, 05:37:50 pm »

It does by default play something if the existing setting is set to YES.

So Andrew, what to you is the difference between the existing YES and what you are thinking of as AUTO?
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72534
  • Where did I put my teeth?
Re: Auto Change Sample Rate?
« Reply #8 on: February 23, 2021, 05:54:05 pm »

Very slightly degraded playback or no playback? I know which I prefer.
Exactly.

It does by default play something if the existing setting is set to YES.
Even when you switch to a new device?  On my work machine, the Bluetooth connection requires 48kHz.  The soundbar and PC speakers don't do 48. 

It's a computer.  I don't want to have to think about it.

I'm not opposed to some tinkering with how we do it.  It's why I asked.
Logged

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: Auto Change Sample Rate?
« Reply #9 on: February 23, 2021, 06:06:31 pm »

Then if you want the default to be resampled playback in all cases, just make the default YES.  What's the default now? It's been so long since I've done a fresh installation I don't know.

The point is, don't make ASK work like YES.

I don't care what the default is for new installations or for creating new zones.  What I, and I think others, care about is if we have specified we don't want automatic resampling (which we have specified by selecting ASK) then don't force it on us anyway by making ASK function like YES.
Logged

dtc

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3125
Re: Auto Change Sample Rate?
« Reply #10 on: February 23, 2021, 06:45:16 pm »

Auto configuration on playback error :YES has the unfortunate side effect of changing your DSP settings without telling you.  I tried setting 44.1 KHz to upsample to 176 KHz, which my HDMI does not play. With this option set to YES, MC resamples a 44.1 KHz track  it to 96 KHz and changes my 44.1 KHz setting to No Change.  I would expect 176 KHz to be changed to 192 KHz and if any change is made to DSP Studio for 44.1 KHz, I would expect the new output sample rate (either 96 or 192) to be set in DSP Studio, rather than setting it to No Change.  However, I would prefer that no change be made in DSP Studio without warning me.

So, this option plays the track, but it has unintended consequences and does not tell you what it is doing.   For this to be usable, I think there needs to be some work done on the auto correct options, both in the configuration it chooses and it the way it communicates that to the user.
Logged

terrym@tassie

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 505
Re: Auto Change Sample Rate?
« Reply #11 on: February 23, 2021, 06:47:36 pm »

i wasn't suggesting that ASK work like YES, I was suggesting that the existing Option is located in Playback:Advanced and it would be more logical to have it in the DSP playback section related to sample rate setting.

I also said that the automatic option currently YES should let you know that it has done something not act silently.

I don't know what the default setting is either, like Wer it is a long time since I did a default install.

Logged
Good manners cost nothing.
Bad manners can cost you your reputation
― B.D.Hawkey

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: Auto Change Sample Rate?
« Reply #12 on: February 23, 2021, 07:07:24 pm »

Terry, I'm glad to hear you don't want Ask to work like Yes, but perhaps you misread Jim's post.  You answered "YES, Jim" when what he had proposed was that the MC dialog make the change automatically and then notify you, instead of asking. In effect, making ASK work like YES, by turning it into basically "Yes but notify".  That's what you said Yes to.

DTC, your comments agree exactly with what I said in my first post:
1. MC's guesses are bad
2. It makes permanent changes to output format.

I'm in favor of improving the ASK option, by making the guesses better, but not by turning into something that makes automatic permanent changes. And that is what was proposed.

As I said in my previous post, if ASK is going to be altered to make automatic changes (turning it into Yes) then those changes should be temporary not permanent.
Logged

terrym@tassie

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 505
Re: Auto Change Sample Rate?
« Reply #13 on: February 23, 2021, 07:31:53 pm »

Well I have just run a little test to check Jim's scenario using my Netbook which only supports 48khz playback.

With the DSP set to No change for 44.1khz and the 'AutoConfigure set to 'Yes'

Guess what: Playback does not start, just the 'Playback could not be started' error message.

See attached screenshots.

I would have expected this to work, any thoughts?
Logged
Good manners cost nothing.
Bad manners can cost you your reputation
― B.D.Hawkey

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: Auto Change Sample Rate?
« Reply #14 on: February 23, 2021, 07:45:08 pm »

Sounds like a bug.  I would suggest splitting that off into a different thread.  The setting is zone-specific. I assume you configured the correct zone, and that zoneswitch didn't route playback to a different zone.

But I just tested that with .71 and it worked correctly: When set to YES, it automatically resampled, no dialog box.

The option is supposed to, and by my testing does, work as I described before. YES=Just plays, always.
Logged

terrym@tassie

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 505
Re: Auto Change Sample Rate?
« Reply #15 on: February 23, 2021, 07:52:40 pm »

You assume correct: No zoneswitch active and correct zone configured.

This is the thing I have always seen when connecting single sample rate devices (like bluetooth headphones etc) which is what I assumed Jim was referring to in his post.

Hence wanting a default that plays back and does not error.
Logged
Good manners cost nothing.
Bad manners can cost you your reputation
― B.D.Hawkey

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: Auto Change Sample Rate?
« Reply #16 on: February 23, 2021, 08:06:27 pm »

Understood, but the correct action would be to get the YES option to work properly, not to mangle the ASK option.

YES should (and does for me) do exactly what you want.  The question is why is it broken for you.

I can't replicate your situation exactly, because my sound card is not limited to a single sample rate.
Logged

terrym@tassie

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 505
Re: Auto Change Sample Rate?
« Reply #17 on: February 23, 2021, 09:02:09 pm »

EDIT: This post removed by author (who is a very grumpy old man nursing a broken leg).
Logged
Good manners cost nothing.
Bad manners can cost you your reputation
― B.D.Hawkey

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: Auto Change Sample Rate?
« Reply #18 on: February 23, 2021, 09:38:25 pm »

I actually do have a single sample rate device as it turns out (a headset that I don't use with MC) but I don't think that's relevant as it only supports a 16kHz sample rate that MC can't use at all.  Have you tried it on a multi sample rate device? Or do you not have that experience?

The problem that you have is that the YES option isn't working as intended for you.  The solution to that is not to break the ASK option to turn it into YES.  The solution is to fix the YES option. 

You're substituting your own experience that YES doesn't for for everyone else's it seems.

The YES option seemingly doesn't work for you. So you should wonder why it even exists, if it does nothing.  I would expect Jim to know what YES is supposed to do, so his post is more puzzling.

I'm just advocating that your problem (and Jim's) should be fixed without breaking things for everyone who uses ASK.  That should not be controversial.  You need YES to work, I need ASK to work: there's nothing for us to argue about if we stick to that.



Logged

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: Auto Change Sample Rate?
« Reply #19 on: February 23, 2021, 10:06:44 pm »

Just an FYI, I found an old post where Bob says this option defaults to YES.

Assuming that's still true, MC's default state should be "just play".

So Jim, does that setting just not function for you, as it seems to not work for Terry's device?
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72534
  • Where did I put my teeth?
Re: Auto Change Sample Rate?
« Reply #20 on: February 23, 2021, 10:18:43 pm »

wer,
Let's see what others have to say.  You've made your point, and I take it seriously.
Logged

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: Auto Change Sample Rate?
« Reply #21 on: February 23, 2021, 11:12:52 pm »

That's fine. But does the yes option work for you or not? It would be useful to know if Terry's problem is more widespread.
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42441
  • Shoes gone again!
Re: Auto Change Sample Rate?
« Reply #22 on: February 24, 2021, 03:38:51 am »

You need 27.0.70 (2/19/2021) or newer for the 48 kHz auto-configure.  It hasn't been made public yet.
Logged
Matt Ashland, JRiver Media Center

imeric

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1476
Re: Auto Change Sample Rate?
« Reply #23 on: February 24, 2021, 01:06:46 pm »

i wasn't suggesting that ASK work like YES, I was suggesting that the existing Option is located in Playback:Advanced and it would be more logical to have it in the DSP playback section related to sample rate setting.

I agree this should be elsewhere either as suggested OR under Settings just below DSP & output format.  Under Advanced is not a good place for it.

I was a bit confused at first with the 3 choices (And not sure why Ask and No would be different) but I think it's good the way it is currently working...

Default should be "Ask" IMHO.
Logged

newsposter

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 790
Re: Auto Change Sample Rate?
« Reply #24 on: February 24, 2021, 06:32:03 pm »

Would treating multiple input devices as configurable 'zones' gain any flexibility or rationality?
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72534
  • Where did I put my teeth?
Re: Auto Change Sample Rate?
« Reply #25 on: February 25, 2021, 01:38:57 pm »

Version 2 Automation Proposal:


You're trying to play a 44.1 kHz file on a device that can only play at 48 kHz.  Resample automatically?

[OK Once]  [OK Always]  [Cancel]

You can use DSP Studio > Output Settings to control this.
Logged

tij

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1563
Re: Auto Change Sample Rate?
« Reply #26 on: February 25, 2021, 01:47:41 pm »

Version 2 Automation Proposal:


You're trying to play a 44.1 kHz file on a device that can only play at 48 kHz.  Resample automatically?

[OK Once]  [OK Always]  [Cancel]

You can use DSP Studio > Output Settings to control this.

Maybe provide a dropbox that allows user to choose resampling rate with default value set at MC "best guess"? If MC guessed wrong, one can choose something else.
Logged
HTPC: Win11 Pro, MC: latest 31(64b), NV Driver: v425.31, CPU: i9-12900K, 32GB RAM, GeForce: 2080ti
Screen: LG 2016 E6
NAS: FreeNAS 11.1, SuperMicro SSG-5048R-E1CR36L, E5-1620v4, 64GB ECC RAM, 18xUltrastar He12-SAS3 drives, 2x240GB SSD (OS)

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72534
  • Where did I put my teeth?
Re: Auto Change Sample Rate?
« Reply #27 on: February 25, 2021, 02:00:31 pm »

Maybe provide a dropbox that allows user to choose resampling rate with default value set at MC "best guess"? If MC guessed wrong, one can choose something else.
The user can always take complete control by using DSP Studio.

Logged

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: Auto Change Sample Rate?
« Reply #28 on: February 25, 2021, 02:02:12 pm »

Well, if you're strictly talking about playback to a device that only supports one sample rate (which was not clear in your original post) then it could be even simpler:

Just resample it and play it. There is no other option for playback, other than non-playback. It will be reported in audio path.  On devices that truly only support one sample rate, what is there for MC to discuss or negotiate with the user?  tij mentions that they could chose another sample rate if MC guesses wrong, but not really, because there is only one choice.

It seems to me the complication only comes in if someone is changing the hardware playback device in the current zone. The DSP output format persists with the zone, not the device, so making persistent changes to Output Format screws up your playback if you change the hardware device again.

I wonder if it might be better, or possible, that if the user does go and selects a different playback device in the current zone, MC throws a dialog that asks "You're changing your output device. Would you like to create a new Zone for this new device, using the current zone settings?"  If they say yes, it basically clones the Zone, and then any subsequent output format changes will be confined to the zone for the device.

Isn't it the switching of output devices that causes the issue? Someone who only has one device, and that device only has one sample rate, has no choices to make.  It's multiple devices, or devices with multiple sample rates, that have choices that need to be preserved.
Logged

tij

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1563
Re: Auto Change Sample Rate?
« Reply #29 on: February 25, 2021, 02:34:53 pm »

Lol ... there is no way of making everyone happy

The drop box was a thought to mitigate what you mentioned earlier:

I don't like that idea for two reasons:

1. The guess MC makes as to what sample rate to use is often bad. For example, when trying to play at 384k (which is not available) it will suggest 96k, instead of 192k (which is available).

The user can always take complete control by using DSP Studio.

Yep ... they can ... but it will take several "clicks" to get there ... if user can select his preference for resampling particular frequency to certain value (and MC hopefully remembering that particular mapping when click "OK Always) ... it will make life simpler

Ofcourse this point is mute if device support only one sampling rate.

On general notice ... i think the default should be dont ask ... those ppl who cares about it are quite advance and will dig the way to turn this on

On the other hand ... novice who want to show off during party will be put off when playlist suddenly stop playing and he/she has to run to PC to figure out why.

Logged
HTPC: Win11 Pro, MC: latest 31(64b), NV Driver: v425.31, CPU: i9-12900K, 32GB RAM, GeForce: 2080ti
Screen: LG 2016 E6
NAS: FreeNAS 11.1, SuperMicro SSG-5048R-E1CR36L, E5-1620v4, 64GB ECC RAM, 18xUltrastar He12-SAS3 drives, 2x240GB SSD (OS)

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2674
Re: Auto Change Sample Rate?
« Reply #30 on: February 25, 2021, 02:36:11 pm »

What about a per-Zone setting for:

Action on unsupported track/playback mode:
(X) automatically resample/adjust playback (best effort)
( ) skip to next track (if there's one)
( ) stop playback and display available options (resample/skip/stop)

This way you can still have multiple zones for same device, configured differently.
The "best effort" is what MC already does. It can be improved over time.
Logged

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: Auto Change Sample Rate?
« Reply #31 on: February 25, 2021, 03:09:37 pm »

The drop box was a thought to mitigate what you mentioned earlier:
Yeah, but I was talking then about devices that support multiple sample rates, and now the conversation is about single-sample-rate devices. How can you have a drop box with choices for a device that only supports one sample rate? For multi-rate devices, it's a very good idea. :)

I think Zybex's idea for a Zone-specific setting is a good one.
Logged

terrym@tassie

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 505
Re: Auto Change Sample Rate?
« Reply #32 on: February 25, 2021, 04:29:40 pm »

I also like Zybex's zone specific suggestion.

Logged
Good manners cost nothing.
Bad manners can cost you your reputation
― B.D.Hawkey

Ashfall

  • World Citizen
  • ***
  • Posts: 187
Re: Auto Change Sample Rate?
« Reply #33 on: February 25, 2021, 04:49:41 pm »

As long as there is an option to completely opt-out of this, keeping the behavior as it is now for those of us controlling this with DSP Studio.

In my case, occasionally there is an HDMI handshake issue.  Maybe 1 in every 20 times I power on the system.  When that happens, I just get an error "something went wrong" or something to that effect.  I quickly toggle inputs back and forth to trigger a new HDMI handshake and then everything is fine.  I'd hate to have MC automatically resample instead, having me wonder for a few minutes why something doesn't sound quite right and trying to figure out what happened.
Logged

imeric

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1476
Re: Auto Change Sample Rate?
« Reply #34 on: February 25, 2021, 07:21:13 pm »

What is wrong with the YES NO ASK implemented in .71? To
me that is sufficient...
Based on above I agree default should be YES for newbies but wether a device supports 1-2 or 5 sampling rates doesn’t really matter in the logic. Let’s not mess up with the zones either.

I feel we’re overcomplicating this.  Let’s keep it simple. And if it ain’t broken don’t fix it :-)
Logged

tij

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1563
Re: Auto Change Sample Rate?
« Reply #35 on: February 25, 2021, 10:16:46 pm »

I feel we’re overcomplicating this.  Let’s keep it simple. And if it ain’t broken don’t fix it :-)
You should see options for video frame rate change :)

Off ... Auto ... Manual (list all common frame rates and values they should "resample" to)

Maybe do like video (whether for device or for zone) at least it will be consistent with video setting lol
Logged
HTPC: Win11 Pro, MC: latest 31(64b), NV Driver: v425.31, CPU: i9-12900K, 32GB RAM, GeForce: 2080ti
Screen: LG 2016 E6
NAS: FreeNAS 11.1, SuperMicro SSG-5048R-E1CR36L, E5-1620v4, 64GB ECC RAM, 18xUltrastar He12-SAS3 drives, 2x240GB SSD (OS)
Pages: [1]   Go Up