CLI keeps crashing on Windows

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
spongemike
Posts: 13
Joined: Tue Jun 10, 2014 4:05 am

CLI keeps crashing on Windows

Post by spongemike »

I've been trying to batch-encode the ripped season 1 discs of Dexter, yet HandBrakeCLI.exe (for Windows) keeps crashing.

It's not 100% repro, but approximately 50% of the time it crashes, right at startup. I can run the same command again and again and again, and about half the time it crashes, half the time it doesn't.

I've played with tons of command-line options, but they don't seem to have an effect. Running in the GUI never seems to crash, though.

Here's the original command line I was using:

Code: Select all

HandBrakeCLI.exe --cfr -e x264 --x264-tune film -x level=4.1:ref=4 --strict-anamorphic --x264-preset slow --x264-profile high -q 20 -a 0 -aencoder faac --ab 160 --gain 6 -i F:\Video\ToEncode\Dexter\DEXTER_S1_D2\title03.mkv -o g:\video\DEXTER_S1_D2_E09.mp4 --verbose 10 --main-feature --markers --large-file
As I mentioned, none of these optioned appear to make a difference. I still get a 50% crash.

If there was an issue with the source content... wouldn't it crash 100% of the time?

Well, I can't batch process these if it crashes, because I get a dialog I have to click in order for the script to continue.

What can I do?

Thanks in advance for any help.

More info:
Win 8.1 Pro, x64
32 GB RAM
Intel Core i7-2600K CPU @ 3.40GHz

Thanks again.
spongemike
Posts: 13
Joined: Tue Jun 10, 2014 4:05 am

Re: CLI keeps crashing on Windows

Post by spongemike »

Here's the contents of the "activity" log (i.e., the stderr).

Code: Select all

[20:21:37] hb_init: starting libhb thread
HandBrake 0.9.9 (2013052900) - MinGW x86_64 - http://handbrake.fr
8 CPUs detected
Opening F:\Video\ToEncode\Dexter\DEXTER_S1_D2\title03.mkv...
[20:21:37] hb_scan: path=F:\Video\ToEncode\Dexter\DEXTER_S1_D2\title03.mkv, title_index=0
libbluray/bdnav/index_parse.c:162: indx_parse(): error opening F:\Video\ToEncode\Dexter\DEXTER_S1_D2\title03.mkv/BDMV/index.bdmv
libbluray/bdnav/index_parse.c:162: indx_parse(): error opening F:\Video\ToEncode\Dexter\DEXTER_S1_D2\title03.mkv/BDMV/BACKUP/index.bdmv
libbluray/bluray.c:1725: nav_get_title_list(F:\Video\ToEncode\Dexter\DEXTER_S1_D2\title03.mkv) failed (0000000001BDA930)
[20:21:37] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 4.1.3
libdvdread: Encrypted DVD support unavailable.
libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdnav: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:21:37] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from 'F:\Video\ToEncode\Dexter\DEXTER_S1_D2\title03.mkv':
  Duration: 00:53:39.21, start: 0.000000, bitrate: N/A
    Chapter #0.0: start 0.000000, end 193.893700
    Metadata:
      title           : Chapter 01
    Chapter #0.1: start 193.893700, end 879.678800
    Metadata:
      title           : Chapter 02
    Chapter #0.2: start 879.678800, end 1364.629933
    Metadata:
      title           : Chapter 03
    Chapter #0.3: start 1364.629933, end 1981.446133
    Metadata:
      title           : Chapter 04
    Chapter #0.4: start 1981.446133, end 2726.223500
    Metadata:
      title           : Chapter 05
    Chapter #0.5: start 2726.223500, end 3173.870700
    Metadata:
      title           : Chapter 06
    Chapter #0.6: start 3173.870700, end 3219.216000
    Metadata:
      title           : Chapter 07
    Stream #0.0(eng): Video: mpeg2video (Main), yuv420p, 720x480 [PAR 32:27 DAR 16:9], 7500 kb/s, PAR 186:157 DAR 279:157, 29.97 fps, 29.97 tbr, 1k tbn, 59.94 tbc
    Stream #0.1(eng): Audio: ac3, 48000 Hz, 5.1, fltp, 448 kb/s (default)
    Metadata:
      title           : Surround 5.1
[20:21:37] scan: decoding previews for title 1
[20:21:37] scan: audio 0x1: AC-3, rate=48000Hz, bitrate=448000 English (AC3) (5.1 ch)
[20:21:37] scan: 10 previews, 720x480, 29.970 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 32:27
[20:21:37] libhb: scan thread found 1 valid title(s)
Searching for main feature title...
 + Title (0) index 1 has length 3219sec
Found main feature title, setting title to 1
+ title 1:
  + stream: F:\Video\ToEncode\Dexter\DEXTER_S1_D2\title03.mkv
  + duration: 00:53:39
  + size: 720x480, pixel aspect: 32/27, display aspect: 1.78, 29.970 fps
  + autocrop: 0/0/0/0
  + chapters:
    + 1: cells 0->0, 0 blocks, duration 00:03:14
    + 2: cells 0->0, 0 blocks, duration 00:11:26
    + 3: cells 0->0, 0 blocks, duration 00:08:05
    + 4: cells 0->0, 0 blocks, duration 00:10:17
    + 5: cells 0->0, 0 blocks, duration 00:12:25
    + 6: cells 0->0, 0 blocks, duration 00:07:28
    + 7: cells 0->0, 0 blocks, duration 00:00:45
  + audio tracks:
    + 1, English (AC3) (5.1 ch) (iso639-2: eng), 48000Hz, 448000bps
  + subtitle tracks:
ERROR: unable to parse audio input "encoder", skipping
[20:21:37] 1 job(s) to process
[20:21:37] starting job
[20:21:37] work: mixdown not specified, track 1 setting mixdown Dolby Pro Logic II
[20:21:37] sync: expecting 96480 video frames
[20:21:37] job configuration:
[20:21:37]  * source
[20:21:37]    + F:\Video\ToEncode\Dexter\DEXTER_S1_D2\title03.mkv
[20:21:37]    + title 1, chapter(s) 1 to 7
[20:21:37]    + container: matroska,webm
[20:21:37]  * destination
[20:21:37]    + g:\video\DEXTER_S1_D2_E09.mp4
[20:21:37]    + container: MPEG-4 (.mp4 and .m4v)
[20:21:37]      + 64-bit formatting
[20:21:37]      + chapter markers
[20:21:37]  * video track
[20:21:37]    + decoder: mpeg2video
[20:21:37]      + bitrate 7500 kbps
[20:21:37]    + frame rate: 29.970 fps -> constant 29.970 fps
[20:21:37]    + filters
[20:21:37]      + Framerate Shaper (1:27000000:900900)
[20:21:37]        + frame rate: 29.970 fps -> constant 29.970 fps
[20:21:37]      + Crop and Scale (720:480:0:0:0:0)
[20:21:37]        + source: 720 * 480, crop (0/0/0/0): 720 * 480, scale: 720 * 480
[20:21:37]    + strict anamorphic
[20:21:37]      + storage dimensions: 720 * 480, mod 0
[20:21:37]      + pixel aspect ratio: 32 / 27
[20:21:37]      + display dimensions: 853 * 480
[20:21:37]    + encoder: H.264 (x264)
[20:21:37]      + x264 preset: slow
[20:21:37]      + x264 tune: film
[20:21:37]      + options: level=4.1:ref=4
[20:21:37]      + h264 profile: high
[20:21:37]      + quality: 20.00 (RF)
[20:21:37]  * audio track 1
[20:21:37]    + decoder: English (AC3) (5.1 ch) (track 1, id 0x1)
[20:21:37]      + bitrate: 448 kbps, samplerate: 48000 Hz
[20:21:37]    + mixdown: Dolby Pro Logic II
[20:21:37]    + gain: 6dB
[20:21:37]    + encoder: AAC (faac)
[20:21:37]      + bitrate: 160 kbps, samplerate: 48000 Hz
[20:21:37] reader: first SCR -2970 id 0x0 DTS -2970
[20:21:37] encx264: min-keyint: 30, keyint: 300
[20:21:37] encx264: encoding with stored aspect 32/27
[20:21:37] encx264: Encoding at constant RF 20.000000
x264 [warning]: --psnr used with psy on: results will be invalid!
x264 [warning]: --tune psnr should be used if attempting to benchmark psnr!
x264 [info]: using SAR=32/27
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
spongemike
Posts: 13
Joined: Tue Jun 10, 2014 4:05 am

Re: CLI keeps crashing on Windows

Post by spongemike »

More info:

It repros in both the 32-bit HandBrakeCLI.exe, as well as the 64-bit HandBrake CLI.exe.
It repros on other machines as well.
It repros with any content I try to encode.

How can *anyone* successfully run HandBrakeCLI.exe on windows without seeing this crash 50% of the time?
Woodstock
Veteran User
Posts: 4619
Joined: Tue Aug 27, 2013 6:39 am

Re: CLI keeps crashing on Windows

Post by Woodstock »

I run the CLI on Win7 almost 100% of my encodes, without crashes. But that's not Win8.1 or the year-plus-old release version of Handbrake.

Have you tried this with one of the nightly builds, at least a version new enough to have been tested with 8.1?
spongemike
Posts: 13
Joined: Tue Jun 10, 2014 4:05 am

Re: CLI keeps crashing on Windows

Post by spongemike »

No, I haven't tried that yet. Where do I get one of the nightly builds?

I'll peruse the website and see if I can find it. I'll also install a couple VMs... a Win7 one, a Win8 one, and a Win8.1 one, and try the repro in each of them.
spongemike
Posts: 13
Joined: Tue Jun 10, 2014 4:05 am

Re: CLI keeps crashing on Windows

Post by spongemike »

Okay, so I have the nightly build now, and I've re-run my script. I've interrupted it about 10 times to restart it to see if I can repro the crash (which always happens within a couple seconds of starting).

So far... no crash! If this works, I'll be very pleased.

And it never really crossed my mind that Win8.1 was the issue, but it makes sense.

Stay tuned... I'll post an update once things are done.

Thanks!!
Woodstock
Veteran User
Posts: 4619
Joined: Tue Aug 27, 2013 6:39 am

Re: CLI keeps crashing on Windows

Post by Woodstock »

There are other reasons to go with the nightly builds than better support for Win8.1, though. Better support of Bluray is worth a lot, along with automatically switching to using large file support when it is necessary.
spongemike
Posts: 13
Joined: Tue Jun 10, 2014 4:05 am

Re: CLI keeps crashing on Windows

Post by spongemike »

Thanks. It's been encoding file after file for ~9 hours, and no crashes at all so far. Woohoo!
AlBundy
Bright Spark User
Posts: 377
Joined: Mon Dec 31, 2012 4:47 am

Re: CLI keeps crashing on Windows

Post by AlBundy »

Depending on your Hardware you can also enable hardware-acceleration in the nightly builds which gives a huge performance boost.

viewtopic.php?f=11&t=29498
viewtopic.php?f=9&t=30010

Al
Post Reply