Is this a bug? AAC audio bitrate issue.

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
Raiden
Posts: 6
Joined: Mon Feb 17, 2014 8:08 pm

Is this a bug? AAC audio bitrate issue.

Post by Raiden »

Please detail your question or problem in as much detail as possible:

When converting something, choosing the audio option for AAC audio and 1536 bitrate results in a file that has a far lower bitrate despite the original file having a much higher one (such as a 1536 bitrate DTS 5.1 file for example).

Tell us about your environment. What version of HandBrake? What version of Windows are you running. etc.

Handbrake Version 1.0.3 (2017022500) = 64-bit
Windows 10 Home Edition 64-bit Operating System, x64-based processor
Intel(R) Core(TM)2 CPU 6420 @ 2.13GHz 2.13 GHz
5.00 GM RAM
NVIDIA GeForce 8800 GTS

If there was any exception or error displayed, please copy it and paste it here:

There was no error displayed.

Please include the scan or encode log:

Code: Select all

HandBrake 1.0.3 (2017022500) - 64bit
OS: Microsoft Windows NT 10.0.14393.0 - 64bit
CPU: Intel(R) Core(TM)2 CPU          6420  @ 2.13GHz
Ram: 5118 MB, 
GPU Information:
  NVIDIA GeForce 8800 GTS - 21.21.13.4201
Screen: 1680x1050
Temp Dir: C:\Users\REDACTED\AppData\Local\Temp\
Install Dir: P:\HandBrake
Data Dir: C:\Users\REDACTED\AppData\Roaming\HandBrake Team\HandBrake\1.0.3.0

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


# Starting Encode ...

[04:11:03] hb_init: starting libhb thread
[04:11:03] 1 job(s) to process
[04:11:03] json job:
{
  "Audio": {
    "AudioList": [
      {
        "Bitrate": 1536,
        "DRC": 0.0,
        "Encoder": 65536,
        "Gain": 0.0,
        "Mixdown": 7,
        "NormalizeMixLevel": false,
        "Samplerate": 0,
        "Track": 0,
        "DitherMethod": 0
      }
    ],
    "CopyMask": [
      1073807360,
      1073743872,
      1074003968,
      1073750016,
      1090519040,
      1074790400,
      1074266112,
      1107296256
    ],
    "FallbackEncoder": 65536
  },
  "Destination": {
    "ChapterList": [],
    "ChapterMarkers": false,
    "File": "C:\\Users\\REDACTED\\Desktop\\test.mp4",
    "Mp4Options": {
      "IpodAtom": false,
      "Mp4Optimize": false
    },
    "Mux": 131072
  },
  "Filters": {
    "FilterList": [
      {
        "ID": 11,
        "Settings": {
          "crop-bottom": "0",
          "crop-left": "0",
          "crop-right": "0",
          "crop-top": "0",
          "height": "536",
          "width": "1280"
        }
      },
      {
        "ID": 6,
        "Settings": {
          "mode": "1"
        }
      }
    ]
  },
  "PAR": {
    "Num": 1,
    "Den": 1
  },
  "Metadata": {},
  "SequenceID": 0,
  "Source": {
    "Angle": 1,
    "Range": {
      "Type": "chapter",
      "Start": 1,
      "End": 1
    },
    "Title": 1,
    "Path": "C:\\Users\\REDACTED\\Desktop\\test.mkv"
  },
  "Subtitle": {
    "Search": {
      "Burn": false,
      "Default": false,
      "Enable": false,
      "Forced": false
    },
    "SubtitleList": []
  },
  "Video": {
    "Encoder": 65536,
    "Level": "3.0",
    "TwoPass": false,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Options": "",
    "Preset": "fast",
    "Profile": "baseline",
    "Quality": 20.0,
    "OpenCL": false,
    "HWDecode": false,
    "QSV": {
      "Decode": false,
      "AsyncDepth": 0
    }
  }
}
[04:11:03] CPU: Intel(R) Core(TM)2 CPU          6420  @ 2.13GHz
[04:11:03]  - logical processor count: 2
[04:11:03] Intel Quick Sync Video support: no
[04:11:03] hb_scan: path=C:\Users\REDACTED\Desktop\test.mkv, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:274: failed opening UDF image C:\Users\REDACTED\Desktop\test.mkv
src/libbluray/disc/disc.c:352: error opening file BDMV\index.bdmv
src/libbluray/disc/disc.c:352: error opening file BDMV\BACKUP\index.bdmv
[04:11:03] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 5.0.1
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
[04:11:03] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from 'C:\Users\REDACTED\Desktop\test.mkv':
  Metadata:
    ENCODER         : Lavf57.25.100
  Duration: 00:00:46.58, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: h264 (High)
      yuv420p, 1280x536 [PAR 1:1 DAR 160:67], PAR 1:1 DAR 160:67
      23.98 fps, 1k tbn (default)
    Metadata:
      DURATION        : 00:00:46.589000000
    Stream #0:1: Audio: dts (DTS)
      48000 Hz, 5.1, fltp, 1536 kb/s (default)
    Metadata:
      DURATION        : 00:00:46.518000000
