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

Current stable release **handbrake-gtk_1.2.0-zhb-1ppa1~cosmic1_amd64** conversion to AAC audio results in a erroneous mixed tracks #1744

Closed
fprietog opened this Issue Dec 23, 2018 · 16 comments

Comments

4 participants
@fprietog
Copy link

fprietog commented Dec 23, 2018

Description of the problem

Current stable release handbrake-gtk_1.2.0-zhb-1ppa1~cosmic1_amd64 conversion to AAC audio from any source (i.e. DTS) results in a erroneous mixed tracks.

I just use a test file DTS-HRA5.1_VC1-23.976.mkv downloaded from here: https://drive.google.com/file/d/0BwxFVkl63-lEcU1ScWZuMjhpOXM/view

I also use two handbrake packages from here: https://launchpad.net/~stebbins/+archive/ubuntu/handbrake-releases/+builds?build_state=built

  • Previous stable release: handbrake-gtk_20181019210024-0288c01-v1.1.2-zhb-1ppa1_cosmic1_amd64
  • Current stable release: handbrake-gtk_1.2.0-zhb-1ppa1~cosmic1_amd64

In both cases I just converted the file using the default /General/Fast 1080p30 preset, only changing the AAC mixdown to 5.1 Channels. This is the mediainfo of the original DTS track:

ID                                       : 2
Format                                   : DTS
Format/Info                              : Digital Theater Systems
Format profile                           : HRA / Core
Codec ID                                 : A_DTS
Duration                                 : 44 s 960 ms
Bit rate mode                            : Constant
Bit rate                                 : 3 018 kb/s / 1 509 kb/s
Channel(s)                               : 6 channels
Channel positions                        : Front: L C R, Side: L R, LFE
Sampling rate                            : 96.0 kHz / 48.0 kHz
Frame rate                               : 93.750 FPS (512 SPF)
Bit depth                                : 24 bits
Compression mode                         : Lossy
Delay relative to video                  : 3 ms
Stream size                              : 16.2 MiB (15%)
Title                                    : DTS-HD Audio
Language                                 : English
Default                                  : Yes
Forced                                   : No
  • When using previous stable release handbrake-gtk_20181019210024-0288c01-v1.1.2-zhb-1ppa1_cosmic1_amd64 the AAC track converted is correct. Here is the mediainfo of the converted AAC track:
ID                                       : 2
Format                                   : AAC
Format/Info                              : Advanced Audio Codec
Format profile                           : LC
Codec ID                                 : mp4a-40-2
Duration                                 : 44 s 971 ms
Bit rate mode                            : Variable
Bit rate                                 : 192 kb/s
Channel(s)                               : 2 channels
Channel(s)_Original                      : 6 channels
Channel positions                        : Front: L C R, Side: L R, LFE
Sampling rate                            : 48.0 kHz
Frame rate                               : 46.875 FPS (1024 SPF)
Compression mode                         : Lossy
Stream size                              : 1.03 MiB (4%)
Title                                    : Surround / Surround
Language                                 : English
Default                                  : Yes
Alternate group                          : 1
  • But, when using current stable release handbrake-gtk_1.2.0-zhb-1ppa1~cosmic1_amd64 the AAC track converted is not correct (i.e. it's played garbled in VLC). Here is the mediainfo of the converted AAC track:
ID                                       : 2
Format                                   : AAC
Format/Info                              : Advanced Audio Codec
Format profile                           : LC
Codec ID                                 : mp4a-40-2
Duration                                 : 44 s 971 ms
Bit rate mode                            : Constant
Bit rate                                 : 192 kb/s
Channel(s)                               : 2 channels
Channel(s)_Original                      : 6 channels
Channel positions                        : Front: L C R, Side: C, Back: L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 46.875 FPS (1024 SPF)
Compression mode                         : Lossy
Stream size                              : 1.03 MiB (3%)
Title                                    : Surround
Language                                 : English
Default                                  : Yes
Alternate group                          : 1

In my opinion the problem should be in the channel positions. Original track and previous stable version converted track shares same channel positions:

Channel positions                        : Front: L C R, Side: L R, LFE

But the track converted with current stable version is different (erroneous):

Channel positions                        : Front: L C R, Side: C, Back: L R

HandBrake version (e.g., 1.0.0)

I use two packages from here: https://launchpad.net/~stebbins/+archive/ubuntu/handbrake-releases/+builds?build_state=built

  • Working (previous stable release): handbrake-gtk_20181019210024-0288c01-v1.1.2-zhb-1ppa1_cosmic1_amd64
  • Failing (current stable release): handbrake-gtk_1.2.0-zhb-1ppa1~cosmic1_amd64
    I've also tested latest snapshot without luck.

Operating system and version (e.g., Ubuntu 18.04 LTS, macOS 10.14 Mojave, Windows 10 1809)

Ubuntu 18.10 amd64
No changes were made between tests, using same libraries.

HandBrake Activity Log (see https://handbrake.fr/docs/en/latest/help/activity-log.html)

There are two activity logs:

  • the first was done using handbrake-gtk_20181019210024-0288c01-v1.1.2-zhb-1ppa1_cosmic1_amd64" and the result is correct.
  • the second was done using handbrake-gtk_1.2.0-zhb-1ppa1~cosmic1_amd64 and the result is not correct.

1 CORRECT

[16:49:53] gtkgui: HandBrake 20181019210024-0288c01-v1.1.2 (2018101901) - Linux x86_64 - https://handbrake.fr
[16:49:53] hb_init: starting libhb thread
[16:49:53] hb_init: starting libhb thread
[16:49:53] hb_init: starting libhb thread
[16:49:54] CPU: Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
[16:49:54]  - Intel microarchitecture Haswell
[16:49:54]  - logical processor count: 8
[16:49:54] hb_scan: path=/home/fprietog/Descargas/DTS-HRA5.1_VC1-23.976.mkv, title_index=0
udfread ERROR: ECMA 167 Volume Recognition failed
disc.c:323: failed opening UDF image /home/fprietog/Descargas/DTS-HRA5.1_VC1-23.976.mkv
disc.c:424: error opening file BDMV/index.bdmv
disc.c:424: error opening file BDMV/BACKUP/index.bdmv
[16:49:54] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 6.0.0
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
[16:49:54] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from '/home/fprietog/Descargas/DTS-HRA5.1_VC1-23.976.mkv':
  Duration: 00:00:44.96, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: vc1 (Advanced) [WVC1 / 0x31435657]
      yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], PAR 1:1 DAR 16:9
      23,98 fps, 1k tbn (default)
    Metadata:
      BPS             : 17021257
      BPS-eng         : 17021257
      DURATION        : 00:00:44.961000000
      DURATION-eng    : 00:00:44.961000000
      NUMBER_OF_FRAMES: 1078
      NUMBER_OF_FRAMES-eng: 1078
      NUMBER_OF_BYTES : 95661597
      NUMBER_OF_BYTES-eng: 95661597
      _STATISTICS_WRITING_APP: mkvmerge v8.8.0 ('Wind at my back') 64bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v8.8.0 ('Wind at my back') 64bit
      _STATISTICS_WRITING_DATE_UTC: 2016-02-08 17:01:53
      _STATISTICS_WRITING_DATE_UTC-eng: 2016-02-08 17:01:53
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:1(eng): Audio: dts (DTS-HD HRA)
      48000 Hz, 5.1, fltp, 1536 kb/s (default)
    Metadata:
      title           : DTS-HD Audio
      BPS             : 3018000
      BPS-eng         : 3018000
      DURATION        : 00:00:44.960000000
      DURATION-eng    : 00:00:44.960000000
      NUMBER_OF_FRAMES: 4215
      NUMBER_OF_FRAMES-eng: 4215
      NUMBER_OF_BYTES : 16961160
      NUMBER_OF_BYTES-eng: 16961160
      _STATISTICS_WRITING_APP: mkvmerge v8.8.0 ('Wind at my back') 64bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v8.8.0 ('Wind at my back') 64bit
      _STATISTICS_WRITING_DATE_UTC: 2016-02-08 17:01:53
      _STATISTICS_WRITING_DATE_UTC-eng: 2016-02-08 17:01:53
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
[16:49:54] scan: decoding previews for title 1
[16:49:54] scan: audio 0x1: dca, rate=48000Hz, bitrate=1536000 English (DTS-HD HRA) (5.1 ch)
[16:49:55] scan: 15 previews, 1920x1080, 23,976 fps, autocrop = 12/0/0/0, aspect 16:9, PAR 1:1
[16:49:55] libhb: scan thread found 1 valid title(s)
[16:50:08] gtkgui: Preset: /General/Fast 1080p30
[16:50:08] 1 job(s) to process
[16:50:08] json job:
{
    "Audio": {
        "AudioList": [
            {
                "Bitrate": 192,
                "CompressionLevel": -1.0,
                "DRC": 0.0,
                "DitherMethod": "auto",
                "Encoder": "av_aac",
                "Gain": 0.0,
                "Mixdown": "5point1",
                "NormalizeMixLevel": false,
                "PresetEncoder": "av_aac",
                "Quality": -3.0,
                "Samplerate": 0,
                "Track": 0
            }
        ],
        "CopyMask": [
            "copy:aac"
        ],
        "FallbackEncoder": "av_aac"
    },
    "Destination": {
        "AlignAVStart": true,
        "ChapterList": [
            {
                "Name": ""
            }
        ],
        "ChapterMarkers": false,
        "File": "/home/fprietog/tmp/DTS-HRA5.1_VC1-23.976.m4v",
        "InlineParameterSets": false,
        "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": 2,
                    "rate": "27000000/900000"
                }
            },
            {
                "ID": 11,
                "Settings": {
                    "crop-bottom": 0,
                    "crop-left": 0,
                    "crop-right": 0,
                    "crop-top": 12,
                    "height": 1068,
                    "width": 1920
                }
            }
        ]
    },
    "Metadata": {
        "Name": "DTS-HRA5.1_VC1-23.976"
    },
    "PAR": {
        "Den": 1,
        "Num": 1
    },
    "SequenceID": 0,
    "Source": {
        "Angle": 0,
        "Path": "/home/fprietog/Descargas/DTS-HRA5.1_VC1-23.976.mkv",
        "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.0",
        "Options": "",
        "Preset": "fast",
        "Profile": "main",
        "QSV": {
            "AsyncDepth": 4,
            "Decode": false
        },
        "Quality": 22.0,
        "Tune": "",
        "Turbo": false,
        "TwoPass": false
    }
}
[16:50:08] CPU: Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
[16:50:08]  - Intel microarchitecture Haswell
[16:50:08]  - logical processor count: 8
[16:50:08] hb_scan: path=/home/fprietog/Descargas/DTS-HRA5.1_VC1-23.976.mkv, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
disc.c:323: failed opening UDF image /home/fprietog/Descargas/DTS-HRA5.1_VC1-23.976.mkv
disc.c:424: error opening file BDMV/index.bdmv
disc.c:424: error opening file BDMV/BACKUP/index.bdmv
[16:50:08] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 6.0.0
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
[16:50:08] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from '/home/fprietog/Descargas/DTS-HRA5.1_VC1-23.976.mkv':
  Duration: 00:00:44.96, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: vc1 (Advanced) [WVC1 / 0x31435657]
      yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], PAR 1:1 DAR 16:9
      23,98 fps, 1k tbn (default)
    Metadata:
      BPS             : 17021257
      BPS-eng         : 17021257
      DURATION        : 00:00:44.961000000
      DURATION-eng    : 00:00:44.961000000
      NUMBER_OF_FRAMES: 1078
      NUMBER_OF_FRAMES-eng: 1078
      NUMBER_OF_BYTES : 95661597
      NUMBER_OF_BYTES-eng: 95661597
      _STATISTICS_WRITING_APP: mkvmerge v8.8.0 ('Wind at my back') 64bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v8.8.0 ('Wind at my back') 64bit
      _STATISTICS_WRITING_DATE_UTC: 2016-02-08 17:01:53
      _STATISTICS_WRITING_DATE_UTC-eng: 2016-02-08 17:01:53
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:1(eng): Audio: dts (DTS-HD HRA)
      48000 Hz, 5.1, fltp, 1536 kb/s (default)
    Metadata:
      title           : DTS-HD Audio
      BPS             : 3018000
      BPS-eng         : 3018000
      DURATION        : 00:00:44.960000000
      DURATION-eng    : 00:00:44.960000000
      NUMBER_OF_FRAMES: 4215
      NUMBER_OF_FRAMES-eng: 4215
      NUMBER_OF_BYTES : 16961160
      NUMBER_OF_BYTES-eng: 16961160
      _STATISTICS_WRITING_APP: mkvmerge v8.8.0 ('Wind at my back') 64bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v8.8.0 ('Wind at my back') 64bit
      _STATISTICS_WRITING_DATE_UTC: 2016-02-08 17:01:53
      _STATISTICS_WRITING_DATE_UTC-eng: 2016-02-08 17:01:53
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
[16:50:08] scan: decoding previews for title 1
[16:50:08] scan: audio 0x1: dca, rate=48000Hz, bitrate=1536000 English (DTS-HD HRA) (5.1 ch)
[16:50:09] scan: 10 previews, 1920x1080, 23,976 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1
[16:50:09] libhb: scan thread found 1 valid title(s)
[16:50:09] starting job
[16:50:09] decomb filter thread started for segment 1
[16:50:09] decomb filter thread started for segment 2
[16:50:09] decomb filter thread started for segment 0
[16:50:09] decomb filter thread started for segment 3
[16:50:09] decomb filter thread started for segment 4
[16:50:09] decomb filter thread started for segment 5
[16:50:09] decomb filter thread started for segment 6
[16:50:09] decomb check thread started for segment 0
[16:50:09] decomb filter thread started for segment 7
[16:50:09] decomb check thread started for segment 2
[16:50:09] decomb check thread started for segment 1
[16:50:09] decomb check thread started for segment 3
[16:50:09] decomb check thread started for segment 5
[16:50:09] decomb check thread started for segment 4
[16:50:09] decomb check thread started for segment 7
[16:50:09] mask filter thread started for segment 0
[16:50:09] mask filter thread started for segment 1
[16:50:09] mask filter thread started for segment 3
[16:50:09] mask filter thread started for segment 2
[16:50:09] mask filter thread started for segment 4
[16:50:09] mask filter thread started for segment 5
[16:50:09] mask filter thread started for segment 6
[16:50:09] mask filter thread started for segment 7
[16:50:09] mask erode thread started for segment 0
[16:50:09] mask erode thread started for segment 1
[16:50:09] mask erode thread started for segment 2
[16:50:09] mask erode thread started for segment 3
[16:50:09] mask erode thread started for segment 5
[16:50:09] mask erode thread started for segment 6
[16:50:09] mask erode thread started for segment 4
[16:50:09] mask erode thread started for segment 7
[16:50:09] mask dilate thread started for segment 0
[16:50:09] mask dilate thread started for segment 1
[16:50:09] mask dilate thread started for segment 2
[16:50:09] mask dilate thread started for segment 3
[16:50:09] mask dilate thread started for segment 4
[16:50:09] mask dilate thread started for segment 5
[16:50:09] mask dilate thread started for segment 7
[16:50:09] yadif thread started for segment 1
[16:50:09] yadif thread started for segment 0
[16:50:09] mask dilate thread started for segment 6
[16:50:09] yadif thread started for segment 2
[16:50:09] yadif thread started for segment 3
[16:50:09] yadif thread started for segment 4
[16:50:09] yadif thread started for segment 6
[16:50:09] yadif thread started for segment 5
[16:50:09] job configuration:
[16:50:09]  * source
[16:50:09]    + /home/fprietog/Descargas/DTS-HRA5.1_VC1-23.976.mkv
[16:50:09]    + title 1, chapter(s) 1 to 1
[16:50:09]    + container: matroska,webm
[16:50:09]  * destination
[16:50:09]    + /home/fprietog/tmp/DTS-HRA5.1_VC1-23.976.m4v
[16:50:09]    + container: MPEG-4 (libavformat)
[16:50:09]      + align initial A/V stream timestamps
[16:50:09]  * video track
[16:50:09]    + decoder: vc1
[16:50:09]    + filters
[16:50:09]      + 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)
[16:50:09]      + Decomb (mode=39)
[16:50:09]      + Framerate Shaper (mode=2:rate=27000000/900000)
[16:50:09]        + frame rate: 23,976 fps -> peak rate limited to 30,000 fps
[16:50:09]      + Crop and Scale (width=1920:height=1068:crop-top=12:crop-bottom=0:crop-left=0:crop-right=0)
[16:50:09]        + source: 1920 * 1080, crop (12/0/0/0): 1920 * 1068, scale: 1920 * 1068
[16:50:09]    + Output geometry
[16:50:09]      + storage dimensions: 1920 x 1068
[16:50:09]      + pixel aspect ratio: 1 : 1
[16:50:09]      + display dimensions: 1920 x 1068
[16:50:09]    + encoder: H.264 (libx264)
[16:50:09]      + preset:  fast
[16:50:09]      + profile: main
[16:50:09]      + level:   4.0
[16:50:09]      + quality: 22,00 (RF)
[16:50:09]  * audio track 1
[16:50:09]    + decoder: English (DTS-HD HRA) (5.1 ch) (track 1, id 0x1)
[16:50:09]      + bitrate: 1536 kbps, samplerate: 48000 Hz
[16:50:09]    + mixdown: 5.1 Channels
[16:50:09]    + encoder: AAC (libavcodec)
[16:50:09]      + bitrate: 192 kbps, samplerate: 48000 Hz
[16:50:09] yadif thread started for segment 7
[16:50:09] decomb check thread started for segment 6
[16:50:09] sync: expecting 1078 video frames
[16:50:09] encx264: min-keyint: 24, keyint: 240
[16:50:09] encx264: encoding at constant RF 22,000000
[16:50:09] encx264: unparsed options: level=4.0:ref=2:8x8dct=0:weightp=1:subme=6:vbv-bufsize=25000:vbv-maxrate=20000:rc-lookahead=30
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x264 [info]: profile Main, level 4.0
[16:50:09] sync: first pts video is 0
[16:50:09] sync: Chapter 1 at frame 1 time 0
[16:50:09] sync: first pts audio 0x1 is 0
[16:50:39] reader: done. 1 scr changes
[16:50:43] work: average encoding speed for job is 34,324944 fps
[16:50:43] comb detect: heavy 0 | light 0 | uncombed 1077 | total 1077
[16:50:43] decomb: deinterlaced 0 | blended 0 | unfiltered 1077 | total 1077
[16:50:43] vfr: 1077 frames output, 0 dropped and 0 duped for CFR/PFR
[16:50:43] vfr: lost time: 0 (0 frames)
[16:50:43] vfr: gained time: 0 (0 frames) (0 not accounted for)
[16:50:43] dca-decoder done: 4215 frames, 0 decoder errors
[16:50:43] vc1-decoder done: 1077 frames, 0 decoder errors
[16:50:43] sync: got 1077 frames, 1078 expected
[16:50:43] sync: framerate min 12,048 fps, max 23,981 fps, avg 23,954 fps
x264 [info]: frame I:22    Avg QP:18,80  size:115359
x264 [info]: frame P:337   Avg QP:21,57  size: 40586
x264 [info]: frame B:718   Avg QP:22,35  size: 18743
x264 [info]: consecutive B-frames:  9,8%  2,8%  3,1% 84,3%
x264 [info]: mb I  I16..4: 38,7%  0,0% 61,3%
x264 [info]: mb P  I16..4:  6,6%  0,0%  8,8%  P16..4: 39,1% 11,4%  9,5%  0,0%  0,0%    skip:24,8%
x264 [info]: mb B  I16..4: 10,8%  0,0%  1,2%  B16..8: 23,6%  6,0%  0,4%  direct:15,6%  skip:42,4%  L0:44,7% L1:46,1% BI: 9,2%
x264 [info]: coded y,uvDC,uvAC intra: 56,1% 78,5% 43,6% inter: 14,9% 33,3% 3,3%
x264 [info]: i16 v,h,dc,p: 30% 17% 39% 14%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 24% 14% 26%  6%  7%  7%  6%  5%  3%
x264 [info]: i8c dc,h,v,p: 60% 15% 20%  5%
x264 [info]: Weighted P-Frames: Y:11,0% UV:8,9%
x264 [info]: ref P L0: 67,9% 32,1%
x264 [info]: ref B L0: 84,3% 15,7%
x264 [info]: ref B L1: 96,2%  3,8%
x264 [info]: kb/s:5279,70
[16:50:43] mux: track 0, 1077 frames, 29672117 bytes, 5274,66 kbps, fifo 512
[16:50:43] mux: track 1, 2108 frames, 1082549 bytes, 192,44 kbps, fifo 2048
[16:50:43] libhb: work result = 0

