HandBrake / HandBrake

HandBrake's main development repository
https://handbrake.fr
Other
17.31k stars 1.32k forks source link

AAC downmix forced to 96kbps #670

Closed mccartybr closed 7 years ago

mccartybr commented 7 years ago

Please describe the problem or feature request in detail:

Supply an mp4 input file with one h264 video track ac3 audio track 384 or greater kbps bitrate output to 1 aac stereo or dplii - aac downmix + ac3 passthru regardless of the bitrate settings for the aac track, the bitrate in the output (according to ffprobe) is always exactly 96kbps. By comparison, 'aac passthru', passing aac directly through handbrake with a bitrate greater than 96kbps, the higher bitrate is maintained with passthrough. this behavior is new for version 1.0.x; prior to that was able to downmix aac at 160 or 192kbps.

What are the steps to reproduce this problem:

downmix an mp4 file containing one ac3 audio track to aac

What version of HandBrake you are running:

1.0.3

What operating system and version and you running (e.g. OSX 10.11, Windows 7, Ubuntu 14):

ubuntu (mythbuntu) 14.0.4

Was there any error message or error dialog, if so please detail or provide screenshots:

no

Please provide the full activity log for the encode or scan attempt. You may attach the log as a file, post a pastebin URL to the log, or place the log inline below:

