Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for higher audio sample rates. #659

Open
bradleysepos opened this Issue Mar 26, 2017 · 4 comments

Comments

2 participants
@bradleysepos
Copy link
Member

commented Mar 26, 2017

88.2/96/176.4/192 kHz encoding/passthrough. See also #483.

This will need some special care, as many devices do not support sample rates higher than 48 kHz. I have some ideas for this but time not permitting, for now this placeholder will have to suffice.

@bradleysepos bradleysepos added this to the Unscheduled milestone Mar 26, 2017

@bradleysepos bradleysepos self-assigned this Mar 26, 2017

@bradleysepos bradleysepos modified the milestones: 1.2.0, Unscheduled Jun 6, 2017

@bradleysepos

This comment has been minimized.

Copy link
Member Author

commented Jun 6, 2017

Targeting for 1.2.0.

Here are the device/playback scenarios I'm envisioning we may need to support in one way or another:

  • Support for 44.1/48 kHz only. We should transcode to one or the other based on the input (e.g. 11.025/22.05 kHz to 44.1 kHz; 8/16/24/32 to 48 kHz. This mode could possibly be the default, as it's very similar to what we do now and is the most compatible.
  • Support for all standard sample rates up to 48 kHz. There is some risk that a non-standard or sufficiently unpopular sample rate may not be supported on some devices. I'm not terribly concerned about this, as it's an edge case (never even seen it) that can be worked around with custom presets.
  • Support for 44.1/48 kHz for the first, more compatible track, and support for higher sample rates for supplementary tracks. Continuing with paradigm of the first track is stereo at limited bit rate, second track is surround or similar.
  • Support for higher sample rates for all tracks.

Making matters more interesting, some devices do not support only certain higher sample rates, such as 176.4 kHz.

What we need is a concise set of controls on the audio defaults sheet:

  1. Convert sample rates less than 48 kHz to: (radio/select)
    (o) 44.1/48 kHz (Auto)
    ( ) 48 kHz
    ( ) Do not convert
  2. Allow HD sample rates: (checkbox)
    [x] 88.2 kHz [x] 96 kHz [ ] 176.4 kHz [x] 192 kHz
  3. _[x] Limit first encoder for each selected track to 48 kHz (checkbox)

handbrake-hd-audio

It's not perfect, but I believe it covers the a high percentage of what people will want, and it fits into the existing paradigm and controls. I'm certainly open to feedback and discussion.

@bradleysepos

This comment has been minimized.

Copy link
Member Author

commented Jun 6, 2017

I failed to mention, we could theoretically remove the Samplerate column entirely. But it's probably better to keep it, populated with a selection based on what the other controls make available. This gives the maximum flexibility so the user can select options outside of what these rules provide for.

@bradleysepos

This comment has been minimized.

Copy link
Member Author

commented Jun 6, 2017

Another thing that came up in conversation with a friend: enabling "Limit first encoder for each selected track to 48 kHz" should guarantee a compatible audio track, especially when combined with "Convert sample rates less than 48 kHz (to 44.1/48)". These options should probably be default in the official presets.

I just realized the irony of how this looks given I was and am against the Opus codec's initial enforcement of converting all input to 48 kHz. But I'm not advocating that at all; I'm advocating options to limit sample rate to 48 kHz for compatibility, and to upsample lesser rates to either 44.1 or 48 kHz for compatibility. This is similar to what even an inexpensive non-oversampling DAC with dual crystal oscillators does, and matching this behavior is superior to Opus' method when using one.

@bradleysepos

This comment has been minimized.

Copy link
Member Author

commented Jun 7, 2017

Second comp. This integrates some feedback and also shows what the default settings should be.

handbrake-hd-audio2

@sr55 sr55 modified the milestones: 1.2.0, 1.3.0 Oct 3, 2018

@sr55 sr55 modified the milestones: 1.3.0, Unscheduled Jan 1, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.