2 NOT CORRECT

[16:54:46] gtkgui: HandBrake 1.2.0 (2018122200) - Linux x86_64 - https://handbrake.fr
Cannot load libnvidia-encode.so.1
Cannot load libnvidia-encode.so.1
Cannot load libnvidia-encode.so.1
Cannot load libnvidia-encode.so.1
[16:54:46] hb_init: starting libhb thread
[16:54:46] hb_init: starting libhb thread
[16:54:46] hb_init: starting libhb thread
[16:54:46] gtkgui: Failed to read presets file, initailizing new presets...
[16:54:47] CPU: Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
[16:54:47]  - Intel microarchitecture Haswell
[16:54:47]  - logical processor count: 8
[16:54:47] hb_scan: path=/home/fprietog/Descargas/DTS-HRA5.1_VC1-23.976.mkv, title_index=0
udfread ERROR: ECMA 167 Volume Recognition failed
disc.c:323: failed opening UDF image /home/fprietog/Descargas/DTS-HRA5.1_VC1-23.976.mkv
disc.c:424: error opening file BDMV/index.bdmv
disc.c:424: error opening file BDMV/BACKUP/index.bdmv
[16:54:47] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 6.0.0
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
[16:54:47] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from '/home/fprietog/Descargas/DTS-HRA5.1_VC1-23.976.mkv':
  Metadata:
    encoder         : libebml v1.3.3 + libmatroska v1.4.4
    creation_time   : 2016-02-08T17:01:53.000000Z
  Duration: 00:00:44.96, start: 0.003000, bitrate: 20042 kb/s
    Stream #0:0: Video: vc1 (Advanced) (WVC1 / 0x31435657), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23,98 fps, 23,98 tbr, 1k tbn, 47,95 tbc (default)
    Metadata:
      BPS             : 17021257
      BPS-eng         : 17021257
      DURATION        : 00:00:44.961000000
      DURATION-eng    : 00:00:44.961000000
      NUMBER_OF_FRAMES: 1078
      NUMBER_OF_FRAMES-eng: 1078
      NUMBER_OF_BYTES : 95661597
      NUMBER_OF_BYTES-eng: 95661597
      _STATISTICS_WRITING_APP: mkvmerge v8.8.0 ('Wind at my back') 64bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v8.8.0 ('Wind at my back') 64bit
      _STATISTICS_WRITING_DATE_UTC: 2016-02-08 17:01:53
      _STATISTICS_WRITING_DATE_UTC-eng: 2016-02-08 17:01:53
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:1(eng): Audio: dts (DTS-HD HRA), 96000 Hz, 5.1(side), fltp (default)
    Metadata:
      title           : DTS-HD Audio
      BPS             : 3018000
      BPS-eng         : 3018000
      DURATION        : 00:00:44.960000000
      DURATION-eng    : 00:00:44.960000000
      NUMBER_OF_FRAMES: 4215
      NUMBER_OF_FRAMES-eng: 4215
      NUMBER_OF_BYTES : 16961160
      NUMBER_OF_BYTES-eng: 16961160
      _STATISTICS_WRITING_APP: mkvmerge v8.8.0 ('Wind at my back') 64bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v8.8.0 ('Wind at my back') 64bit
      _STATISTICS_WRITING_DATE_UTC: 2016-02-08 17:01:53
      _STATISTICS_WRITING_DATE_UTC-eng: 2016-02-08 17:01:53
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
[16:54:47] scan: decoding previews for title 1
[16:54:47] scan: audio 0x1: dca, rate=96000Hz, bitrate=1 English (DTS-HD HRA) (5.1 ch)
[16:54:47] scan: 10 previews, 1920x1080, 23,976 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1
[16:54:47] libhb: scan thread found 1 valid title(s)
[16:56:39] gtkgui: Preset: /General/Fast 1080p30
[16:56:39] 1 job(s) to process
[16:56:39] json job:
{
    "Audio": {
        "AudioList": [
            {
                "Bitrate": 192,
                "CompressionLevel": -1.0,
                "DRC": 0.0,
                "DitherMethod": "auto",
                "Encoder": "av_aac",
                "Gain": 0.0,
                "Mixdown": "5point1",
                "NormalizeMixLevel": false,
                "PresetEncoder": "av_aac",
                "Quality": -3.0,
                "Samplerate": 0,
                "Track": 0
            }
        ],
        "CopyMask": [
            "copy:aac"
        ],
        "FallbackEncoder": "av_aac"
    },
    "Destination": {
        "AlignAVStart": true,
        "ChapterList": [
            {
                "Name": ""
            }
        ],
        "ChapterMarkers": false,
        "File": "/home/fprietog/Vídeos/DTS-HRA5.1_VC1-23.976.m4v",
        "InlineParameterSets": false,
        "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": 2,
                    "rate": "27000000/900000"
                }
            },
            {
                "ID": 11,
                "Settings": {
                    "crop-bottom": 0,
                    "crop-left": 0,
                    "crop-right": 0,
                    "crop-top": 0,
                    "height": 1080,
                    "width": 1920
                }
            }
        ]
    },
    "Metadata": {
        "Name": "DTS-HRA5.1_VC1-23.976"
    },
    "PAR": {
        "Den": 1,
        "Num": 1
    },
    "SequenceID": 0,
    "Source": {
        "Angle": 0,
        "Path": "/home/fprietog/Descargas/DTS-HRA5.1_VC1-23.976.mkv",
        "Range": {
            "End": 1,
            "Start": 1,
            "Type": "chapter"
        },
        "Title": 1
    },
    "Subtitle": {
        "Search": {
            "Burn": true,
            "Default": false,
            "Enable": false,
            "Forced": false
        },
        "SubtitleList": []
    },
    "Video": {
        "ColorMatrix": 1,
        "ColorPrimaries": 1,
        "ColorTransfer": 1,
        "Encoder": "x264",
        "Level": "4.0",
        "Options": "",
        "Preset": "fast",
        "Profile": "main",
        "QSV": {
            "AsyncDepth": 4,
            "Decode": false
        },
        "Quality": 22.0,
        "Tune": "",
        "Turbo": false,
        "TwoPass": false
    }
}
[16:56:39] CPU: Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
[16:56:39]  - Intel microarchitecture Haswell
[16:56:39]  - logical processor count: 8
[16:56:39] hb_scan: path=/home/fprietog/Descargas/DTS-HRA5.1_VC1-23.976.mkv, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
disc.c:323: failed opening UDF image /home/fprietog/Descargas/DTS-HRA5.1_VC1-23.976.mkv
disc.c:424: error opening file BDMV/index.bdmv
disc.c:424: error opening file BDMV/BACKUP/index.bdmv
[16:56:39] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 6.0.0
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
[16:56:39] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from '/home/fprietog/Descargas/DTS-HRA5.1_VC1-23.976.mkv':
  Metadata:
    encoder         : libebml v1.3.3 + libmatroska v1.4.4
    creation_time   : 2016-02-08T17:01:53.000000Z
  Duration: 00:00:44.96, start: 0.003000, bitrate: 20042 kb/s
    Stream #0:0: Video: vc1 (Advanced) (WVC1 / 0x31435657), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23,98 fps, 23,98 tbr, 1k tbn, 47,95 tbc (default)
    Metadata:
      BPS             : 17021257
      BPS-eng         : 17021257
      DURATION        : 00:00:44.961000000
      DURATION-eng    : 00:00:44.961000000
      NUMBER_OF_FRAMES: 1078
      NUMBER_OF_FRAMES-eng: 1078
      NUMBER_OF_BYTES : 95661597
      NUMBER_OF_BYTES-eng: 95661597
      _STATISTICS_WRITING_APP: mkvmerge v8.8.0 ('Wind at my back') 64bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v8.8.0 ('Wind at my back') 64bit
      _STATISTICS_WRITING_DATE_UTC: 2016-02-08 17:01:53
      _STATISTICS_WRITING_DATE_UTC-eng: 2016-02-08 17:01:53
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:1(eng): Audio: dts (DTS-HD HRA), 96000 Hz, 5.1(side), fltp (default)
    Metadata:
      title           : DTS-HD Audio
      BPS             : 3018000
      BPS-eng         : 3018000
      DURATION        : 00:00:44.960000000
      DURATION-eng    : 00:00:44.960000000
      NUMBER_OF_FRAMES: 4215
      NUMBER_OF_FRAMES-eng: 4215
      NUMBER_OF_BYTES : 16961160
      NUMBER_OF_BYTES-eng: 16961160
      _STATISTICS_WRITING_APP: mkvmerge v8.8.0 ('Wind at my back') 64bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v8.8.0 ('Wind at my back') 64bit
      _STATISTICS_WRITING_DATE_UTC: 2016-02-08 17:01:53
      _STATISTICS_WRITING_DATE_UTC-eng: 2016-02-08 17:01:53
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
[16:56:39] scan: decoding previews for title 1
[16:56:39] scan: audio 0x1: dca, rate=96000Hz, bitrate=1 English (DTS-HD HRA) (5.1 ch)
[16:56:39] scan: 10 previews, 1920x1080, 23,976 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1
[16:56:39] libhb: scan thread found 1 valid title(s)
[16:56:39] starting job
[16:56:39] decomb filter thread started for segment 1
[16:56:39] decomb filter thread started for segment 0
[16:56:39] decomb filter thread started for segment 2
[16:56:39] decomb filter thread started for segment 4
[16:56:39] decomb filter thread started for segment 6
[16:56:39] decomb filter thread started for segment 7
[16:56:39] decomb filter thread started for segment 3
[16:56:39] decomb check thread started for segment 0
[16:56:39] decomb check thread started for segment 1
[16:56:39] decomb filter thread started for segment 5
[16:56:39] decomb check thread started for segment 2
[16:56:39] decomb check thread started for segment 4
[16:56:39] decomb check thread started for segment 5
[16:56:39] decomb check thread started for segment 6
[16:56:39] decomb check thread started for segment 7
[16:56:39] mask filter thread started for segment 0
[16:56:39] mask filter thread started for segment 1
[16:56:39] mask filter thread started for segment 3
[16:56:39] mask filter thread started for segment 2
[16:56:39] mask filter thread started for segment 4
[16:56:39] mask filter thread started for segment 5
[16:56:39] mask filter thread started for segment 6
[16:56:39] mask filter thread started for segment 7
[16:56:39] mask erode thread started for segment 0
[16:56:39] mask erode thread started for segment 1
[16:56:39] mask erode thread started for segment 2
[16:56:39] mask erode thread started for segment 3
[16:56:39] mask erode thread started for segment 4
[16:56:39] mask erode thread started for segment 5
[16:56:39] mask erode thread started for segment 6
[16:56:39] mask erode thread started for segment 7
[16:56:39] mask dilate thread started for segment 0
[16:56:39] mask dilate thread started for segment 1
[16:56:39] mask dilate thread started for segment 2
[16:56:39] mask dilate thread started for segment 3
[16:56:39] mask dilate thread started for segment 4
[16:56:39] mask dilate thread started for segment 5
[16:56:39] mask dilate thread started for segment 6
[16:56:39] mask dilate thread started for segment 7
[16:56:39] yadif thread started for segment 0
[16:56:39] yadif thread started for segment 2
[16:56:39] yadif thread started for segment 1
[16:56:39] yadif thread started for segment 3
[16:56:39] yadif thread started for segment 6
[16:56:39] yadif thread started for segment 5
[16:56:39] yadif thread started for segment 4
[16:56:39] yadif thread started for segment 7
[16:56:39] work: sanitizing track 1 unsupported samplerate 96000 Hz to 48 kHz
[16:56:39] job configuration:
[16:56:39]  * source
[16:56:39]    + /home/fprietog/Descargas/DTS-HRA5.1_VC1-23.976.mkv
[16:56:39]    + title 1, chapter(s) 1 to 1
[16:56:39]    + container: matroska,webm
[16:56:39]    + data rate: 20042 kbps
[16:56:39]  * destination
[16:56:39]    + /home/fprietog/Vídeos/DTS-HRA5.1_VC1-23.976.m4v
[16:56:39]    + container: MPEG-4 (libavformat)
[16:56:39]      + align initial A/V stream timestamps
[16:56:39]  * video track
[16:56:39]    + decoder: vc1
[16:56:39]    + filters
[16:56:39]      + 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)
[16:56:39]      + Decomb (mode=39)
[16:56:39]      + Framerate Shaper (mode=2:rate=27000000/900000)
[16:56:39]        + frame rate: 23,976 fps -> peak rate limited to 30,000 fps
[16:56:39]      + Crop and Scale (width=1920:height=1080:crop-top=0:crop-bottom=0:crop-left=0:crop-right=0)
[16:56:39]        + source: 1920 * 1080, crop (0/0/0/0): 1920 * 1080, scale: 1920 * 1080
[16:56:39]    + Output geometry
[16:56:39]      + storage dimensions: 1920 x 1080
[16:56:39]      + pixel aspect ratio: 1 : 1
[16:56:39]      + display dimensions: 1920 x 1080
[16:56:39]    + encoder: H.264 (libx264)
[16:56:39]      + preset:  fast
[16:56:39]      + profile: main
[16:56:39]      + level:   4.0
[16:56:39]      + quality: 22,00 (RF)
[16:56:39]      + color profile: 1-1-1
[16:56:39]  * audio track 1
[16:56:39]    + decoder: English (DTS-HD HRA) (5.1 ch) (track 1, id 0x1)
[16:56:39]      + samplerate: 96000 Hz
[16:56:39]    + mixdown: 5.1 Channels
[16:56:39]    + dither: triangular
[16:56:39]    + encoder: AAC (libavcodec)
[16:56:39]      + bitrate: 192 kbps, samplerate: 48000 Hz
[16:56:39] decomb check thread started for segment 3
[16:56:39] sync: expecting 1078 video frames
[16:56:39] encx264: min-keyint: 24, keyint: 240
[16:56:39] encx264: encoding at constant RF 22,000000
[16:56:39] encx264: unparsed options: level=4.0:ref=2:8x8dct=0:weightp=1:subme=6:vbv-bufsize=25000:vbv-maxrate=20000:rc-lookahead=30
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x264 [info]: profile Main, level 4.0
[16:56:39] sync: first pts video is 0
[16:56:39] sync: first pts audio 0x1 is 0
[16:56:39] sync: Chapter 1 at frame 2 time 7200
[16:57:10] reader: done. 1 scr changes
[16:57:15] work: average encoding speed for job is 32,962833 fps
[16:57:15] comb detect: heavy 0 | light 0 | uncombed 1077 | total 1077
[16:57:15] decomb: deinterlaced 0 | blended 0 | unfiltered 1077 | total 1077
[16:57:15] vfr: 1077 frames output, 0 dropped and 0 duped for CFR/PFR
[16:57:15] vfr: lost time: 0 (0 frames)
[16:57:15] vfr: gained time: 0 (0 frames) (0 not accounted for)
[16:57:15] dca-decoder done: 4215 frames, 0 decoder errors
[16:57:15] vc1-decoder done: 1077 frames, 0 decoder errors
[16:57:15] sync: got 1077 frames, 1078 expected
[16:57:15] sync: framerate min 12,500 fps, max 23,981 fps, avg 23,956 fps
x264 [info]: frame I:23    Avg QP:18,28  size:114652
x264 [info]: frame P:354   Avg QP:21,42  size: 41723
x264 [info]: frame B:700   Avg QP:22,21  size: 19345
x264 [info]: consecutive B-frames:  9,9%  9,1%  3,3% 77,6%
x264 [info]: mb I  I16..4: 39,3%  0,0% 60,7%
x264 [info]: mb P  I16..4:  6,4%  0,0%  8,4%  P16..4: 41,1% 11,5%  9,2%  0,0%  0,0%    skip:23,5%
x264 [info]: mb B  I16..4: 11,1%  0,0%  1,1%  B16..8: 25,0%  5,7%  0,4%  direct:15,2%  skip:41,6%  L0:44,5% L1:46,0% BI: 9,5%
x264 [info]: coded y,uvDC,uvAC intra: 54,8% 80,4% 44,9% inter: 15,2% 34,3% 3,8%
x264 [info]: i16 v,h,dc,p: 30% 17% 38% 14%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 25% 14% 26%  6%  7%  7%  6%  5%  3%
x264 [info]: i8c dc,h,v,p: 59% 16% 19%  5%
x264 [info]: Weighted P-Frames: Y:10,2% UV:8,2%
x264 [info]: ref P L0: 69,2% 30,8%
x264 [info]: ref B L0: 84,4% 15,6%
x264 [info]: ref B L1: 96,6%  3,4%
x264 [info]: kb/s:5507,00
[16:57:15] mux: track 0, 1077 frames, 30947475 bytes, 5501,37 kbps, fifo 512
[16:57:15] mux: track 1, 2108 frames, 1082021 bytes, 192,35 kbps, fifo 2048
[16:57:15] libhb: work result = 0
@sr55