[04:11:03] scan: decoding previews for title 1
[04:11:03] scan: audio 0x1: dca, rate=48000Hz, bitrate=1536000 Unknown (DTS) (5.1 ch)
[04:11:04] scan: 10 previews, 1280x536, 23.976 fps, autocrop = 0/0/0/0, aspect 2.39:1, PAR 1:1
[04:11:04] scan: supported video decoders: avcodec qsv
[04:11:04] libhb: scan thread found 1 valid title(s)
[04:11:04] starting job
[04:11:04] work: track 1, dithering not supported by codec
[04:11:04] job configuration:
[04:11:04]  * source
[04:11:04]    + C:\Users\REDACTED\Desktop\test.mkv
[04:11:04]    + title 1, chapter(s) 1 to 1
[04:11:04]    + container: matroska,webm
[04:11:04]  * destination
[04:11:04]    + C:\Users\REDACTED\Desktop\test.mp4
[04:11:04]    + container: MPEG-4 (libavformat)
[04:11:04]  * video track
[04:11:04]    + decoder: h264
[04:11:04]    + filters
[04:11:04]      + Framerate Shaper (mode=1)
[04:11:04]        + frame rate: 23.976 fps -> constant 23.976 fps
[04:11:04]      + Crop and Scale (width=1280:height=536:crop-top=0:crop-bottom=0:crop-left=0:crop-right=0)
[04:11:04]        + source: 1280 * 536, crop (0/0/0/0): 1280 * 536, scale: 1280 * 536
[04:11:04]    + Output geometry
[04:11:04]      + storage dimensions: 1280 x 536
[04:11:04]      + pixel aspect ratio: 1 : 1
[04:11:04]      + display dimensions: 1280 x 536
[04:11:04]    + encoder: H.264 (libx264)
[04:11:04]      + preset:  fast
[04:11:04]      + profile: baseline
[04:11:04]      + level:   3.0
[04:11:04]      + quality: 20.00 (RF)
[04:11:04]  * audio track 1
[04:11:04]    + decoder: Unknown (DTS) (5.1 ch) (track 1, id 0x1)
[04:11:04]      + bitrate: 1536 kbps, samplerate: 48000 Hz
[04:11:04]    + mixdown: 5.1 Channels
[04:11:04]    + encoder: AAC (libavcodec)
[04:11:04]      + bitrate: 1536 kbps, samplerate: 48000 Hz
[04:11:04] sync: expecting 1117 video frames
[04:11:04] encx264: min-keyint: 24, keyint: 240
[04:11:04] encx264: encoding at constant RF 20.000000
[04:11:04] apply_h264_level [warning]: frame size (1280x544, 2720 macroblocks) too high for level 3.0 (max. 1620 macroblocks)
[04:11:04] encx264: unparsed options: vbv-bufsize=10000:level=3.0:ref=2:weightp=0:vbv-maxrate=10000:bframes=0:cabac=0:8x8dct=0:subme=6:rc-lookahead=30
x264 [info]: using SAR=1/1
x264 [warning]: frame MB size (80x34) > level limit (1620)
x264 [warning]: MB rate (65214) > level limit (40500)
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64 SlowShuffle
x264 [info]: profile Constrained Baseline, level 3.0
[04:11:04] sync: first pts video is 0
[04:11:04] sync: Chapter 1 at frame 1 time 0
[04:11:04] sync: first pts audio 0x1 is 0
[04:11:50] reader: done. 1 scr changes
[04:11:53] work: average encoding speed for job is 22.694851 fps
[04:11:53] vfr: 1112 frames output, 0 dropped and 0 duped for CFR/PFR
[04:11:53] vfr: lost time: 0 (0 frames)
[04:11:53] vfr: gained time: 0 (0 frames) (0 not accounted for)
[04:11:53] dca-decoder done: 4341 frames, 0 decoder errors
[04:11:53] h264-decoder done: 1112 frames, 0 decoder errors
[04:11:53] sync: got 1112 frames, 1117 expected
[04:11:53] sync: framerate min 23.974 fps, max 23.981 fps, avg 23.976 fps
x264 [info]: frame I:33    Avg QP:14.62  size: 10819
x264 [info]: frame P:1079  Avg QP:17.53  size:  5565
x264 [info]: mb I  I16..4: 84.7%  0.0% 15.3%
x264 [info]: mb P  I16..4:  4.5%  0.0%  1.5%  P16..4: 25.6%  7.1%  2.0%  0.0%  0.0%    skip:59.3%
x264 [info]: coded y,uvDC,uvAC intra: 18.4% 48.9% 12.1% inter: 6.8% 18.4% 0.4%
x264 [info]: i16 v,h,dc,p: 44% 28%  8% 20%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 25% 28% 24%  4%  5%  3%  5%  3%  3%
x264 [info]: i8c dc,h,v,p: 63% 19% 14%  3%
x264 [info]: ref P L0: 78.5% 21.5%
x264 [info]: kb/s:1097.33
[04:11:53] mux: track 0, 1112 frames, 6361274 bytes, 1097.25 kbps, fifo 1024
[04:11:53] mux: track 1, 2171 frames, 4987717 bytes, 860.33 kbps, fifo 2048
[04:11:53] libhb: work result = 0