[06:45:19] hb_init: starting libhb thread
[06:45:19] hb_init: starting libhb thread
[06:45:19] hb_init: starting libhb thread
[06:45:32] CPU: Intel(R) Core(TM) i3-4330 CPU @ 3.50GHz
[06:45:32]  - Intel microarchitecture Haswell
[06:45:32]  - logical processor count: 4
[06:45:32] hb_scan: path=/home/mccarty/NAS1/video-staging/edited/Stealing Beauty (1996).mp4, title_index=0
udfread ERROR: ECMA 167 Volume Recognition failed
disc.c:274: failed opening UDF image /home/mccarty/NAS1/video-staging/edited/Stealing Beauty (1996).mp4
disc.c:352: error opening file BDMV/index.bdmv
disc.c:352: error opening file BDMV/BACKUP/index.bdmv
[06:45:32] 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
[06:45:32] dvd: not a dvd - trying as a stream/file instead
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/mccarty/NAS1/video-staging/edited/Stealing Beauty (1996).mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf57.52.100
  Duration: 01:58:09.10, start: 0.005333, bitrate: 13615 kb/s
    Stream #0:0(und): Video: h264 (Main) [avc1 / 0x31637661]
      yuv420p, tv, bt709/bt709/bt709
      1280x720 [PAR 1:1 DAR 16:9], 13218 kb/s, PAR 1:1 DAR 16:9
      59.94 fps, 90k tbn (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: ac3 [ac[45]3 / 0x332D6361]
      48000 Hz, 5.1, fltp, 384 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
    Side data:
      audio service type: main
[06:45:33] scan: decoding previews for title 1
[06:45:33] scan: audio 0x1: ac3, rate=48000Hz, bitrate=384000 Unknown (AC3) (5.1 ch)
[06:45:34] scan: 10 previews, 1280x720, 59.940 fps, autocrop = 4/0/0/4, aspect 16:9, PAR 1:1
[06:45:34] libhb: scan thread found 1 valid title(s)

** (ghb:6609): WARNING **: Inhibit failed: The name org.freedesktop.PowerManagement was not provided by any .service files
[06:45:44] gtkgui: Custom Preset: /DVR2
[06:45:44] 1 job(s) to process
[06:45:44] json job:
{
    "Audio": {
        "AudioList": [
            {
                "Bitrate": 96,
                "CompressionLevel": -1.0,
                "DRC": 0.0,
                "DitherMethod": "auto",
                "Encoder": "av_aac",
                "Gain": 4.2587301587301543,
                "Mixdown": "stereo",
                "NormalizeMixLevel": false,
                "PresetEncoder": "av_aac",
                "Quality": -3.0,
                "Samplerate": "48",
                "Track": 0
            },
            {
                "Bitrate": 0,
                "DRC": 0.0,
                "Encoder": "copy:ac3",
                "Mixdown": "none",
                "PresetEncoder": "copy:ac3",
                "Quality": -3.0,
                "Samplerate": 0,
                "Track": 0
            }
        ],
        "CopyMask": [],
        "FallbackEncoder": "ac3"
    },
    "Destination": {
        "ChapterList": [
            {
                "Name": ""
            }
        ],
        "ChapterMarkers": false,
        "File": "/home/mccarty/Videos/handbraked/Stealing Beauty (1996).mp4",
        "Mp4Options": {
            "IpodAtom": false,
            "Mp4Optimize": false
        },
        "Mux": "m4v"
    },
    "Filters": {
        "FilterList": [
            {
                "ID": 3,
                "Settings": {
                    "block-height": "16",
                    "block-thresh": "40",
                    "block-width": "16",
                    "filter-mode": "2",
                    "mode": "3",
                    "motion-thresh": "1",
                    "spatial-metric": "2",
                    "spatial-thresh": "1"
                }
            },
            {
                "ID": 4,
                "Settings": {
                    "mode": "7"
                }
            },
            {
                "ID": 6,
                "Settings": {
                    "mode": 1,
                    "rate": "27000000/450450"
                }
            },
            {
                "ID": 11,
                "Settings": {
                    "crop-bottom": 0,
                    "crop-left": 0,
                    "crop-right": 0,
                    "crop-top": 0,
                    "height": 718,
                    "width": 1276
                }
            }
        ]
    },
    "Metadata": {
        "Name": "Stealing Beauty (1996)"
    },
    "PAR": {
        "Den": 2871,
        "Num": 2872
    },
    "SequenceID": 0,
    "Source": {
        "Angle": 0,
        "Path": "/home/mccarty/NAS1/video-staging/edited/Stealing Beauty (1996).mp4",
        "Range": {
            "End": 1,
            "Start": 1,
            "Type": "chapter"
        },
        "Title": 1
    },
    "Subtitle": {
        "Search": {
            "Burn": true,
            "Default": false,
            "Enable": false,
            "Forced": false
        },
        "SubtitleList": []
    },
    "Video": {
        "ColorMatrixCode": 0,
        "Encoder": "x264",
        "Level": "4.1",
        "OpenCL": false,
        "Options": "",
        "Preset": "medium",
        "Profile": "high",
        "QSV": {
            "AsyncDepth": 4,
            "Decode": false
        },
        "Quality": 12.0,
        "Tune": "",
        "Turbo": false,
        "TwoPass": false
    }
}
[06:45:44] CPU: Intel(R) Core(TM) i3-4330 CPU @ 3.50GHz
[06:45:44]  - Intel microarchitecture Haswell
[06:45:44]  - logical processor count: 4
[06:45:44] hb_scan: path=/home/mccarty/NAS1/video-staging/edited/Stealing Beauty (1996).mp4, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
disc.c:274: failed opening UDF image /home/mccarty/NAS1/video-staging/edited/Stealing Beauty (1996).mp4
disc.c:352: error opening file BDMV/index.bdmv
disc.c:352: error opening file BDMV/BACKUP/index.bdmv
[06:45:44] 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
[06:45:44] dvd: not a dvd - trying as a stream/file instead
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/mccarty/NAS1/video-staging/edited/Stealing Beauty (1996).mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf57.52.100
  Duration: 01:58:09.10, start: 0.005333, bitrate: 13615 kb/s
    Stream #0:0(und): Video: h264 (Main) [avc1 / 0x31637661]
      yuv420p, tv, bt709/bt709/bt709
      1280x720 [PAR 1:1 DAR 16:9], 13218 kb/s, PAR 1:1 DAR 16:9
      59.94 fps, 90k tbn (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: ac3 [ac[45]3 / 0x332D6361]
      48000 Hz, 5.1, fltp, 384 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
    Side data:
      audio service type: main
[06:45:44] scan: decoding previews for title 1
[06:45:44] scan: audio 0x1: ac3, rate=48000Hz, bitrate=384000 Unknown (AC3) (5.1 ch)
[06:45:44] scan: 10 previews, 1280x720, 59.940 fps, autocrop = 4/0/0/4, aspect 16:9, PAR 1:1
[06:45:44] libhb: scan thread found 1 valid title(s)
[06:45:44] starting job
[06:45:44] decomb filter thread started for segment 0
[06:45:44] decomb filter thread started for segment 1
[06:45:44] decomb filter thread started for segment 2
[06:45:44] decomb filter thread started for segment 3
[06:45:44] decomb check thread started for segment 0
[06:45:44] decomb check thread started for segment 2
[06:45:44] decomb check thread started for segment 1
[06:45:44] decomb check thread started for segment 3
[06:45:44] mask filter thread started for segment 0
[06:45:44] mask filter thread started for segment 1
[06:45:44] mask filter thread started for segment 2
[06:45:44] mask filter thread started for segment 3
[06:45:44] mask erode thread started for segment 0
[06:45:44] mask erode thread started for segment 2
[06:45:44] mask erode thread started for segment 3
[06:45:44] job configuration:
[06:45:44] mask dilate thread started for segment 1
[06:45:44] mask erode thread started for segment 1
[06:45:44] mask dilate thread started for segment 2
[06:45:44] mask dilate thread started for segment 3
[06:45:44] yadif thread started for segment 0
[06:45:44] yadif thread started for segment 1
[06:45:44] yadif thread started for segment 2
[06:45:44] mask dilate thread started for segment 0
[06:45:44]  * source
[06:45:44] yadif thread started for segment 3
[06:45:44]    + /home/mccarty/NAS1/video-staging/edited/Stealing Beauty (1996).mp4
[06:45:44]    + title 1, chapter(s) 1 to 1
[06:45:44]    + container: mov,mp4,m4a,3gp,3g2,mj2
[06:45:44]    + data rate: 13615 kbps
[06:45:44]  * destination
[06:45:44]    + /home/mccarty/Videos/handbraked/Stealing Beauty (1996).mp4
[06:45:44]    + container: MPEG-4 (libavformat)
[06:45:44]  * video track
[06:45:44]    + decoder: h264
[06:45:44]      + bitrate 13218 kbps
[06:45:44]    + filters
[06:45:44]      + Comb Detect (mode=3:spatial-metric=2:motion-thresh=1:spatial-thresh=1:filter-mode=2:block-thresh=40:block-width=16:block-height=16)
[06:45:44]      + Decomb (mode=39)
[06:45:44]      + Framerate Shaper (mode=1:rate=27000000/450450)
[06:45:44]        + frame rate: 59.940 fps -> constant 59.940 fps
[06:45:44]      + Crop and Scale (width=1276:height=718:crop-top=0:crop-bottom=0:crop-left=0:crop-right=0)
[06:45:44]        + source: 1280 * 720, crop (0/0/0/0): 1280 * 720, scale: 1276 * 718
[06:45:44]    + Output geometry
[06:45:44]      + storage dimensions: 1276 x 718
[06:45:44]      + pixel aspect ratio: 2872 : 2871
[06:45:44]      + display dimensions: 1276 x 718
[06:45:44]    + encoder: H.264 (libx264)
[06:45:44]      + preset:  medium
[06:45:44]      + profile: high
[06:45:44]      + level:   4.1
[06:45:44]      + quality: 12.00 (RF)
[06:45:44]  * audio track 1
[06:45:44]    + decoder: Unknown (AC3) (5.1 ch) (track 1, id 0x1)
[06:45:44]      + bitrate: 384 kbps, samplerate: 48000 Hz
[06:45:44]    + mixdown: Stereo
[06:45:44]    + gain: 4dB
[06:45:44]    + encoder: AAC (libavcodec)
[06:45:44]      + bitrate: 96 kbps, samplerate: 48000 Hz
[06:45:44]  * audio track 2
[06:45:44]    + decoder: Unknown (AC3) (5.1 ch) (track 1, id 0x1)
[06:45:44]      + bitrate: 384 kbps, samplerate: 48000 Hz
[06:45:44]    + AC3 Passthru
[06:45:45] sync: expecting 424921 video frames
[06:45:45] encx264: min-keyint: 60, keyint: 600
[06:45:45] encx264: encoding at constant RF 12.000000
[06:45:45] encx264: unparsed options: level=4.1:vbv-maxrate=62500:vbv-bufsize=78125
x264 [info]: using SAR=2872/2871
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX AVX2 FMA3 LZCNT BMI2
x264 [info]: profile High, level 4.1
[06:45:45] sync: first pts audio 0x1 is 0
[06:45:45] sync: first pts audio 0x1 is 0
[06:45:45] sync: first pts video is 45385
[06:45:45] sync: Chapter 1 at frame 4 time 49890
[10:50:46] reader: done. 1 scr changes
[10:50:51] work: average encoding speed for job is 28.896580 fps
[10:50:51] comb detect: heavy 11 | light 264 | uncombed 424613 | total 424888
[10:50:51] decomb: deinterlaced 11 | blended 264 | unfiltered 424613 | total 424888
[10:50:51] vfr: 424918 frames output, 0 dropped and 30 duped for CFR/PFR
[10:50:51] vfr: lost time: 0 (0 frames)
[10:50:51] vfr: gained time: 0 (0 frames) (0 not accounted for)
[10:50:51] ac3-decoder done: 221531 frames, 0 decoder errors
[10:50:51] ac3-decoder done: 221531 frames, 0 decoder errors
[10:50:51] h264-decoder done: 424888 frames, 0 decoder errors
[10:50:51] sync: got 424888 frames, 424921 expected
[10:50:51] sync: framerate min 59.920 fps, max 59.960 fps, avg 59.940 fps
x264 [info]: frame I:2574  Avg QP:10.06  size: 93645
x264 [info]: frame P:140012 Avg QP:13.42  size: 35378
x264 [info]: frame B:282332 Avg QP:16.46  size:  5799
x264 [info]: consecutive B-frames:  5.2% 16.1%  7.6% 71.1%
x264 [info]: mb I  I16..4: 13.2% 69.9% 16.9%
x264 [info]: mb P  I16..4:  2.5%  8.4%  1.6%  P16..4: 34.1% 28.7% 16.5%  0.0%  0.0%    skip: 8.1%
x264 [info]: mb B  I16..4:  0.2%  0.2%  0.0%  B16..8: 36.9%  5.6%  1.0%  direct: 4.5%  skip:51.6%  L0:40.8% L1:51.8% BI: 7.4%
x264 [info]: 8x8 transform intra:66.3% inter:65.5%
x264 [info]: coded y,uvDC,uvAC intra: 68.3% 83.2% 71.6% inter: 24.4% 27.9% 4.8%
x264 [info]: i16 v,h,dc,p: 49% 21% 10% 21%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 22% 18% 29%  4%  5%  6%  5%  5%  5%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 33% 24% 17%  4%  6%  5%  5%  4%  3%
x264 [info]: i8c dc,h,v,p: 50% 22% 20%  7%
x264 [info]: Weighted P-Frames: Y:1.6% UV:1.0%
x264 [info]: ref P L0: 64.5%  9.7% 19.2%  6.5%  0.1%
x264 [info]: ref B L0: 86.0% 12.4%  1.6%
x264 [info]: ref B L1: 93.1%  6.9%
x264 [info]: kb/s:7709.59
[10:50:51] mux: track 0, 424918 frames, 6831639562 bytes, 7709.51 kbps, fifo 1024
[10:50:51] mux: track 1, 332297 frames, 85272300 bytes, 96.23 kbps, fifo 1024
[10:50:51] mux: track 2, 221531 frames, 340271616 bytes, 384.00 kbps, fifo 1024
[10:50:51] libhb: work result = 0
mccartybr commented 7 years ago

first line of activity log missing above Here it is:

[06:45:19] gtkgui: HandBrake 1.0.3 (2017022500) - Linux x86_64 - https://handbrake.fr

jstebbins commented 7 years ago

I think this is the same problem as this https://forum.handbrake.fr/viewtopic.php?f=5&t=35980

Could you try setting samplerate to auto in audio defaults and see if it fixes the bitrate issue?

jstebbins commented 7 years ago

I'm going to assume the forum post is the same problem Should be fixed in 9a22ae2

Closing. If you continue having this problem after updating to a nightly build, feel free to let us know and we'll reopen.

mccartybr commented 7 years ago

Confirmed fixed...thanks for the prompt response