This comment has been minimized.

Copy link
Member

sr55 commented Dec 26, 2018

Defiantly a behavioural change here between 1.1.2 and 1.2

@fprietog

This comment has been minimized.

Copy link

fprietog commented Dec 26, 2018

I just tried the oldest built available in GIT Snapshots:
https://launchpad.net/~stebbins/+archive/ubuntu/handbrake-git-snapshots/+build/15655260

That build handbrake-gtk_20181112164221-2766a27-master-zhb-1ppa1~cosmic1_amd64 got the problem so AAC audio is incorrectly mixed. So at least we know problem starts somehow between 20181019210024-0288c01 and 20181112164221-2766a27.

Unfortunately it seems that previous GIT Snapshots were deleted so I cannot backtrack more unless someone points me on how to do it.

[20:17:26] gtkgui: HandBrake 20181112164221-2766a27-master (2018111301) - Linux x86_64 - https://handbrake.fr
Cannot load libnvidia-encode.so.1
Cannot load libnvidia-encode.so.1
[20:17:26] hb_init: starting libhb thread
[20:17:26] hb_init: starting libhb thread
[20:17:26] hb_init: starting libhb thread
[20:17:26] gtkgui: Failed to read presets file, initailizing new presets...
[20:17:31] CPU: Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
[20:17:31]  - Intel microarchitecture Haswell
[20:17:31]  - logical processor count: 8
[20:17:31] hb_scan: path=/home/fprietog/Descargas/DTS-HRA5.1_VC1-23.976.mkv, title_index=0
udfread ERROR: ECMA 167 Volume Recognition failed
disc.c:323: failed opening UDF image /home/fprietog/Descargas/DTS-HRA5.1_VC1-23.976.mkv
disc.c:424: error opening file BDMV/index.bdmv
disc.c:424: error opening file BDMV/BACKUP/index.bdmv
[20:17:31] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 6.0.0
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
[20:17:31] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from '/home/fprietog/Descargas/DTS-HRA5.1_VC1-23.976.mkv':
  Metadata:
    encoder         : libebml v1.3.3 + libmatroska v1.4.4
    creation_time   : 2016-02-08T17:01:53.000000Z
  Duration: 00:00:44.96, start: 0.003000, bitrate: 20042 kb/s
    Stream #0:0: Video: vc1 (Advanced) (WVC1 / 0x31435657), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23,98 fps, 23,98 tbr, 1k tbn, 47,95 tbc (default)
    Metadata:
      BPS             : 17021257
      BPS-eng         : 17021257
      DURATION        : 00:00:44.961000000
      DURATION-eng    : 00:00:44.961000000
      NUMBER_OF_FRAMES: 1078
      NUMBER_OF_FRAMES-eng: 1078
      NUMBER_OF_BYTES : 95661597
      NUMBER_OF_BYTES-eng: 95661597
      _STATISTICS_WRITING_APP: mkvmerge v8.8.0 ('Wind at my back') 64bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v8.8.0 ('Wind at my back') 64bit
      _STATISTICS_WRITING_DATE_UTC: 2016-02-08 17:01:53
      _STATISTICS_WRITING_DATE_UTC-eng: 2016-02-08 17:01:53
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:1(eng): Audio: dts (DTS-HD HRA), 96000 Hz, 5.1(side), fltp (default)
    Metadata:
      title           : DTS-HD Audio
      BPS             : 3018000
      BPS-eng         : 3018000
      DURATION        : 00:00:44.960000000
      DURATION-eng    : 00:00:44.960000000
      NUMBER_OF_FRAMES: 4215
      NUMBER_OF_FRAMES-eng: 4215
      NUMBER_OF_BYTES : 16961160
      NUMBER_OF_BYTES-eng: 16961160
      _STATISTICS_WRITING_APP: mkvmerge v8.8.0 ('Wind at my back') 64bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v8.8.0 ('Wind at my back') 64bit
      _STATISTICS_WRITING_DATE_UTC: 2016-02-08 17:01:53
      _STATISTICS_WRITING_DATE_UTC-eng: 2016-02-08 17:01:53
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
[20:17:31] scan: decoding previews for title 1
[20:17:31] scan: audio 0x1: dca, rate=96000Hz, bitrate=1 English (DTS-HD HRA) (5.1 ch)
[20:17:32] scan: 10 previews, 1920x1080, 23,976 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1
[20:17:32] libhb: scan thread found 1 valid title(s)
[20:17:39] gtkgui: Preset: /General/Fast 1080p30
[20:17:39] 1 job(s) to process
[20:17:39] json job:
{
    "Audio": {
        "AudioList": [
            {
                "Bitrate": 192,
                "CompressionLevel": -1.0,
                "DRC": 0.0,
                "DitherMethod": "auto",
                "Encoder": "av_aac",
                "Gain": 0.0,
                "Mixdown": "5point1",
                "NormalizeMixLevel": false,
                "PresetEncoder": "av_aac",
                "Quality": -3.0,
                "Samplerate": 0,
                "Track": 0
            }
        ],
        "CopyMask": [
            "copy:aac"
        ],
        "FallbackEncoder": "av_aac"
    },
    "Destination": {
        "AlignAVStart": true,
        "ChapterList": [
            {
                "Name": ""
            }
        ],
        "ChapterMarkers": false,
        "File": "/home/fprietog/Vídeos/DTS-HRA5.1_VC1-23.976 (1).m4v",
        "InlineParameterSets": false,
        "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": 2,
                    "rate": "27000000/900000"
                }
            },
            {
                "ID": 11,
                "Settings": {
                    "crop-bottom": 0,
                    "crop-left": 0,
                    "crop-right": 0,
                    "crop-top": 0,
                    "height": 1080,
                    "width": 1920
                }
            }
        ]
    },
    "Metadata": {
        "Name": "DTS-HRA5.1_VC1-23.976"
    },
    "PAR": {
        "Den": 1,
        "Num": 1
    },
    "SequenceID": 0,
    "Source": {
        "Angle": 0,
        "Path": "/home/fprietog/Descargas/DTS-HRA5.1_VC1-23.976.mkv",
        "Range": {
            "End": 1,
            "Start": 1,
            "Type": "chapter"
        },
        "Title": 1
    },
    "Subtitle": {
        "Search": {
            "Burn": true,
            "Default": false,
            "Enable": false,
            "Forced": false
        },
        "SubtitleList": []
    },
    "Video": {
        "ColorMatrix": 1,
        "ColorPrimaries": 1,
        "ColorTransfer": 1,
        "Encoder": "x264",
        "Level": "4.0",
        "Options": "",
        "Preset": "fast",
        "Profile": "main",
        "QSV": {
            "AsyncDepth": 4,
            "Decode": false
        },
        "Quality": 22.0,
        "Tune": "",
        "Turbo": false,
        "TwoPass": false
    }
}
[20:17:39] CPU: Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
[20:17:39]  - Intel microarchitecture Haswell
[20:17:39]  - logical processor count: 8
[20:17:39] hb_scan: path=/home/fprietog/Descargas/DTS-HRA5.1_VC1-23.976.mkv, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
disc.c:323: failed opening UDF image /home/fprietog/Descargas/DTS-HRA5.1_VC1-23.976.mkv
disc.c:424: error opening file BDMV/index.bdmv
disc.c:424: error opening file BDMV/BACKUP/index.bdmv
[20:17:39] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 6.0.0
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
[20:17:39] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from '/home/fprietog/Descargas/DTS-HRA5.1_VC1-23.976.mkv':
  Metadata:
    encoder         : libebml v1.3.3 + libmatroska v1.4.4
    creation_time   : 2016-02-08T17:01:53.000000Z
  Duration: 00:00:44.96, start: 0.003000, bitrate: 20042 kb/s
    Stream #0:0: Video: vc1 (Advanced) (WVC1 / 0x31435657), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23,98 fps, 23,98 tbr, 1k tbn, 47,95 tbc (default)
    Metadata:
      BPS             : 17021257
      BPS-eng         : 17021257
      DURATION        : 00:00:44.961000000
      DURATION-eng    : 00:00:44.961000000
      NUMBER_OF_FRAMES: 1078
      NUMBER_OF_FRAMES-eng: 1078
      NUMBER_OF_BYTES : 95661597
      NUMBER_OF_BYTES-eng: 95661597
      _STATISTICS_WRITING_APP: mkvmerge v8.8.0 ('Wind at my back') 64bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v8.8.0 ('Wind at my back') 64bit
      _STATISTICS_WRITING_DATE_UTC: 2016-02-08 17:01:53
      _STATISTICS_WRITING_DATE_UTC-eng: 2016-02-08 17:01:53
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:1(eng): Audio: dts (DTS-HD HRA), 96000 Hz, 5.1(side), fltp (default)
    Metadata:
      title           : DTS-HD Audio
      BPS             : 3018000
      BPS-eng         : 3018000
      DURATION        : 00:00:44.960000000
      DURATION-eng    : 00:00:44.960000000
      NUMBER_OF_FRAMES: 4215
      NUMBER_OF_FRAMES-eng: 4215
      NUMBER_OF_BYTES : 16961160
      NUMBER_OF_BYTES-eng: 16961160
      _STATISTICS_WRITING_APP: mkvmerge v8.8.0 ('Wind at my back') 64bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v8.8.0 ('Wind at my back') 64bit
      _STATISTICS_WRITING_DATE_UTC: 2016-02-08 17:01:53
      _STATISTICS_WRITING_DATE_UTC-eng: 2016-02-08 17:01:53
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
[20:17:39] scan: decoding previews for title 1
[20:17:39] scan: audio 0x1: dca, rate=96000Hz, bitrate=1 English (DTS-HD HRA) (5.1 ch)
[20:17:40] scan: 10 previews, 1920x1080, 23,976 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1
[20:17:40] libhb: scan thread found 1 valid title(s)
[20:17:40] starting job
[20:17:40] decomb filter thread started for segment 0
[20:17:40] decomb filter thread started for segment 1
[20:17:40] decomb filter thread started for segment 2
[20:17:40] decomb filter thread started for segment 4
[20:17:40] decomb filter thread started for segment 5
[20:17:40] decomb filter thread started for segment 3
[20:17:40] decomb filter thread started for segment 6
[20:17:40] decomb filter thread started for segment 7
[20:17:40] decomb check thread started for segment 1
[20:17:40] decomb check thread started for segment 3
[20:17:40] decomb check thread started for segment 2
[20:17:40] decomb check thread started for segment 5
[20:17:40] decomb check thread started for segment 4
[20:17:40] decomb check thread started for segment 7
[20:17:40] mask filter thread started for segment 0
[20:17:40] mask filter thread started for segment 1
[20:17:40] mask filter thread started for segment 2
[20:17:40] mask filter thread started for segment 3
[20:17:40] mask filter thread started for segment 5
[20:17:40] mask filter thread started for segment 4
[20:17:40] mask filter thread started for segment 6
[20:17:40] mask filter thread started for segment 7
[20:17:40] mask erode thread started for segment 0
[20:17:40] mask erode thread started for segment 1
[20:17:40] mask erode thread started for segment 2
[20:17:40] mask erode thread started for segment 3
[20:17:40] decomb check thread started for segment 0
[20:17:40] mask erode thread started for segment 5
[20:17:40] mask dilate thread started for segment 0
[20:17:40] mask dilate thread started for segment 1
[20:17:40] mask dilate thread started for segment 2
[20:17:40] decomb check thread started for segment 6
[20:17:40] yadif thread started for segment 2
[20:17:40] yadif thread started for segment 3
[20:17:40] yadif thread started for segment 4
[20:17:40] yadif thread started for segment 5
[20:17:40] yadif thread started for segment 6
[20:17:40] yadif thread started for segment 7
[20:17:40] work: sanitizing track 1 unsupported samplerate 96000 Hz to 48 kHz
[20:17:40] yadif thread started for segment 0
[20:17:40] job configuration:
[20:17:40] mask dilate thread started for segment 4
[20:17:40] mask erode thread started for segment 4
[20:17:40] mask dilate thread started for segment 6
[20:17:40]  * source
[20:17:40]    + /home/fprietog/Descargas/DTS-HRA5.1_VC1-23.976.mkv
[20:17:40]    + title 1, chapter(s) 1 to 1
[20:17:40]    + container: matroska,webm
[20:17:40]    + data rate: 20042 kbps
[20:17:40]  * destination
[20:17:40]    + /home/fprietog/Vídeos/DTS-HRA5.1_VC1-23.976 (1).m4v
[20:17:40]    + container: MPEG-4 (libavformat)
[20:17:40]      + align initial A/V stream timestamps
[20:17:40]  * video track
[20:17:40]    + decoder: vc1
[20:17:40]    + filters
[20:17:40]      + 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)
[20:17:40]      + Decomb (mode=39)
[20:17:40]      + Framerate Shaper (mode=2:rate=27000000/900000)
[20:17:40]        + frame rate: 23,976 fps -> peak rate limited to 30,000 fps
[20:17:40]      + Crop and Scale (width=1920:height=1080:crop-top=0:crop-bottom=0:crop-left=0:crop-right=0)
[20:17:40]        + source: 1920 * 1080, crop (0/0/0/0): 1920 * 1080, scale: 1920 * 1080
[20:17:40]    + Output geometry
[20:17:40]      + storage dimensions: 1920 x 1080
[20:17:40]      + pixel aspect ratio: 1 : 1
[20:17:40]      + display dimensions: 1920 x 1080
[20:17:40]    + encoder: H.264 (libx264)
[20:17:40]      + preset:  fast
[20:17:40]      + profile: main
[20:17:40]      + level:   4.0
[20:17:40]      + quality: 22,00 (RF)
[20:17:40]      + color profile: 1-1-1
[20:17:40]  * audio track 1
[20:17:40]    + decoder: English (DTS-HD HRA) (5.1 ch) (track 1, id 0x1)
[20:17:40]      + samplerate: 96000 Hz
[20:17:40]    + mixdown: 5.1 Channels
[20:17:40]    + dither: triangular
[20:17:40]    + encoder: AAC (libavcodec)
[20:17:40]      + bitrate: 192 kbps, samplerate: 48000 Hz
[20:17:40] mask erode thread started for segment 6
[20:17:40] mask erode thread started for segment 7
[20:17:40] mask dilate thread started for segment 3
[20:17:40] sync: expecting 1078 video frames
[20:17:40] encx264: min-keyint: 24, keyint: 240
[20:17:40] encx264: encoding at constant RF 22,000000
[20:17:40] encx264: unparsed options: level=4.0:ref=2:8x8dct=0:weightp=1:subme=6:vbv-bufsize=25000:vbv-maxrate=20000:rc-lookahead=30
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[20:17:40] yadif thread started for segment 1
[20:17:40] mask dilate thread started for segment 5
[20:17:40] mask dilate thread started for segment 7
x264 [info]: profile Main, level 4.0
[20:17:40] sync: first pts video is 0
[20:17:40] sync: first pts audio 0x1 is 0
[20:17:40] sync: Chapter 1 at frame 2 time 7200
[20:18:10] reader: done. 1 scr changes
[20:18:15] work: average encoding speed for job is 34,142563 fps
[20:18:15] comb detect: heavy 0 | light 0 | uncombed 1077 | total 1077
[20:18:15] decomb: deinterlaced 0 | blended 0 | unfiltered 1077 | total 1077
[20:18:15] vfr: 1077 frames output, 0 dropped and 0 duped for CFR/PFR
[20:18:15] vfr: lost time: 0 (0 frames)
[20:18:15] vfr: gained time: 0 (0 frames) (0 not accounted for)
[20:18:15] dca-decoder done: 4215 frames, 0 decoder errors
[20:18:15] vc1-decoder done: 1077 frames, 0 decoder errors
[20:18:15] sync: got 1077 frames, 1078 expected
[20:18:15] sync: framerate min 12,500 fps, max 23,981 fps, avg 23,956 fps
x264 [info]: frame I:23    Avg QP:18,28  size:114657
x264 [info]: frame P:354   Avg QP:21,42  size: 41720
x264 [info]: frame B:700   Avg QP:22,21  size: 19348
x264 [info]: consecutive B-frames:  9,9%  9,1%  3,3% 77,6%
x264 [info]: mb I  I16..4: 39,3%  0,0% 60,7%
x264 [info]: mb P  I16..4:  6,4%  0,0%  8,4%  P16..4: 41,1% 11,5%  9,1%  0,0%  0,0%    skip:23,5%
x264 [info]: mb B  I16..4: 11,1%  0,0%  1,1%  B16..8: 25,0%  5,7%  0,4%  direct:15,2%  skip:41,5%  L0:44,5% L1:45,9% BI: 9,5%
x264 [info]: coded y,uvDC,uvAC intra: 54,8% 80,3% 44,8% inter: 15,2% 34,3% 3,8%
x264 [info]: i16 v,h,dc,p: 30% 17% 38% 14%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 25% 14% 26%  6%  7%  7%  5%  5%  3%
x264 [info]: i8c dc,h,v,p: 59% 16% 19%  5%
x264 [info]: Weighted P-Frames: Y:10,2% UV:8,2%
x264 [info]: ref P L0: 69,2% 30,8%
x264 [info]: ref B L0: 84,4% 15,6%
x264 [info]: ref B L1: 96,6%  3,4%
x264 [info]: kb/s:5507,28
[20:18:15] mux: track 0, 1077 frames, 30949080 bytes, 5501,66 kbps, fifo 512
[20:18:15] mux: track 1, 2108 frames, 1082021 bytes, 192,35 kbps, fifo 2048
[20:18:15] libhb: work result = 0
@jstebbins