# Encode Completed ...

Figure I'd also mention that if I right click the converted file and look at it's properties, the bitrate is always lower. Using the above example, if I also use the 'MediaInfo' program, the two files say the following under 'First audio stream':

My original 'test.mkv' = 1509 kb/s, 48.0 kHz, 24 bits, 6 channels, DTS
My converted 'test.mp4' = 862 kb/s, 48.0 kHz, 6 channels / 2 channels, AAC (LC)
Deleted User 13735

Re: Is this a bug? AAC audio bitrate issue.

Post by Deleted User 13735 »

Your source is 24 bits per sample.
Your output is 16 bits per sample.
Likewise, the compression ratios between the two encoders are different, and are impossible to quantify because they are both moving targets.
Youve got an apple in one hand, and an orange in the other. They cannot both be red.
rollin_eng
Veteran User
Posts: 4857
Joined: Wed May 04, 2011 11:06 pm

Re: Is this a bug? AAC audio bitrate issue.

Post by rollin_eng »

It seems HB is limiting your aac audio to 860kbps, maybe there is a limit on what the encoder can use?
Raiden
Posts: 6
Joined: Mon Feb 17, 2014 8:08 pm

Re: Is this a bug? AAC audio bitrate issue.

Post by Raiden »

musicvid wrote: Wed Mar 15, 2017 8:58 am Your source is 24 bits per sample.
Your output is 16 bits per sample.
Likewise, the compression ratios between the two encoders are different, and are impossible to quantify because they are both moving targets.
Youve got an apple in one hand, and an orange in the other. They cannot both be red.
You'll have to bare with me since I'm hardly an expert, but you said the output was 16 bits per sample. Yet I didn't choose that or have any option for it. All there is to choose is things like the codec, bitrate and mixdown and so I chose the highest. If I have something that is 1536 bitrate, why would choosing that same numbers reduce the end result that much? You say the compression ratios are different, and I can understand that (I think), but such a big reduction? Surely it's not that much. It just doesn't make sense to me.
rollin_eng wrote: Wed Mar 15, 2017 10:29 am It seems HB is limiting your aac audio to 860kbps, maybe there is a limit on what the encoder can use?
That's the thing though, I've only stumbled upon this recently and now that you mention it, I've used older versions of HandBrake where I've made files and had higher audio bitrates which I checked on my portable hard drive. So, it has to be some issue in the newer versions? I haven't been upgrading and was on 0.10.3 (I think it was) for ages. So, yeah, there can't be a limit...
rollin_eng
Veteran User
Posts: 4857
Joined: Wed May 04, 2011 11:06 pm

Re: Is this a bug? AAC audio bitrate issue.

Post by rollin_eng »

DTS is not the same as AAC therefore using the same bitrate is not necessarily going to get you the same results.

The AAC encoder has changed recently thus the allowable bitrate may also have changed but maybe a dev can confirm.
Raiden
Posts: 6
Joined: Mon Feb 17, 2014 8:08 pm

Re: Is this a bug? AAC audio bitrate issue.

Post by Raiden »

rollin_eng wrote: Wed Mar 15, 2017 11:56 am DTS is not the same as AAC therefore using the same bitrate is not necessarily going to get you the same results.

The AAC encoder has changed recently thus the allowable bitrate may also have changed but maybe a dev can confirm.
Yeah, I can understand that to a degree. musicvid mentioned reasons like compression so I figure it would lower bitrate somewhat, but it seems way lower than usual to me. Hm, I didn't know the AAC encoder changed since I don't really follow the update notes. Just looks the same to me; I'm just a novice really, far from being some video expert or programmer. :lol:
rollin_eng
Veteran User
Posts: 4857
Joined: Wed May 04, 2011 11:06 pm

Re: Is this a bug? AAC audio bitrate issue.

Post by rollin_eng »

As the encoders are different you don't need the same bitrate to get good results.

The AAC encoder in HB is not very good but I imagine that any bitrate over 320 would be overkill.
Post Reply