Crashes On Preview During Encode

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
squeedle
Posts: 26
Joined: Mon Aug 22, 2016 6:26 am

Crashes On Preview During Encode

Post by squeedle »

Description of problem or question:
While Handbrake is encoding a video and I try to preview a second encode before adding it to the queue, Handbrake crashes. Is this how the program was designed to work, or is this a bug? It's much easier for me if I can get one encode going and then prepare the next one, rather than have to wait for the first to complete before working on the next, or rather than preparing them all and adding them to the queue before starting the whole batch. I'm doing H.265 encodes in case that matters. Thanks!



Steps to reproduce the problem (If Applicable):
While an encode is running, do a preview of a second encode. H.265.



HandBrake version (e.g., 1.0.0):
Nightly 20190914125452-3e00e3b-master (2019091401)



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



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

Code: Select all

HandBrake Nightly 20190914125452-3e00e3b-master (2019091401)
OS: Microsoft Windows NT 6.1.7601 Service Pack 1
CPU: Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz
Ram: 16316 MB, 
GPU Information:
  NVIDIA GeForce GTX 750 Ti - 23.21.13.9135
Screen: 1920x1080
Temp Dir: C:\Users\usernameredacted\AppData\Local\Temp\
Install Dir: C:\Program Files\HandBrake Nightly
Data Dir: C:\Users\usernameredacted\AppData\Roaming\HandBrake\Nightly

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


# Starting Encode ...

[15:12:39] hb_init: starting libhb thread
[15:12:39] Starting work at: Sun Sep 22 15:12:39 2019
[15:12:39] 1 job(s) to process
[15:12:39] json job:
{
  "Audio": {
    "AudioList": [
      {
        "DRC": 0.0,
        "Encoder": "copy",
        "Gain": 0.0,
        "Mixdown": -1,
        "NormalizeMixLevel": false,
        "Samplerate": 0,
        "Track": 0,
        "DitherMethod": 0
      }
    ],
    "CopyMask": [
      "copy:aac",
      "copy:ac3",
      "copy:dtshd",
      "copy:dts",
      "copy:eac3",
      "copy:flac",
      "copy:mp3",
      "copy:truehd"
    ],
    "FallbackEncoder": "ac3"
  },
  "Destination": {
    "ChapterList": [
      {
        "Name": "Chapter 1"
      },
      {
        "Name": "Chapter 2"
      }
    ],
    "ChapterMarkers": true,
    "AlignAVStart": false,
    "File": "Z:\\video (Mediaserver)\\C\\California Vintage Collection-4_preview.mkv",
    "Mp4Options": {
      "IpodAtom": false,
      "Mp4Optimize": false
    },
    "Mux": "mkv"
  },
  "Filters": {
    "FilterList": [
      {
        "ID": 5,
        "Settings": {
          "mode": "3"
        }
      },
      {
        "ID": 14,
        "Settings": {
          "cb-size": 3,
          "cb-strength": 0.1,
          "y-size": 3,
          "y-strength": 0.15
        }
      },
      {
        "ID": 12,
        "Settings": {
          "crop-bottom": "0",
          "crop-left": "6",
          "crop-right": "6",
          "crop-top": "0",
          "height": "480",
          "width": "630"
        }
      },
      {
        "ID": 6,
        "Settings": {
          "mode": "1"
        }
      }
    ]
  },
  "PAR": {
    "Num": 1,
    "Den": 1
  },
  "Metadata": {},
  "SequenceID": 0,
  "Source": {
    "Angle": 1,
    "Range": {
      "Type": "preview",
      "Start": 1,
      "End": 2700000,
      "SeekPoints": 10
    },
    "Title": 4,
    "Path": "B:\\"
  },
  "Subtitle": {
    "Search": {
      "Burn": false,
      "Default": false,
      "Enable": false,
      "Forced": false
    },
    "SubtitleList": []
  },
  "Video": {
    "Encoder": "x265",
    "Level": "auto",
    "TwoPass": false,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Options": "",
    "Preset": "ultrafast",
    "Profile": "auto",
    "Quality": 15.0,
    "QSV": {
      "Decode": false,
      "AsyncDepth": 0
    }
  }
}
[15:12:39] CPU: Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz
[15:12:39]  - Intel microarchitecture Skylake
[15:12:39]  - logical processor count: 8
[15:12:39] Intel Quick Sync Video support: no
[15:12:39] hb_scan: path=B:\, title_index=4
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
[15:12:39] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 6.0.0
libdvdread: Encrypted DVD support unavailable.
libdvdread: Can't open B:\ for reading
libdvdread: Device B:\ inaccessible, CSS authentication not available.
libdvdnav: Unable to open device file B:\.
libdvdnav: vm: dvd_read_name failed
libdvdnav: DVD disk reports itself with Region mask 0x00400000. Regions: 1 2 3 4 5 6 8
libdvdread: Encrypted DVD support unavailable.
libdvdread: Can't open B:\ for reading
libdvdread: Device B:\ inaccessible, CSS authentication not available.
[15:12:39] scan: DVD has 5 title(s)
[15:12:39] scan: scanning title 4
[15:12:39] scan: duration is 00:29:38 (1778967 ms)
[15:12:39] pgc_id: 1, pgn: 1: pgc: 0000000046DFE440
[15:12:39] scan: checking audio 1
[15:12:39] scan: id=0x80bd, lang=Any (AC3), 3cc=any ext=0
[15:12:39] scan: title 4 has 2 chapters
[15:12:39] scan: chap 1, 1773000 ms
[15:12:39] scan: chap 2, 5967 ms
[15:12:39] scan: aspect = 4:3
[15:12:39] scan: decoding previews for title 4
libdvdnav: DVD disk reports itself with Region mask 0x00400000. Regions: 1 2 3 4 5 6 8
[15:12:39] scan: title angle(s) 1
[15:12:39] scan: audio 0x80bd: ac3, rate=48000Hz, bitrate=192000 Any (AC3) (2.0 ch) (192 kbps)
[15:12:40] scan: 10 previews, 720x480, 29.970 fps, autocrop = 0/0/6/6, aspect 4:3, PAR 8:9
[15:12:40] libhb: scan thread found 1 valid title(s)
[15:12:40] Starting Task: Encoding Pass
[15:12:40] MTFrame thread started for segment 1
[15:12:40] MTFrame thread started for segment 0
[15:12:40] MTFrame thread started for segment 5
[15:12:40] MTFrame thread started for segment 6
[15:12:40] MTFrame thread started for segment 4
[15:12:40] MTFrame thread started for segment 3
[15:12:40] MTFrame thread started for segment 2
[15:12:40] MTFrame thread started for segment 7
[15:12:40] Auto Passthru: allowed codecs are AAC, AC3, E-AC3, TrueHD, DTS, DTS-HD, MP3, FLAC
[15:12:40] Auto Passthru: fallback is AC3
[15:12:40] Auto Passthru: using AC3 Passthru for track 1
[15:12:40] job configuration:
[15:12:40]  * source
[15:12:40]    + B:\
[15:12:40]    + title 4, start 00:00:0.00 stop 00:00:30.00
[15:12:40]  * destination
[15:12:40]    + Z:\video (Mediaserver)\C\California Vintage Collection-4_preview.mkv
[15:12:40]    + container: Matroska (libavformat)
[15:12:40]      + chapter markers
[15:12:40]  * video track
[15:12:40]    + decoder: mpeg2video
[15:12:40]      + bitrate 200 kbps
[15:12:40]    + filters
[15:12:40]      + Deinterlace (mode=3)
[15:12:40]      + Framerate Shaper (mode=1)
[15:12:40]        + frame rate: 29.970 fps -> constant 29.970 fps
[15:12:40]      + Crop and Scale (width=630:height=480:crop-top=0:crop-bottom=0:crop-left=6:crop-right=6)
[15:12:40]        + source: 720 * 480, crop (0/0/6/6): 708 * 480, scale: 630 * 480
[15:12:40]      + Sharpen (unsharp) (y-strength=0.15:y-size=3:cb-strength=0.1:cb-size=3)
[15:12:40]    + Output geometry
[15:12:40]      + storage dimensions: 630 x 480
[15:12:40]      + pixel aspect ratio: 1 : 1
[15:12:40]      + display dimensions: 630 x 480
[15:12:40]    + encoder: H.265 (libx265)
[15:12:40]      + preset:  ultrafast
[15:12:40]      + profile: auto
[15:12:40]      + level:   auto
[15:12:40]      + quality: 15.00 (RF)
[15:12:40]      + color profile: 6-6-6
[15:12:40]  * audio track 1
[15:12:40]    + decoder: Any (AC3) (2.0 ch) (192 kbps) (track 1, id 0x80bd)
[15:12:40]      + bitrate: 192 kbps, samplerate: 48000 Hz
[15:12:40]    + AC3 Passthru
libdvdnav: Using dvdnav version 6.0.0
libdvdread: Encrypted DVD support unavailable.
libdvdread: Can't open B:\ for reading
libdvdread: Device B:\ inaccessible, CSS authentication not available.
libdvdnav: Unable to open device file B:\.
libdvdnav: vm: dvd_read_name failed
libdvdnav: DVD disk reports itself with Region mask 0x00400000. Regions: 1 2 3 4 5 6 8
libdvdread: Encrypted DVD support unavailable.
libdvdread: Can't open B:\ for reading
libdvdread: Device B:\ inaccessible, CSS authentication not available.
libdvdnav: DVD disk reports itself with Region mask 0x00400000. Regions: 1 2 3 4 5 6 8
[15:12:40] sync: expecting 929 video frames
x265 [info]: HEVC encoder version 3.1.2+1-76650bab70f9
x265 [info]: build info [Windows][GCC 8.3.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-3 (Main tier)
x265 [info]: Thread pool created using 8 threads
x265 [info]: Slices                              : 1
x265 [info]: frame threads / pool features       : 3 / wpp(15 rows)
x265 [warning]: Source height < 720p; disabling lookahead-slices
x265 [info]: Coding QT: max CU size, min CU size : 32 / 16
x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
x265 [info]: ME / range / subpel / merge         : dia / 57 / 0 / 2
x265 [info]: Keyframe min / max / scenecut / bias: 30 / 300 / 0 / 5.00
x265 [info]: Lookahead / bframes / badapt        : 5 / 3 / 0
x265 [info]: b-pyramid / weightp / weightb       : 1 / 0 / 0
x265 [info]: References / ref-limit  cu / depth  : 1 / off / off
x265 [info]: AQ: mode / str / qg-size / cu-tree  : 1 / 0.0 / 32 / 1
x265 [info]: Rate Control / qCompress            : CRF-15.0 / 0.60
x265 [info]: tools: rd=2 psy-rd=2.00 early-skip rskip tmvp fast-intra
x265 [info]: tools: strong-intra-smoothing deblock
[15:12:41] sync: first pts audio 0x80bd is 0
[15:12:41] sync: first pts video is 13005
[15:12:41] sync: "Chapter 1" (1) at frame 1 time 13005

Woodstock
Veteran User
Posts: 3367
Joined: Tue Aug 27, 2013 6:39 am

Re: Crashes On Preview During Encode

Post by Woodstock »

There was a comment a while back about x265 not being re-entrant, i.e., it cannot handle doing two things at the same time. What you're trying to do would cause a single handbrake instance to attempt two encodes at the same time.

I do not know if that was supposed to be fixed in the current (nightly) version or not.

squeedle
Posts: 26
Joined: Mon Aug 22, 2016 6:26 am

Re: Crashes On Preview During Encode

Post by squeedle »

Thanks for the reply. All I can say is it wasn't fixed as of a few days ago when I downloaded the most recent one. Is there any way to be updated when this is fixed?

User avatar
Ritsuka
HandBrake Team
Posts: 1107
Joined: Fri Jan 12, 2007 11:29 am

Re: Crashes On Preview During Encode

Post by Ritsuka »

It has not been fixed yet.

Woodstock
Veteran User
Posts: 3367
Joined: Tue Aug 27, 2013 6:39 am

Re: Crashes On Preview During Encode

Post by Woodstock »

As for notifications, this falls under the heading "upstream enhancement", and is out of the hands of the handbrake team.

A work-around would be to temporarily specify x264 as encoder when doing the preview, and change it back to x265 when you add the file to the queue.

User avatar
s55
HandBrake Team
Posts: 9696
Joined: Sun Dec 24, 2006 1:05 pm

Re: Crashes On Preview During Encode

Post by s55 »

I'll need to check where the crash is, but I may be able to just disable previews in this instance to prevent it falling over.

Woodstock
Veteran User
Posts: 3367
Joined: Tue Aug 27, 2013 6:39 am

Re: Crashes On Preview During Encode

Post by Woodstock »

There was a ticket on this from 11/2018 that had a commit to separate the tasks on the Mac GUI; commit in August. Supposedly, at that time, the preview worked in WinGUI, but not Mac, but this report would indicate otherwise.

Edit: found it

squeedle
Posts: 26
Joined: Mon Aug 22, 2016 6:26 am

Re: Crashes On Preview During Encode

Post by squeedle »

So the solution was to "move queue process to another task", but I guess that solution got broken or something since then?

Woodstock
Veteran User
Posts: 3367
Joined: Tue Aug 27, 2013 6:39 am

Re: Crashes On Preview During Encode

Post by Woodstock »

The commit in that item was to the Mac GUI, and it would not apply to the Windows GUI.

The original report said Windows didn't crash under the same test. That may be a "circumstantial" thing, that is, it didn't crash, but it may not have worked, either.

squeedle
Posts: 26
Joined: Mon Aug 22, 2016 6:26 am

Re: Crashes On Preview During Encode

Post by squeedle »

I can't say for sure, but I'm pretty sure it didn't use to crash. But that was a long time ago and I have no idea which nightly build that would have been. I will use your suggestion of H.264 for preview and H.265 for encode, but it would be really nice if this could be fixed. Thanks regardless.

ITgreybeard
Regular User
Posts: 81
Joined: Tue Feb 11, 2014 3:47 pm

Re: Crashes On Preview During Encode

Post by ITgreybeard »

Has someone thought of 'pausing' a running encode in order to accomplish the preview?

squeedle
Posts: 26
Joined: Mon Aug 22, 2016 6:26 am

Re: Crashes On Preview During Encode

Post by squeedle »

i THINK I tried that and it still crashed.

Lammasu
Posts: 1
Joined: Thu Oct 10, 2019 7:34 am

Re: Crashes On Preview During Encode

Post by Lammasu »

Maybe try again if yu are not sure. Had the same issue recently and it worked for me (the pausing I mean)

Post Reply