This comment has been minimized.

Copy link
Contributor

jstebbins commented Dec 26, 2018

Appears to be a change introduced by ffmpeg.

Mediainfo sees original file as:
C L R Ls Rs LFE
HandBrake sees original file the same as mediainfo (with channel order changed):
L R C Ls Rs LFE
If I encode the source file to 5.1 aac and then scan the result with HandBrake, the layout HandBrake sees is:
L R C Lb Rb LFE
But scanning the same file with mediainfo sees:
L R C Cb Rls Rb

Not sure exactly what's broken here. mediainfo is fairly notorious for reporting erroneous information. But libav used to preserve Ls and Rs without converting to Lb and Rb.

@fprietog

This comment has been minimized.

Copy link

fprietog commented Dec 26, 2018

I agree we can 100% trust mediainfo, but I'm using same mediainfo version (v18.03.1) to check the three files: original + converted with both handbrake versions, and the result channel positions are different. At least is suspicious.

But anyways, the channel position is just a guess of what the problem is, and maybe it's an incorrect guess. Please, play the converted files in VLC. I'm sure you will realize that audio is broken with latest handbrake release conversion (sound scratched/scrambled). I can upload a sample of what I heard if needed.

Thanks and best regards.

@sr55

This comment has been minimized.

Copy link
Member

