Handbrake is crashing when transcoding a special movie with stero mixdown

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
AndreiP
Posts: 20
Joined: Thu Nov 02, 2017 4:54 pm

Handbrake is crashing when transcoding a special movie with stero mixdown

Post by AndreiP »

Cross posting: bug tracker is here, so we can use the forum for any discussion which didn´t fit Github.

Description of problem or question
I have a movie (which play fine in VLC, MPV ...), where handbrake (latest stable e.g. 1.0.7 and as well as latest nightly from today) are crashing. I nailed it down to a special section from a movie and will provide that section, so you can reproduce the issue and hopefully fix that with my sample. I also nailed it down to the audio part, as the whole movie (and my sample) could be transcoded without any issues if I leave out the audio. The whole movie also can be transcoded if you do not use stereo as mixdown (e.g. keep that on dolby pro logic II), it only crashed on the stereo mixdown.

Sample to reproduce the crash

(The following URLs should host the same file)
http://www116.zippyshare.com/v/WAq0ylHt/file.html
https://ufile.io/t86pu
http://www.embedupload.com/?d=5VQYRXGGYO
https://www.mirrorcreator.com/files/1VC ... .mkv_links

Steps to reproduce the problem (If Applicable)
  • Start Handbrake (nightly or Stable)
  • Load the movie sample I provided
  • Choose H.265 MKV 1080p30
  • Switch to the audio tab
  • Switch the mixdown from "Dolby Pro Logic II" to "Stereo"
  • choose an output file e.g. crash.mkv
  • Start the encoding
  • after around 20sec (depending on the PCs I tried so far) Handbrake will crash
HandBrake version (e.g., 1.0.0)
  • Handbrake Nightly (from today)
  • Handbrake Stable (1.0.7)
Operating system and version (e.g., Ubuntu 16.04 LTS, macOS 10.3 High Sierra, Windows 10 Creators Update)

Windows 7 SP1

Error message text or screenshot (If Applicable)

N/A

Provide a URL from any image hosting site.

N/A

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

Code: Select all

HandBrake Nightly 20180131214747-daf0049-master (2018020301) - 64bit
OS: Microsoft Windows NT 6.1.7601 Service Pack 1 - 64bit
CPU: Intel(R) Core(TM) i7-4600U CPU @ 2.10GHz
Ram: 16185 MB, 
GPU Information:
  Intel(R) HD Graphics Family - 10.18.14.4432
Screen: 1920x1080
Temp Dir: C:\Users\andreip\AppData\Local\Temp\
Install Dir: C:\Program Files\HandBrake Nightly
Data Dir: C:\Users\andreip\AppData\Roaming\HandBrake Team\HandBrake\1.1.0.0

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


# Starting Encode ...

