Preset audio sample rate reverts to 48 kHz

HandBrake for Windows support
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
andrewk89
Novice
Posts: 65
Joined: Thu Jun 13, 2013 4:29 pm

Preset audio sample rate reverts to 48 kHz

Post by andrewk89 »

Description of problem or question:
I created a custom preset that I use as my default. The audio uses self-compiled HE-AAC, 64 kbps bitrate, Auto sample rate. I noticed the encoded videos were using 48 kHz sample rate regardless of the source.

For the default preset, after creating it, Auto sample rate is preserved on new encodes within the current HB session. But if you exit HB and launch it again, the audio sample rate reverts to 48 kHz. All other default preset settings are correct.

Steps to reproduce the problem (If Applicable):
  • Add a video
  • Click Add a new preset
  • Edit Defaults for Audio
  • Set Sample Rate as Auto
  • Save preset
  • set Default on new preset
  • Exit HB
  • Launch HB
  • Add a video
  • Observe that the audio samplerate is "48", not "Auto" per the preset settings
HandBrake version (e.g., 1.0.0):
1.1.1 (2018061900)

Operating system and version (e.g., Ubuntu 16.04 LTS, macOS 10.13 High Sierra, Windows 10 Creators Update):
Win 10 Spring 2018

HandBrake Activity Log ***required*** (see How-to get an activity log)

Code: Select all

HandBrake 1.1.1 (2018061900) - 64bit
OS: Microsoft Windows NT 10.0.17134.0 - 64bit
CPU: Intel(R) Core(TM) i5-3350P CPU @ 3.10GHz
Ram: 8149 MB, 
GPU Information:
  NVIDIA GeForce GTX 650 Ti - 24.21.13.9836
Screen: 1920x1080
Temp Dir: d:\Users\Andrew\AppData\Local\Temp\
Install Dir: C:\Program Files\HandBrake
Data Dir: d:\Users\Andrew\AppData\Roaming\HandBrake Team\HandBrake\1.1.1.0

-------------------------------------------

[14:45:21] hb_init: starting libhb thread

 # Starting Scan ...

[14:45:21] CPU: Intel(R) Core(TM) i5-3350P CPU @ 3.10GHz
[14:45:21]  - Intel microarchitecture Ivy Bridge
[14:45:21]  - logical processor count: 4
[14:45:21] Intel Quick Sync Video support: no
[14:45:21] hb_scan: path=D:\nope.mp4, title_index=0
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:323: failed opening UDF image D:\nope.mp4
src/libbluray/disc/disc.c:424: error opening file BDMV\index.bdmv
src/libbluray/disc/disc.c:424: error opening file BDMV\BACKUP\index.bdmv
[14:45:21] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 5.0.3
libdvdread: Encrypted DVD support unavailable.
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: failed to read VIDEO_TS.IFO
[14:45:21] dvd: not a dvd - trying as a stream/file instead
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'D:\nope.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf57.40.101
  Duration: 00:33:08.53, start: 0.000000, bitrate: 1395 kb/s
    Stream #0:0(und): Video: h264 (Main) [avc1 / 0x31637661]
      yuv420p, 640x360 [PAR 1:1 DAR 16:9], 1228 kb/s
      29.97 fps, 30k tbn (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) [mp4a / 0x6134706D]
      44100 Hz, stereo, fltp, 160 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
[14:45:21] scan: decoding previews for title 1
[14:45:21] scan: audio 0x1: aac, rate=44100Hz, bitrate=160000 Unknown (AAC) (2.0 ch)
[14:45:21] scan: 10 previews, 640x360, 29.970 fps, autocrop = 0/2/0/0, aspect 16:9, PAR 1:1
[14:45:21] scan: supported video decoders: avcodec qsv
[14:45:21] libhb: scan thread found 1 valid title(s)

 # Processing Scan Information ...


 # Scan Finished ...
andrewk89
Novice
Posts: 65
Joined: Thu Jun 13, 2013 4:29 pm

Re: Preset audio sample rate reverts to 48 kHz

Post by andrewk89 »

For clarification, here are some screen shots:
expected audio settings (sample rate when I created the preset): https://imgur.com/cBm21UZ
actual audio settings from preset: https://imgur.com/jyUgFGr
User avatar
s55
HandBrake Team
Posts: 10350
Joined: Sun Dec 24, 2006 1:05 pm

Re: Preset audio sample rate reverts to 48 kHz

Post by s55 »

I'll take a look at it tomorrow to see if I can reproduce.
andrewk89
Novice
Posts: 65
Joined: Thu Jun 13, 2013 4:29 pm

Re: Preset audio sample rate reverts to 48 kHz

Post by andrewk89 »

EDIT: FYI, still broken 1.1.2. Same behavior as before.
Preset maintains audio Auto sample rate within the session in which it was created. Exit HB. Reverts to 48 kHz sample rate for that preset after launching again.
Deleted Custom presets and re-created. Same issue.
andrewk89
Novice
Posts: 65
Joined: Thu Jun 13, 2013 4:29 pm

Re: Preset audio sample rate reverts to 48 kHz

Post by andrewk89 »