sr55 commented Dec 26, 2018

Please do.

I'm not getting any audio corruption here other than a bias towards the left which sounds more like a channel layout issue.

@fprietog

This comment has been minimized.

Copy link

fprietog commented Dec 26, 2018

Here is a sample:
https://mega.nz/#!Sld0AK6K!yetHh_FSJ-DfnbsNsSmvizPsRS-S9mLlAlP-cP9V2PQ

First I played ORIGINAL file.
Then I played CONVERTED file.

Sorry for video quality but I guess the most important is the audio.

@fprietog

This comment has been minimized.

Copy link

fprietog commented Dec 26, 2018

BTW: just tested the converted file with another player (GNOME Totem) and the sound is played better than with VLC: there are no scratches but all audio is played mainly in LEFT speaker.

@sr55

This comment has been minimized.

Copy link
Member

sr55 commented Dec 26, 2018

Ok, So, your seeing what I get in VLC, in Totem. SO I guess something funny going on in decoding this file too :/

@jstebbins

This comment has been minimized.

Copy link
Contributor

jstebbins commented Dec 27, 2018

FYI, I checked if this problem exists in ffmpeg git HEAD and it does. E.g.

ffmpeg -i DTS-HRA5.1_VC1-23.976.mkv -c:a aac -b:a 192 test.mkv