[13:31:03] hb_init: starting libhb thread
[13:31:03] thread 9d62c0 started ("libhb")
[13:31:03] thread 9e2830 started ("work")
[13:31:03] 1 job(s) to process
[13:31:03] json job:
{
  "Audio": {
    "AudioList": [
      {
        "Bitrate": 160,
        "DRC": 0.0,
        "Encoder": 65536,
        "Gain": 0.0,
        "Mixdown": 4,
        "NormalizeMixLevel": false,
        "Samplerate": 0,
        "Track": 0,
        "DitherMethod": 0
      }
    ],
    "CopyMask": [
      1073807360,
      1073743872,
      1074003968,
      1073750016,
      1090519040,
      1074790400,
      1074266112,
      1107296256
    ],
    "FallbackEncoder": 2048
  },
  "Destination": {
    "ChapterList": [
      {
        "Name": "Chapter 1"
      }
    ],
    "ChapterMarkers": true,
    "AlignAVStart": false,
    "File": "C:\\000HBCrashRepoCase\\output.mkv",
    "Mp4Options": {
      "IpodAtom": false,
      "Mp4Optimize": false
    },
    "Mux": 2097152
  },
  "Filters": {
    "FilterList": [
      {
        "ID": 4,
        "Settings": {
          "mode": "7"
        }
      },
      {
        "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": 11,
        "Settings": {
          "crop-bottom": "0",
          "crop-left": "0",
          "crop-right": "0",
          "crop-top": "0",
          "height": "1080",
          "width": "1920"
        }
      },
      {
        "ID": 6,
        "Settings": {
          "mode": "2",
          "rate": "27000000/900000"
        }
      }
    ]
  },
  "PAR": {
    "Num": 1,
    "Den": 1
  },
  "Metadata": {},
  "SequenceID": 0,
  "Source": {
    "Angle": 1,
    "Range": {
      "Type": "chapter",
      "Start": 1,
      "End": 1
    },
    "Title": 1,
    "Path": "C:\\000HBCrashRepoCase\\InputFile_which_will_crash_handbrake.mkv"
  },
  "Subtitle": {
    "Search": {
      "Burn": true,
      "Default": false,
      "Enable": true,
      "Forced": true
    },
    "SubtitleList": []
  },
  "Video": {
    "Encoder": 4096,
    "Level": "auto",
    "TwoPass": false,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Options": "strong-intra-smoothing=0:rect=0",
    "Preset": "slow",
    "Profile": "main",
    "Quality": 22.0,
    "HWDecode": false,
    "QSV": {
      "Decode": false,
      "AsyncDepth": 0
    }
  }
}
[13:31:03] CPU: Intel(R) Core(TM) i7-4600U CPU @ 2.10GHz
[13:31:03]  - Intel microarchitecture Haswell
[13:31:03]  - logical processor count: 4
[13:31:03] Intel Quick Sync Video support: yes
[13:31:03]  - Intel Media SDK hardware: API 1.17 (minimum: 1.3)
[13:31:03]  - H.264 encoder: yes
[13:31:03]     - preferred implementation: hardware (any) via D3D11
[13:31:03]     - capabilities (hardware):  breftype vsinfo opt1 opt2+mbbrc+extbrc+trellis+ib_adapt+nmpslice
[13:31:03]  - H.265 encoder: no
[13:31:03] hb_scan: path=C:\000HBCrashRepoCase\InputFile_which_will_crash_handbrake.mkv, title_index=1
[13:31:03] thread 95e130 started ("scan")
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:323: failed opening UDF image C:\000HBCrashRepoCase\InputFile_which_will_crash_handbrake.mkv
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
[13:31:03] bd: not a bd - trying as a stream/file instead
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.BUP.
[13:31:03] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from 'C:\000HBCrashRepoCase\InputFile_which_will_crash_handbrake.mkv':
  Duration: 00:00:10.03, start: 0.000000, bitrate: N/A
    Stream #0:0(eng): Video: h264 (High)
      yuv420p, tv, bt709/bt709/bt709
      1920x1080 [PAR 1:1 DAR 16:9], PAR 1:1 DAR 16:9
      23.98 fps, 1k tbn (default)
    Metadata:
      BPS             : 12204777
      BPS-eng         : 12204777
      DURATION        : 00:00:10.011000000
      DURATION-eng    : 00:00:10.011000000
      NUMBER_OF_FRAMES: 240
      NUMBER_OF_FRAMES-eng: 240
      NUMBER_OF_BYTES : 15272754
      NUMBER_OF_BYTES-eng: 15272754
      _STATISTICS_WRITING_APP: mkvmerge v20.0.0 ('I Am The Sun') 64-bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v20.0.0 ('I Am The Sun') 64-bit
      _STATISTICS_WRITING_DATE_UTC: 2018-02-03 11:51:03
      _STATISTICS_WRITING_DATE_UTC-eng: 2018-02-03 11:51:03
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:1(ger): Audio: dts (DTS)
      48000 Hz, 5.1, fltp, 1536 kb/s (default)
    Metadata:
      BPS             : 1509393
      BPS-eng         : 1509393
      DURATION        : 00:00:10.016000000
      DURATION-eng    : 00:00:10.016000000
      NUMBER_OF_FRAMES: 939
      NUMBER_OF_FRAMES-eng: 939
      NUMBER_OF_BYTES : 1889761
      NUMBER_OF_BYTES-eng: 1889761
      _STATISTICS_WRITING_APP: mkvmerge v20.0.0 ('I Am The Sun') 64-bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v20.0.0 ('I Am The Sun') 64-bit
      _STATISTICS_WRITING_DATE_UTC: 2018-02-03 11:51:03
      _STATISTICS_WRITING_DATE_UTC-eng: 2018-02-03 11:51:03
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:2(eng): Audio: eac3
      48000 Hz, 5.1, fltp, 640 kb/s
    Metadata:
      BPS             : 640000
      BPS-eng         : 640000
      DURATION        : 00:00:10.016000000
      DURATION-eng    : 00:00:10.016000000
      NUMBER_OF_FRAMES: 313
      NUMBER_OF_FRAMES-eng: 313
      NUMBER_OF_BYTES : 801280
      NUMBER_OF_BYTES-eng: 801280
      _STATISTICS_WRITING_APP: mkvmerge v20.0.0 ('I Am The Sun') 64-bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v20.0.0 ('I Am The Sun') 64-bit
      _STATISTICS_WRITING_DATE_UTC: 2018-02-03 11:51:03
      _STATISTICS_WRITING_DATE_UTC-eng: 2018-02-03 11:51:03
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
[13:31:03] Found ffmpeg 0 chapters, container=matroska,webm
[13:31:03] scan: decoding previews for title 1
[13:31:03] scan: preview 1
[13:31:03] fifo_close: trashing 0 buffer(s)
[13:31:03] scan: audio 0x1: dca, rate=48000Hz, bitrate=1536000 Deutsch (DTS) (5.1 ch)
[13:31:03] fifo_close: trashing 0 buffer(s)
[13:31:03] scan: audio 0x2: eac3, rate=48000Hz, bitrate=640000 English (E-AC3) (5.1 ch)
[13:31:04] scan: preview 2
[13:31:04] scan: preview 3
[13:31:04] scan: preview 4
[13:31:04] scan: preview 5
[13:31:04] scan: preview 6
[13:31:04] scan: preview 7
[13:31:04] scan: preview 8
[13:31:04] scan: preview 9
[13:31:05] scan: preview 10
[13:31:05] scan: 10 previews, 1920x1080, 23.976 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1
[13:31:05] scan: supported video decoders: avcodec qsv
[13:31:05] Freed 1 buffers of size 2048
[13:31:05] Freed 1 buffers of size 4096
[13:31:05] Freed 1 buffers of size 32768
[13:31:05] Freed 1 buffers of size 65536
[13:31:05] Freed 1 buffers of size 131072
[13:31:05] Freed 1 buffers of size 262144
[13:31:05] Freed 1 buffers of size 524288
[13:31:05] Freed 2 buffers of size 4194304
[13:31:05] Freed 1 buffers of size 8388608
[13:31:05] Allocated 17799168 bytes of buffers on this pass and Freed 17799168 bytes, 0 bytes leaked
[13:31:05] thread 95e130 exited ("scan")
[13:31:05] thread 95e130 joined ("scan")
[13:31:05] libhb: scan thread found 1 valid title(s)
[13:31:05] Adding subtitle scan pass
[13:31:05] Skipping subtitle scan.  No suitable subtitle tracks.
[13:31:05] starting job
[13:31:05] thread 95e130 started ("decomb_filter_segment")
[13:31:05] thread 95e2f0 started ("decomb_filter_segment")
[13:31:05] decomb filter thread started for segment 0
[13:31:05] decomb filter thread started for segment 1
[13:31:05] thread 95e4b0 started ("decomb_filter_segment")
[13:31:05] decomb filter thread started for segment 2
[13:31:05] thread 95e670 started ("decomb_filter_segment")
[13:31:05] decomb filter thread started for segment 3
[13:31:05] thread 95e830 started ("decomb_check_segment")
[13:31:05] decomb check thread started for segment 0
[13:31:05] thread 95e9f0 started ("decomb_check_segment")
[13:31:05] decomb check thread started for segment 1
[13:31:05] thread 95ebb0 started ("decomb_check_segment")
[13:31:05] decomb check thread started for segment 2
[13:31:05] thread 95ed70 started ("decomb_check_segment")
[13:31:05] decomb check thread started for segment 3
[13:31:05] thread 95ef30 started ("mask_filter_segment")
[13:31:05] mask filter thread started for segment 0
[13:31:05] thread 95aad0 started ("mask_filter_segment")
[13:31:05] mask filter thread started for segment 1
[13:31:05] thread 95ac90 started ("mask_filter_segment")
[13:31:05] mask filter thread started for segment 2
[13:31:05] thread 95ae50 started ("mask_filter_segment")
[13:31:05] mask filter thread started for segment 3
[13:31:05] thread 95b010 started ("mask_erode_segment")
[13:31:05] mask erode thread started for segment 0
[13:31:05] thread 95b1d0 started ("mask_erode_segment")
[13:31:05] mask erode thread started for segment 1
[13:31:05] thread 95b390 started ("mask_erode_segment")
[13:31:05] thread 95b550 started ("mask_erode_segment")
[13:31:05] mask erode thread started for segment 2
[13:31:05] mask erode thread started for segment 3
[13:31:05] thread 95b710 started ("mask_dilate_segment")
[13:31:05] mask dilate thread started for segment 0
[13:31:05] thread 95b8d0 started ("mask_dilate_segment")
[13:31:05] mask dilate thread started for segment 1
[13:31:05] thread 99caf0 started ("mask_dilate_segment")
[13:31:05] mask dilate thread started for segment 2
[13:31:05] thread 99ccb0 started ("mask_dilate_segment")
[13:31:05] mask dilate thread started for segment 3
[13:31:05] thread 99d030 started ("yadif_filter_segment")
[13:31:05] yadif thread started for segment 0
[13:31:05] thread 99d1f0 started ("yadif_filter_segment")
[13:31:05] yadif thread started for segment 1
[13:31:05] thread 99d3b0 started ("yadif_filter_segment")
[13:31:05] yadif thread started for segment 2
[13:31:05] thread 99d570 started ("yadif_filter_segment")
[13:31:05] yadif thread started for segment 3
[13:31:05] work: track 1, dithering not supported by codec
[13:31:05] work: only 1 chapter, disabling chapter markers
[13:31:05] job configuration:
[13:31:05]  * source
[13:31:05]    + C:\000HBCrashRepoCase\InputFile_which_will_crash_handbrake.mkv
[13:31:05]    + title 1, chapter(s) 1 to 1
[13:31:05]    + container: matroska,webm
[13:31:05]  * destination
[13:31:05]    + C:\000HBCrashRepoCase\output.mkv
[13:31:05]    + container: Matroska (libavformat)
[13:31:05]  * video track
[13:31:05]    + decoder: h264
[13:31:05]    + filters
[13:31:05]      + 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)
[13:31:05]      + Decomb (mode=39)
[13:31:05]      + Framerate Shaper (mode=2:rate=27000000/900000)
[13:31:05]        + frame rate: 23.976 fps -> peak rate limited to 30.000 fps
[13:31:05]      + Crop and Scale (width=1920:height=1080:crop-top=0:crop-bottom=0:crop-left=0:crop-right=0)
[13:31:05]        + source: 1920 * 1080, crop (0/0/0/0): 1920 * 1080, scale: 1920 * 1080
[13:31:05]    + Output geometry
[13:31:05]      + storage dimensions: 1920 x 1080
[13:31:05]      + pixel aspect ratio: 1 : 1
[13:31:05]      + display dimensions: 1920 x 1080
[13:31:05]    + encoder: H.265 (libx265)
[13:31:05]      + preset:  slow
[13:31:05]      + options: strong-intra-smoothing=0:rect=0
[13:31:05]      + profile: main
[13:31:05]      + quality: 22.00 (RF)
[13:31:05]  * audio track 1
[13:31:05]    + decoder: Deutsch (DTS) (5.1 ch) (track 1, id 0x1)
[13:31:05]      + bitrate: 1536 kbps, samplerate: 48000 Hz
[13:31:05]    + mixdown: Stereo
[13:31:05]    + encoder: AAC (libavcodec)
[13:31:05]      + bitrate: 160 kbps, samplerate: 48000 Hz
[13:31:05] sync: expecting 240 video frames
[13:31:05] thread 2a90d280 started ("Audio Synchronization")
x265 [info]: HEVC encoder version 2.6
x265 [info]: build info [Windows][GCC 7.1.0][64 bit] 8bit+10bit+12bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x265 [info]: Main profile, Level-4 (Main tier)
x265 [info]: Thread pool created using 4 threads
x265 [info]: Slices                              : 1
x265 [info]: frame threads / pool features       : 2 / wpp(17 rows)
x265 [info]: Coding QT: max CU size, min CU size : 64 / 8
x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
x265 [info]: ME / range / subpel / merge         : star / 57 / 3 / 3
x265 [info]: Keyframe min / max / scenecut / bias: 24 / 240 / 40 / 5.00
x265 [info]: Lookahead / bframes / badapt        : 25 / 4 / 2
x265 [info]: b-pyramid / weightp / weightb       : 1 / 1 / 0
x265 [info]: References / ref-limit  cu / depth  : 4 / on / on
x265 [info]: AQ: mode / str / qg-size / cu-tree  : 1 / 1.0 / 32 / 1
x265 [info]: Rate Control / qCompress            : CRF-22.0 / 0.60
x265 [info]: tools: limit-modes rd=4 psy-rd=2.00 rdoq=2 psy-rdoq=1.00 rskip
x265 [info]: tools: signhide tmvp lslices=4 deblock sao
[13:31:05] Writing Metadata to output file...
[13:31:05] thread 2a923220 started ("Muxer")
[13:31:05] thread 2a9233e0 started ("Reader")
[13:31:05] thread 2a9235a0 started ("Audio decoder (libavcodec)")
[13:31:05] ffmpeg_read starting chapter 1 at 0
[13:31:05] thread 1d42b0c0 started ("Video decoder (libavcodec)")
[13:31:05] thread 1d42b280 started ("Video Synchronization")
[13:31:05] thread 1d42b440 started ("AVCodec Audio encoder (libavcodec)")
[13:31:05] thread 1d42b600 started ("H.265/HEVC encoder (libx265)")
[13:31:05] thread 1d42b7c0 started ("Muxer")
[13:31:05] thread 1d42b980 started ("Comb Detect")
[13:31:05] thread 1d42bb40 started ("Decomb")
[13:31:05] thread 1d42bd00 started ("Framerate Shaper")
[13:31:05] thread 1d42bec0 started ("Crop and Scale")
[13:31:05] sync: first pts video is 0
[13:31:05] sync: "Chapter 1" (1) at frame 1 time 0
[13:31:05] sync: first pts audio 0x1 is 90
[code]
video.baba
Novice
Posts: 59
Joined: Sun May 24, 2015 11:12 am

Re: Handbrake is crashing when transcoding a special movie with stero mixdown

Post by video.baba »

I just downloaded your sample and followed your instructions exactly, yes, it died.
Deleted User 11865

Re: Handbrake is crashing when transcoding a special movie with stero mixdown

Post by Deleted User 11865 »

What happens if you use another audio encoder instead of libavcodec AAC?
AndreiP
Posts: 20
Joined: Thu Nov 02, 2017 4:54 pm

Re: Handbrake is crashing when transcoding a special movie with stero mixdown

Post by AndreiP »

@video.baba
thanks for the check. Really appreciated, then I know its not affecting only my PCs.

@Rodeo
Feel free to play with my sample as you might be able to run some more specified tests. So far I tried:
(Same settings as above but) -> Coded: AAC -> Mixdown: Stereo --> Crash (as initially reported)
(Same settings as above but) -> Coded: MP3 -> Mixdown: Stereo --> Crash
(Same settings as above but) -> Coded: AC3 -> Mixdown: Stereo --> OK, no crash
(Same settings as above but) -> Coded: Vorbis -> Mixdown: Stereo --> OK, no crash
(Same settings as above but) -> Coded: AAC -> Mixdown: Dolby Sorround --> OK, no crash
(Same settings as above but) -> Coded: AAC -> Mixdown: Dolby Pro Logic II --> OK, no crash
(Same settings as above but) -> Coded: MP3 -> Mixdown: Dolby Pro Logic II --> OK, no crash
If you need some more tests let me know what I should run.
Post Reply