Here is what is getting saved in presets.json. Note that "AudioSamplerate": "auto" is being stored. Recall that "auto" is being respected during the session in which the preset is saved. Just not in the next session.

Code: Select all

"ChildrenArray": [
        {
          "AlignAVStart": false,
          "AudioCopyMask": [
            "copy:aac",
            "copy:ac3",
            "copy:dtshd",
            "copy:dts",
            "copy:mp3",
            "copy:truehd",
            "copy:flac",
            "copy:eac3"
          ],
          "AudioEncoderFallback": "fdk_haac",
          "AudioLanguageList": [],
          "AudioList": [
            {
              "AudioBitrate": 64,
              "AudioCompressionLevel": 0.0,
              "AudioDitherMethod": null,
              "AudioEncoder": "fdk_haac",
              "AudioMixdown": "stereo",
              "AudioNormalizeMixLevel": false,
              "AudioSamplerate": "auto",
              "AudioTrackQualityEnable": false,
              "AudioTrackQuality": -1.0,
              "AudioTrackGainSlider": 0.0,
              "AudioTrackDRCSlider": 0.0
            }
          ],
          "AudioSecondaryEncoderMode": true,
          "AudioTrackSelectionBehavior": "first",
          "ChapterMarkers": true,
          "ChildrenArray": [],
          "Default": true,
          "FileFormat": "av_mp4",
          "Folder": false,
          "FolderOpen": false,
          "Mp4HttpOptimize": false,
          "Mp4iPodCompatible": false,
          "PictureAutoCrop": true,
          "PictureBottomCrop": 0,
          "PictureLeftCrop": 0,
          "PictureRightCrop": 0,
          "PictureTopCrop": 0,
          "PictureDARWidth": 853,
          "PictureDeblock": 4,
          "PictureDeinterlaceFilter": "decomb",
          "PictureCombDetectPreset": "default",
          "PictureCombDetectCustom": null,
          "PictureDeinterlacePreset": "default",
          "PictureDeinterlaceCustom": null,
          "PictureDenoiseCustom": "",
          "PictureDenoiseFilter": "nlmeans",
          "PictureDenoisePreset": "medium",
          "PictureDenoiseTune": "film",
          "PictureSharpenCustom": "",
          "PictureSharpenFilter": "off",
          "PictureSharpenPreset": "medium",
          "PictureSharpenTune": "none",
          "PictureDetelecine": "off",
          "PictureDetelecineCustom": "",
          "PictureItuPAR": false,
          "PictureKeepRatio": true,
          "PictureLooseCrop": false,
          "PictureModulus": 16,
          "PicturePAR": "loose",
          "PicturePARWidth": 160,
          "PicturePARHeight": 159,
          "PictureRotate": "0:0",
          "PictureWidth": 1920,
          "PictureHeight": 480,
          "PictureForceHeight": 0,
          "PictureForceWidth": 0,
          "PresetDescription": null,
          "PresetName": "Andrew HEVC",
          "Type": 1,
          "UsesPictureFilters": false,
          "UsesPictureSettings": 1,
          "SubtitleAddCC": false,
          "SubtitleAddForeignAudioSearch": false,
          "SubtitleAddForeignAudioSubtitle": false,
          "SubtitleBurnBehavior": "foreign",
          "SubtitleBurnBDSub": false,
          "SubtitleBurnDVDSub": false,
          "SubtitleLanguageList": [],
          "SubtitleTrackSelectionBehavior": "none",
          "VideoAvgBitrate": 0,
          "VideoColorMatrixCode": 0,
          "VideoEncoder": "x265",
          "VideoFramerate": null,
          "VideoFramerateMode": "vfr",
          "VideoGrayScale": false,
          "VideoHWDecode": false,
          "VideoScaler": "swscale",
          "VideoPreset": "medium",
          "VideoTune": "",
          "VideoProfile": "auto",
          "VideoLevel": "auto",
          "VideoOptionExtra": "",
          "VideoQualityType": 2,
          "VideoQualitySlider": 23.0,
          "VideoQSVDecode": false,
          "VideoQSVAsyncDepth": 4,
          "VideoTwoPass": true,
          "VideoTurboTwoPass": true,
          "x264Option": "",
          "x264UseAdvancedOptions": false
        },
        {
          "AlignAVStart": false,
          "AudioCopyMask": [
            "copy:aac",
            "copy:ac3",
            "copy:dtshd",
            "copy:dts",
            "copy:mp3",
            "copy:truehd",
            "copy:flac",
            "copy:eac3"
          ],
          "AudioEncoderFallback": "fdk_haac",
          "AudioLanguageList": [],
          "AudioList": [
            {
              "AudioBitrate": 64,
              "AudioCompressionLevel": 0.0,
              "AudioDitherMethod": null,
              "AudioEncoder": "fdk_haac",
              "AudioMixdown": "stereo",
              "AudioNormalizeMixLevel": false,
              "AudioSamplerate": "auto",
              "AudioTrackQualityEnable": false,
              "AudioTrackQuality": -1.0,
              "AudioTrackGainSlider": 0.0,
              "AudioTrackDRCSlider": 0.0
            }
          ],
          "AudioSecondaryEncoderMode": true,
          "AudioTrackSelectionBehavior": "first",
          "ChapterMarkers": true,
          "ChildrenArray": [],
          "Default": false,
          "FileFormat": "av_mp4",
          "Folder": false,
          "FolderOpen": false,
          "Mp4HttpOptimize": false,
          "Mp4iPodCompatible": false,
          "PictureAutoCrop": true,
          "PictureBottomCrop": 0,
          "PictureLeftCrop": 0,
          "PictureRightCrop": 0,
          "PictureTopCrop": 0,
          "PictureDARWidth": 270,
          "PictureDeblock": 4,
          "PictureDeinterlaceFilter": "decomb",
          "PictureCombDetectPreset": "default",
          "PictureCombDetectCustom": null,
          "PictureDeinterlacePreset": "default",
          "PictureDeinterlaceCustom": null,
          "PictureDenoiseCustom": "",
          "PictureDenoiseFilter": "nlmeans",
          "PictureDenoisePreset": "medium",
          "PictureDenoiseTune": "film",
          "PictureSharpenCustom": "",
          "PictureSharpenFilter": "off",
          "PictureSharpenPreset": "",
          "PictureSharpenTune": "",
          "PictureDetelecine": "off",
          "PictureDetelecineCustom": "",
          "PictureItuPAR": false,
          "PictureKeepRatio": true,
          "PictureLooseCrop": false,
          "PictureModulus": 16,
          "PicturePAR": "loose",
          "PicturePARWidth": 135,
          "PicturePARHeight": 136,
          "PictureRotate": "0:0",
          "PictureWidth": 1920,
          "PictureHeight": 720,
          "PictureForceHeight": 0,
          "PictureForceWidth": 0,
          "PresetDescription": null,
          "PresetName": "Andrew HEVC 720",
          "Type": 1,
          "UsesPictureFilters": false,
          "UsesPictureSettings": 1,
          "SubtitleAddCC": false,
          "SubtitleAddForeignAudioSearch": false,
          "SubtitleAddForeignAudioSubtitle": false,
          "SubtitleBurnBehavior": "foreign",
          "SubtitleBurnBDSub": false,
          "SubtitleBurnDVDSub": false,
          "SubtitleLanguageList": [],
          "SubtitleTrackSelectionBehavior": "none",
          "VideoAvgBitrate": 0,
          "VideoColorMatrixCode": 0,
          "VideoEncoder": "x265",
          "VideoFramerate": null,
          "VideoFramerateMode": "vfr",
          "VideoGrayScale": false,
          "VideoHWDecode": false,
          "VideoScaler": "swscale",
          "VideoPreset": "medium",
          "VideoTune": "",
          "VideoProfile": "auto",
          "VideoLevel": "auto",
          "VideoOptionExtra": "",
          "VideoQualityType": 2,
          "VideoQualitySlider": 23.0,
          "VideoQSVDecode": false,
          "VideoQSVAsyncDepth": 4,
          "VideoTwoPass": true,
          "VideoTurboTwoPass": true,
          "x264Option": "",
          "x264UseAdvancedOptions": false
        }
      ],
      "Folder": true,
      "PresetName": "Custom Presets",
      "PresetDescription": null,
      "Type": 1
    },
anidealworld2
New User
Posts: 2
Joined: Mon Oct 01, 2018 3:08 pm

Re: Preset audio sample rate reverts to 48 kHz

Post by anidealworld2 »

This has been an issue for as long as I can remember with Handbrake. There was actually one version at one point where it would save the audio preset values but now it's back to not saving.

In my case I want the bitrate 256 instead of 160 (I mean, really you want 1080p with 160kb audio??? :shock: but I digress...)

The solution seems to be to create your preset, export it, edit the audio settings with notepad, then re-import it. I just did that with a reinstall and it worked. Beats trying to remember to change it every time.
anidealworld2
New User
Posts: 2
Joined: Mon Oct 01, 2018 3:08 pm

Re: Preset audio sample rate reverts to 48 kHz

Post by anidealworld2 »

My apologies - my "fix" I just posted wouldn't seem to work for your issue since it is already in the preset.
User avatar
s55
HandBrake Team
Posts: 10350
Joined: Sun Dec 24, 2006 1:05 pm

Re: Preset audio sample rate reverts to 48 kHz

Post by s55 »

We have no open bugs, and had no reports in as long as I can remember about this not working so if you have an issue, please raise a github issue and we can take a look.

Fwiw, all the built in presets set sample rates, and my own personal presets set it without issue so it may be localisation or not using the behaviours correctly.
Deleted User 11865

Re: Preset audio sample rate reverts to 48 kHz

Post by Deleted User 11865 »

s55 wrote: Mon Oct 01, 2018 5:03 pmFwiw, all the built in presets set sample rates, and my own personal presets set it without issue so it may be localisation or not using the behaviours correctly.
No, only five of them do (Vimeo-YouTube series), all others are "auto": https://github.com/HandBrake/HandBrake/ ... ltin.h#L21
Post Reply