Produces the same channel layout problem

@fprietog

This comment has been minimized.

Copy link

fprietog commented Dec 27, 2018

Just tried ffmpeg (version 4.0.2-2 that comes with ubuntu 18.10) and as you said it have the same layout problem...

I found a workaround in the ffmpeg trac:
https://trac.ffmpeg.org/ticket/7384

The default channel layouts supported by aac encoder are:
mono, stereo, 3.0, 4.0, 5.0 and 5.1
(FC, FL+FR, FL+FR+FC, FL+FR+FC+BC, FL+FR+FC+BL+BR, FL+FR+FC+BL+BR+LFE).
If one of your layouts is one of those, they will be encoded as before.
If your layout is not one of them but is close, for instance 5.1(side), you can do as atomnuker said:
ffmpeg -channel_layout 5.1 -i input etc...

So this command works:
ffmpeg -i DTS-HRA5.1_VC1-23.976.mkv -c:a aac -b:a 192k -channel_layout 5.1 test.mkv

@jstebbins jstebbins closed this in bd4dc1d Dec 27, 2018

jstebbins added a commit that referenced this issue Dec 27, 2018

encavcodecaudio: fix AAC 5.1 encoding
Use 5.1 back for AAC because 5.1 side uses a not-so-universally
supported feature to signal the non-standard layout

