Error Code 5

Discussion of the HandBrake command line interface (CLI)
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
DrXenos
Bright Spark User
Posts: 278
Joined: Sat Mar 16, 2013 1:19 pm

Error Code 5

Post by DrXenos »

Description of problem or question:
Can Someone please tell me what it means when HB exits with error code 5? I've never encountered that one before.

Code: Select all

HandBrake --min-duration 1 --previews 40:0 --input "D:\DVD\Net 1 & 2 (Blu-ray) (1995, 2006)\The Net" --title 6 --format av_mkv --output "N:\media-root\Media\Movies\N\Net, The (1995)\Net 2 (2006).mkv" --encoder x264 --encoder-preset slower --encoder-profile high --encoder-level 4.1 --quality "22.0" --vfr --maxWidth 1280 --maxHeight 720 --crop "0:0:6:6" --non-anamorphic --modulus 2 --no-detelecine --no-comb-detect --no-decomb --no-deinterlace --no-deblock --no-hqdn3d --no-nlmeans --no-unsharp --no-lapsharp --no-grayscale --markers --audio-fallback ac3 --audio-copy-mask "aac,ac3,eac3,truehd,dts,dtshd,mp3,flac" --audio "1,1" --aencoder "fdk_aac,copy:dts" --ab "192,192" --mixdown "stereo,none" --normalize-mix "0,0" --arate "auto,auto" --aname "","" --subtitle "1" --subtitle-burn=none --subtitle-default=none
[12:03:45] Compile-time hardening features are enabled
Cannot load nvEncodeAPI64.dll
Cannot load nvEncodeAPI64.dll
Cannot load nvEncodeAPI64.dll
Cannot load nvEncodeAPI64.dll
[12:03:46] hb_init: starting libhb thread
[12:03:46] thread 1 started ("libhb")
HandBrake 20210121132923-22ebc9c2b-master (2021012101) - MinGW x86_64 - https://handbrake.fr
8 CPUs detected
Opening D:\DVD\Net 1 & 2 (Blu-ray) (1995, 2006)\The Net...
[12:03:46] CPU: Intel(R) Core(TM) i7-3820 CPU @ 3.60GHz
[12:03:46]  - Intel microarchitecture Sandy Bridge
[12:03:46]  - logical processor count: 8
[12:03:46] Intel Quick Sync Video support: yes
[12:03:46]  - Intel Media SDK software: API 1.19 (minimum: 1.3)
[12:03:46]  - H.264 encoder: yes
[12:03:46]     - preferred implementation: software (null)
[12:03:46]     - capabilities (software):  bpyramid vsinfo opt1 opt2
[12:03:46]  - H.265 encoder: no
[12:03:46] hb_scan: path=D:\DVD\Net 1 & 2 (Blu-ray) (1995, 2006)\The Net, title_index=6
[12:03:46] scan: BD has 7 title(s)
[12:03:46] bd: scanning title 6
[12:03:46] bd: playlist 00005.MPLS
[12:03:46] bd: duration is 01:32:30 (5550044 ms)
[12:03:46] bd: video id=0x1011, stream type=H.264, format 1080p
[12:03:46] bd: aspect = 16:9
[12:03:46] bd: audio id=0x711100, lang=English (DTS), 3cc=eng
[12:03:46] bd: audio id=0x1100, lang=English (DTS-HD MA), 3cc=eng
[12:03:46] bd: subtitle id=0x1200, lang=English [PGS], 3cc=eng
[12:03:46] bd: chap 1, 623706 ms
[12:03:46] bd: chap 2, 730312 ms
[12:03:46] bd: chap 3, 666832 ms
[12:03:46] bd: chap 4, 642558 ms
[12:03:46] bd: chap 5, 661160 ms
[12:03:46] bd: chap 6, 642308 ms
[12:03:46] bd: chap 7, 738070 ms
[12:03:46] bd: chap 8, 434016 ms
[12:03:46] bd: chap 9, 226809 ms
[12:03:46] bd: chap 10, 184017 ms
[12:03:46] bd: chap 11, 250 ms
[12:03:46] bd: title 6 has 11 chapters
[12:03:46] scan: decoding previews for title 6
[12:03:46] scan: title angle(s) 1
[12:03:46] scan: audio 0x711100: dca, rate=48000Hz, bitrate=1536000 English (DTS) (2.0 ch) (1536 kbps)
[12:03:46] scan: audio 0x1100: dca, rate=48000Hz, bitrate=1 English (DTS-HD MA) (2.0 ch)
Scanning title 1 of 1, preview 1, 2.50 %
[12:03:50] scan: 40 previews, 1920x1080, 23.976 fps, autocrop = 0/0/6/6, aspect 16:9, PAR 1:1
[12:03:50] scan: supported video decoders: avcodec qsv
[12:03:50] stream: 5 good frames, 0 errors (0%)
[12:03:50] libhb: scan thread found 1 valid title(s)
+ Using preset: CLI Default
+ title 6:
  + playlist: 00005.MPLS
  + duration: 01:32:30
  + size: 1920x1080, pixel aspect: 1/1, display aspect: 1.78, 23.976 fps
  + autocrop: 0/0/6/6
  + chapters:
    + 1: duration 00:10:24
    + 2: duration 00:12:10
    + 3: duration 00:11:07
    + 4: duration 00:10:43
    + 5: duration 00:11:01
    + 6: duration 00:10:42
    + 7: duration 00:12:18
    + 8: duration 00:07:14
    + 9: duration 00:03:47
    + 10: duration 00:03:04
    + 11: duration 00:00:00
  + audio tracks:
    + 1, English (DTS) (2.0 ch) (1536 kbps) (iso639-2: eng), 48000Hz, 1536000bps
    + 2, English (DTS-HD MA) (2.0 ch) (iso639-2: eng)
  + subtitle tracks:
    + 1, English [PGS]
[12:03:50] Starting work at: Fri Feb 19 12:03:50 2021
[12:03:50] 1 job(s) to process
[12:03:50] json job:
{
    "Audio": {
        "AudioList": [
            {
                "Bitrate": 192,
                "Encoder": 4194304,
                "Mixdown": 4,
                "NormalizeMixLevel": false,
                "Samplerate": 0,
                "Track": 0
            },
            {
                "Bitrate": 192,
                "Encoder": 1073750016,
                "Mixdown": 0,
                "NormalizeMixLevel": false,
                "Samplerate": 0,
                "Track": 0
            }
        ],
        "CopyMask": [
            "copy:aac",
            "copy:ac3",
            "copy:eac3",
            "copy:truehd",
            "dts",
            "copy:dtshd",
            "copy:mp3",
            "copy:flac"
        ],
        "FallbackEncoder": "ac3"
    },
    "Destination": {
        "AlignAVStart": false,
        "ChapterList": [
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 10,
                    "Seconds": 24,
                    "Ticks": 56133578
                },
                "Name": "Chapter 1"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 12,
                    "Seconds": 10,
                    "Ticks": 65728162
                },
                "Name": "Chapter 2"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 11,
                    "Seconds": 7,
                    "Ticks": 60014956
                },
                "Name": "Chapter 3"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 10,
                    "Seconds": 43,
                    "Ticks": 57830272
                },
                "Name": "Chapter 4"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 11,
                    "Seconds": 1,
                    "Ticks": 59504444
                },
                "Name": "Chapter 5"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 10,
                    "Seconds": 42,
                    "Ticks": 57807750
                },
                "Name": "Chapter 6"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 12,
                    "Seconds": 18,
                    "Ticks": 66426360
                },
                "Name": "Chapter 7"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 7,
                    "Seconds": 14,
                    "Ticks": 39061524
                },
                "Name": "Chapter 8"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 3,
                    "Seconds": 47,
                    "Ticks": 20412892
                },
                "Name": "Chapter 9"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 3,
                    "Seconds": 4,
                    "Ticks": 16561544
                },
                "Name": "Chapter 10"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 0,
                    "Seconds": 0,
                    "Ticks": 22520
                },
                "Name": "Chapter 11"
            }
        ],
        "ChapterMarkers": true,
        "File": "N:\\media-root\\Media\\Movies\\N\\Net, The (1995)\\Net 2 (2006).mkv",
        "InlineParameterSets": false,
        "Mp4Options": {
            "IpodAtom": false,
            "Mp4Optimize": false
        },
        "Mux": "mkv"
    },
    "Filters": {
        "FilterList": [
            {
                "ID": 6,
                "Settings": {
                    "mode": 0
                }
            },
            {
                "ID": 12,
                "Settings": {
                    "crop-bottom": 0,
                    "crop-left": 6,
                    "crop-right": 6,
                    "crop-top": 0,
                    "height": 720,
                    "width": 1272
                }
            }
        ]
    },
    "Metadata": {},
    "PAR": {
        "Den": 1,
        "Num": 1
    },
    "SequenceID": 0,
    "Source": {
        "Angle": 0,
        "Path": "D:\\DVD\\Net 1 & 2 (Blu-ray) (1995, 2006)\\The Net",
        "Range": {
            "End": 11,
            "Start": 1,
            "Type": "chapter"
        },
        "Title": 6
    },
    "Subtitle": {
        "Search": {
            "Burn": true,
            "Default": false,
            "Enable": false,
            "Forced": false
        },
        "SubtitleList": [
            {
                "Burn": false,
                "Default": false,
                "Forced": false,
                "Track": 0
            }
        ]
    },
    "Video": {
        "ColorFormat": 0,
        "ColorMatrix": 1,
        "ColorPrimaries": 1,
        "ColorRange": 1,
        "ColorTransfer": 1,
        "Encoder": "x264",
        "Level": "4.1",
        "Options": "",
        "Preset": "slower",
        "Profile": "high",
        "QSV": {
            "AsyncDepth": 4,
            "Decode": false
        },
        "Quality": 22.0,
        "Tune": "",
        "Turbo": false,
        "TwoPass": false
    }
}
[12:03:50] Starting Task: Encoding Pass
[12:03:50] Skipping vfr filter
[12:03:50] job configuration:
[12:03:50]  * source
[12:03:50]    + D:\DVD\Net 1 & 2 (Blu-ray) (1995, 2006)\The Net
[12:03:50]    + title 6, chapter(s) 1 to 11
[12:03:50]  * destination
[12:03:50]    + N:\media-root\Media\Movies\N\Net, The (1995)\Net 2 (2006).mkv
[12:03:50]    + container: Matroska (libavformat)
[12:03:50]      + chapter markers
[12:03:50]  * video track
[12:03:50]    + decoder: h264 8-bit
[12:03:50]      + bitrate 200 kbps
[12:03:50]    + filters
[12:03:50]      + Crop and Scale (width=1272:height=720:crop-top=0:crop-bottom=0:crop-left=6:crop-right=6)
[12:03:50]        + source: 1920 * 1080, crop (0/0/6/6): 1908 * 1080, scale: 1272 * 720
[12:03:50]    + Output geometry
[12:03:50]      + storage dimensions: 1272 x 720
[12:03:50]      + pixel aspect ratio: 1 : 1
[12:03:50]      + display dimensions: 1272 x 720
[12:03:50]    + encoder: H.264 (libx264)
[12:03:50]      + preset:  slower
[12:03:50]      + profile: high
[12:03:50]      + level:   4.1
[12:03:50]      + quality: 22.00 (RF)
[12:03:50]      + color profile: 1-1-1
[12:03:50]  * subtitle track 1, English [PGS] (track 0, id 0x1200, Picture) -> Passthrough
[12:03:50]  * audio track 1
[12:03:50]    + decoder: English (DTS) (2.0 ch) (1536 kbps) (track 1, id 0x711100)
[12:03:50]      + bitrate: 1536 kbps, samplerate: 48000 Hz
[12:03:50]    + mixdown: Stereo
[12:03:50]    + encoder: AAC (libfdk_aac)
[12:03:50]      + bitrate: 192 kbps, samplerate: 48000 Hz
[12:03:50]  * audio track 2
[12:03:50]    + decoder: English (DTS) (2.0 ch) (1536 kbps) (track 1, id 0x711100)
[12:03:50]      + bitrate: 1536 kbps, samplerate: 48000 Hz
[12:03:50]    + 
[12:03:50] sync: expecting 133067 video frames
[12:03:50] encx264: min-keyint: 24, keyint: 240
[12:03:50] encx264: encoding at constant RF 22.000000
[12:03:50] encx264: unparsed options: level=4.1:ref=8:b-adapt=2:direct=auto:analyse=all:me=umh:subme=9:trellis=2:vbv-bufsize=78125:vbv-maxrate=62500:rc-lookahead=60
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
x264 [info]: profile High, level 4.1, 4:2:0, 8-bit
Encoding: task 1 of 1, 0.00 %
[12:03:50] sync: first pts video is 0
[12:03:50] sync: "Chapter 1" (1) at frame 1 time 0
[12:03:50] sync: first pts audio 0x711100 is 0
[12:03:50] sync: first pts audio 0x711100 is 0
[12:03:50] sync: first pts subtitle 0x1200 is 0
Encoding: task 1 of 1, 0.01 %
[12:19:14] sync: "Chapter 2" (2) at frame 14947 time 56103547
Encoding: task 1 of 1, 11.23 % (14.02 fps, avg 16.18 fps, ETA 02h01m43s)
[12:35:07] sync: "Chapter 3" (3) at frame 32459 time 121839217
Encoding: task 1 of 1, 24.39 % (23.01 fps, avg 17.29 fps, ETA 01h36m58s)
[12:48:41] sync: "Chapter 4" (4) at frame 48446 time 181850418
Encoding: task 1 of 1, 36.41 % (11.29 fps, avg 18.00 fps, ETA 01h18m21s)
[13:04:01] sync: "Chapter 5" (5) at frame 63844 time 239650661
Encoding: task 1 of 1, 47.98 % (21.26 fps, avg 17.68 fps, ETA 01h05m16s)
[13:16:24] sync: "Chapter 6" (6) at frame 79698 time 299162613
Encoding: task 1 of 1, 59.90 % (24.90 fps, avg 18.30 fps, ETA 00h48m37s)
[13:28:47] sync: "Chapter 7" (7) at frame 95111 time 357019162
Encoding: task 1 of 1, 71.48 % (18.24 fps, avg 18.66 fps, ETA 00h33m55s)
[13:44:29] sync: "Chapter 8" (8) at frame 112804 time 423434261
Encoding: task 1 of 1, 84.77 % (16.98 fps, avg 18.68 fps, ETA 00h18m06s)
[13:54:13] sync: "Chapter 9" (9) at frame 123197 time 462446985
Encoding: task 1 of 1, 92.58 % (19.70 fps, avg 18.60 fps, ETA 00h08m50s)
[13:58:42] sync: "Chapter 10" (10) at frame 128633 time 482852370
Encoding: task 1 of 1, 96.67 % (21.74 fps, avg 18.67 fps, ETA 00h03m57s)
[14:01:52] reader: done. 3 scr changes
Encoding: task 1 of 1, 99.96 % (28.14 fps, avg 18.78 fps, ETA 00h00m03s)
[14:01:53] sync: "Chapter 11" (11) at frame 133049 time 499428930
Encoding: task 1 of 1, 100.00 % (28.14 fps, avg 18.78 fps, ETA 00h00m03s)
[14:01:54] work: average encoding speed for job is 18.778963 fps
Encoding: task 1 of 1, 100.00 % (28.14 fps, avg 18.78 fps, ETA 00h00m03s)
[14:01:54] stream: 133068 good frames, 0 errors (0%)
[14:01:54] dca-decoder done: 520313 frames, 0 decoder errors
[14:01:54] dca-decoder done: 520313 frames, 0 decoder errors
[14:01:54] h264-decoder done: 133068 frames, 0 decoder errors
[14:01:54] sync: got 133068 frames, 133067 expected
[14:01:54] sync: framerate min 23.976 fps, max 629.371 fps, avg 23.976 fps
[libfdk_aac @ 0000000009849000] Ignoring attempt to flush encoder that doesn't support it
x264 [info]: frame I:1787  Avg QP:18.56  size: 53785
x264 [info]: frame P:42618 Avg QP:21.78  size: 17377
x264 [info]: frame B:88663 Avg QP:23.29  size:  5541
x264 [info]: consecutive B-frames:  6.0%  9.0% 19.0% 65.9%
x264 [info]: mb I  I16..4: 15.3% 71.0% 13.8%
x264 [info]: mb P  I16..4:  8.7% 21.8%  1.8%  P16..4: 38.9%  7.6%  6.0%  0.1%  0.0%    skip:15.1%
x264 [info]: mb B  I16..4:  1.0%  2.2%  0.2%  B16..8: 39.0%  4.8%  0.8%  direct: 3.9%  skip:48.1%  L0:45.2% L1:50.9% BI: 3.9%
x264 [info]: 8x8 transform intra:67.6% inter:77.3%
x264 [info]: direct mvs  spatial:99.6% temporal:0.4%
x264 [info]: coded y,uvDC,uvAC intra: 46.4% 46.1% 10.5% inter: 11.6% 14.9% 0.4%
x264 [info]: i16 v,h,dc,p: 26% 25% 10% 39%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 14% 15% 11%  7% 10% 11% 11%  9% 11%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 13% 29%  5%  6% 10% 10% 11%  7% 10%
x264 [info]: i8c dc,h,v,p: 44% 28% 17% 10%
x264 [info]: Weighted P-Frames: Y:3.9% UV:2.6%
x264 [info]: ref P L0: 59.4% 10.5% 13.9%  5.0%  3.8%  2.9%  2.5%  1.7%  0.2%  0.0%
x264 [info]: ref B L0: 87.5%  6.7%  2.8%  1.2%  0.9%  0.6%  0.3%
x264 [info]: ref B L1: 97.5%  2.5%
x264 [info]: kb/s:1914.18
[14:01:54] mux: track 0, 133068 frames, 1327884983 bytes, 1914.05 kbps, fifo 1024
[14:01:54] mux: track 1, 260158 frames, 133200897 bytes, 192.00 kbps, fifo 2048
[14:01:54] mux: track 2, 520313 frames, 1046869756 bytes, 1508.99 kbps, fifo 4096
[14:01:54] mux: track 3, 3138 frames, 16057841 bytes, 23.15 kbps, fifo 64
[14:01:54] Finished work at: Fri Feb 19 14:01:54 2021
[14:01:54] libhb: work result = 5
Encode failed (error 5).
User avatar
s55
HandBrake Team
Posts: 10350
Joined: Sun Dec 24, 2006 1:05 pm

Re: Error Code 5

Post by s55 »

5 is file read error. Typically path, permissions, storage errors would trigger it.

It might be related to a lost frame somewhere in that encode or bad source metadata
DrXenos
Bright Spark User
Posts: 278
Joined: Sat Mar 16, 2013 1:19 pm

Re: Error Code 5

Post by DrXenos »

That's odd. It gets to 100% before returning this error. The whole time it's reading blu-ray folder and writing the mkv file just fine.

I ran it twice. Both times the same. Now I've extracted the title with MakeMKV and retrying with HB.

Thanks.
DrXenos
Bright Spark User
Posts: 278
Joined: Sat Mar 16, 2013 1:19 pm

Re: Error Code 5

Post by DrXenos »

Extracting it first with MakeMKV fixed the issue. Does that mean there was something wrong with how it was encoded on the disc (just curious)?
Post Reply