Fixes #1744

(cherry picked from commit bd4dc1d)
@cehoyos

This comment has been minimized.

Copy link

cehoyos commented Dec 27, 2018

I had tried to warn you in #1520 (comment) but re-reading my comment now, I wasn't very explicit...

@jstebbins

This comment has been minimized.

Copy link
Contributor

jstebbins commented Dec 27, 2018

Thanks for pointing out that trak tickit. Problem fixed. Will be in the next nighty build

@jstebbins

This comment has been minimized.

Copy link
Contributor

jstebbins commented Dec 27, 2018

I had tried to warn you in #1520 (comment) but re-reading my comment now, I wasn't very explicit...

Right, I just didn't realize that 5.1.side was not one of the standard AAC channel maps. Easily fixed now that I know about it ;)

@cehoyos

This comment has been minimized.

Copy link

cehoyos commented Dec 27, 2018

And here a bit more detailed: #1576 (comment)

@fprietog

This comment has been minimized.

Copy link

fprietog commented Dec 27, 2018

Fantastic! I will try the next nightly build as soon as it arrives.

Thank you very much for the quick response.

@fprietog

This comment has been minimized.

Copy link

fprietog commented Dec 28, 2018

Just tested nightly build handbrake-gtk_20181227190524-bd4dc1d-master-zhb-1ppa1~cosmic1_amd64 and AAC audio conversion works OK again. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment