CLI vs GUI

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
nasruddin
Posts: 49
Joined: Mon Jun 05, 2023 6:13 pm

CLI vs GUI

Post by nasruddin »

Description of problem or question:
Experimenting with CLI - the object is to reduce a large number of captured videos to a reasonable size retaining good quality.
The original demo file is 445 MB.
CLI product is 70 MB
GUI product is 185 MB

Why the difference in size- what's been lost?
This is a pretty significant size difference (also comparably different processing times).




Steps to reproduce the problem (If Applicable):




HandBrake version (e.g., 1.0.0):
1.6.1 both CLI & GUI



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


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

GUI Log:
HandBrake 1.6.1 (2023012300)
OS: Microsoft Windows NT 10.0.19045.0
CPU: Intel(R) Core(TM) i7 CPU X 980 @ 3.33GHz
Ram: 24567 MB,
GPU Information:
AMD Radeon HD 5570 - 15.201.1151.1008
Screen: 1920x1080
Temp Dir: C:\Temp\
Install Dir: C:\Program Files\HandBrake\
Data Dir: C:\Users\xyzzy\AppData\Roaming\HandBrake

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

# Starting Encode ...

[14:51:32] base preset: SuperHQAllsubtitleMKV
[14:51:32] Remote Process started with Process ID: 51600 using port: 8037. Max Allowed Instances: 1
[14:51:33] Worker: Starting HandBrake Engine ...
[14:51:33] Worker: Starting Web Server on port 8037 ...
[14:51:33] Worker: Disconnected worker monitoring enabled!
[14:51:33] Compile-time hardening features are enabled
[14:51:33] qsv: not available on this system
[14:51:33] vcn: not available on this system
Cannot load nvEncodeAPI64.dll
starting libhb thread
[14:51:34] Starting work at: Sat Oct 28 14:51:34 2023
[14:51:34] 1 job(s) to process
[14:51:34] json job:
{
"Audio": {
"AudioList": [
{
"Bitrate": 160,
"DRC": 0,
"Encoder": "av_aac",
"Gain": 0,
"Mixdown": 4,
"NormalizeMixLevel": false,
"Samplerate": 0,
"Track": 0,
"DitherMethod": 0
},
{
"Bitrate": 512,
"DRC": 0,
"Encoder": "ac3",
"Gain": 0,
"Mixdown": 4,
"NormalizeMixLevel": false,
"Samplerate": 0,
"Track": 0,
"DitherMethod": 0
}
],
"CopyMask": [
"copy:aac",
"copy:ac3"
]
},
"Destination": {
"ChapterList": [
{
"Name": "Chapter 1"
}
],
"ChapterMarkers": true,
"AlignAVStart": false,
"File": "Y:\\videos\\Capture\\Search Bar[118]-1.mkv",
"Mp4Options": {
"IpodAtom": false,
"Mp4Optimize": false
},
"Mux": "av_mkv"
},
"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": 14,
"Settings": {
"crop-bottom": "0",
"crop-left": "0",
"crop-right": "0",
"crop-top": "0",
"height": "614",
"width": "970"
}
},
{
"ID": 7,
"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": "Y:\\videos\\Capture\\Search bar[118].mpg"
},
"Subtitle": {
"Search": {
"Burn": false,
"Default": false,
"Enable": true,
"Forced": true
},
"SubtitleList": []
},
"Video": {
"Encoder": "x264",
"Level": "4.0",
"TwoPass": false,
"Turbo": false,
"ColorMatrixCode": 0,
"Options": "ref=5:bframes=5",
"Preset": "veryslow",
"Profile": "high",
"Quality": 18,
"QSV": {
"Decode": false
},
"HardwareDecode": 0
}
}
[14:51:34] CPU: Intel(R) Core(TM) i7 CPU X 980 @ 3.33GHz
[14:51:34] - logical processor count: 12
[14:51:34] Intel Quick Sync Video support: no
[14:51:34] hb_scan: path=Y:\videos\Capture\Search bar[118].mpg, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:333: failed opening UDF image Y:\videos\Capture\Search bar[118].mpg
src/libbluray/disc/disc.c:437: error opening file BDMV\index.bdmv
src/libbluray/disc/disc.c:437: error opening file BDMV\BACKUP\index.bdmv
[14:51:34] bd: not a bd - trying as a stream/file instead
liblibdvdread: DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
dvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: vm: failed to read VIDEO_TS.IFO
[14:51:34] dvd: not a dvd - trying as a stream/file instead
[14:51:34] file is MPEG Program Stream
[14:51:34] Probing 1 unknown stream
[14:51:34] Probe: Found stream mpegvideo. stream id 0xe0-0x0
[14:51:34] Found the following streams
[14:51:34] Video Streams :
[14:51:34] 0xe0-0x0 type mpegvideo (0x2)
[14:51:34] Audio Streams :
[14:51:34] 0xc0-0x0 type MPEG2 (0x4)
[14:51:34] Subtitle Streams :
[14:51:34] Other Streams :
[14:51:34] stream id 0xc0 (type 0x4 substream 0x0) audio 0xc0
[14:51:34] scan: decoding previews for title 1
[14:51:34] file is MPEG Program Stream
[14:51:34] Probing 1 unknown stream
[14:51:34] Probe: Found stream mpegvideo. stream id 0xe0-0x0
[14:51:34] scan: audio 0xc0: mp2, rate=48000Hz, bitrate=128000 Unknown (MPEG) (2.0 ch) (128 kbps)
[14:51:34] stream: 7 good frames, 0 errors (0%)
[14:51:34] scan: 10 previews, 970x614, 30.000 fps, autocrop = 0/0/0/0, aspect 1.58:1, PAR 1:1, color profile: 1-1-1, chroma location: left
[14:51:34] libhb: scan thread found 1 valid title(s)
[14:51:34] Skipping subtitle scan. No suitable subtitle tracks.
[14:51:34] Starting Task: Encoding Pass
[14:51:34] Skipping crop/scale filter
[14:51:34] work: track 1, dithering not supported by codec
[14:51:34] work: track 2, dithering not supported by codec
[14:51:34] work: only 1 chapter, disabling chapter markers
[14:51:34] job configuration:
[14:51:34] * source
[14:51:34] + Y:\videos\Capture\Search bar[118].mpg
[14:51:34] + title 1, chapter(s) 1 to 1
[14:51:34] * destination
[14:51:34] + Y:\videos\Capture\Search Bar[118]-1.mkv
[14:51:34] + container: Matroska (libavformat)
[14:51:34] * video track
[14:51:34] + decoder: mpeg2video 8-bit (yuv420p)
[14:51:34] + bitrate 200 kbps
[14:51:34] + filters
[14:51:34] + 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)
[14:51:34] + Decomb (mode=39)
[14:51:34] + Framerate Shaper (mode=2:rate=27000000/900000)
[14:51:34] + frame rate: 30.000 fps -> peak rate limited to 30.000 fps
[14:51:34] + Output geometry
[14:51:34] + storage dimensions: 970 x 614
[14:51:34] + pixel aspect ratio: 1 : 1
[14:51:34] + display dimensions: 970 x 614
[14:51:34] + encoder: H.264 (libx264)
[14:51:34] + preset: veryslow
[14:51:34] + options: ref=5:bframes=5
[14:51:34] + profile: high
[14:51:34] + level: 4.0
[14:51:34] + quality: 18.00 (RF)
[14:51:34] + color profile: 1-1-1
[14:51:34] + chroma location: left
[14:51:34] * audio track 1
[14:51:34] + decoder: Unknown (MPEG) (2.0 ch) (128 kbps) (track 1, id 0xc0)
[14:51:34] + bitrate: 128 kbps, samplerate: 48000 Hz
[14:51:34] + mixdown: Stereo
[14:51:34] + encoder: AAC (libavcodec)
[14:51:34] + bitrate: 160 kbps, samplerate: 48000 Hz
[14:51:34] * audio track 2
[14:51:34] + decoder: Unknown (MPEG) (2.0 ch) (128 kbps) (track 1, id 0xc0)
[14:51:34] + bitrate: 128 kbps, samplerate: 48000 Hz
[14:51:34] + mixdown: Stereo
[14:51:34] + encoder: AC3 (libavcodec)
[14:51:34] + bitrate: 512 kbps, samplerate: 48000 Hz
[14:51:34] file is MPEG Program Stream
[14:51:35] Probing 1 unknown stream
[14:51:35] Probe: Found stream mpegvideo. stream id 0xe0-0x0
[14:51:35] sync: expecting 30076 video frames
[14:51:35] encx264: min-keyint: 30, keyint: 300
[14:51:35] encx264: encoding at constant RF 18.000000
[14:51:35] encx264: unparsed options: ref=5:bframes=5:level=4.0:b-adapt=2:direct=auto:analyse=all:me=umh:merange=24:subme=10:trellis=2:vbv-bufsize=31250:vbv-maxrate=25000:rc-lookahead=60
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 UnalignedStack
x264 [info]: profile High, level 4.0, 4:2:0, 8-bit
[14:51:35] sync: first pts audio 0xc0 is 0
[14:51:35] sync: first pts audio 0xc0 is 0
[14:51:35] sync: first pts video is 990
[15:06:14] reader: done. 1 scr changes
[15:06:16] work: average encoding speed for job is 34.159916 fps
[15:06:16] comb detect: heavy 3192 | light 8922 | uncombed 17984 | total 30098
[15:06:16] decomb: deinterlaced 3192 | blended 8922 | unfiltered 17984 | total 30098
[15:06:16] vfr: 30098 frames output, 0 dropped and 0 duped for CFR/PFR
[15:06:16] vfr: lost time: 0 (0 frames)
[15:06:16] vfr: gained time: 0 (0 frames) (0 not accounted for)
[15:06:16] stream: 32586 good frames, 0 errors (0%)
[15:06:16] mp2-decoder done: 41786 frames, 0 decoder errors
[15:06:16] mp2-decoder done: 41786 frames, 0 decoder errors
[15:06:16] mpeg2video-decoder done: 30098 frames, 0 decoder errors
[15:06:16] sync: got 30098 frames, 30076 expected
[15:06:16] sync: framerate min 10.000 fps, max 30.000 fps, avg 29.998 fps
[aac @ 0000018640f66b80] Ignoring attempt to flush encoder that doesn't support it
[aac @ 0000018640f66b80] Qavg: 1470.855
[ac3 @ 0000018640f531c0] Ignoring attempt to flush encoder that doesn't support it
x264 [info]: frame I:102 Avg QP:11.86 size: 64728
x264 [info]: frame P:7657 Avg QP:16.20 size: 9799
x264 [info]: frame B:22339 Avg QP:17.88 size: 1063
x264 [info]: consecutive B-frames: 2.8% 3.2% 22.5% 14.8% 22.1% 34.7%
x264 [info]: mb I I16..4: 19.0% 69.9% 11.1%
x264 [info]: mb P I16..4: 1.1% 4.0% 0.2% P16..4: 25.2% 7.5% 7.8% 0.1% 0.1% skip:54.0%
x264 [info]: mb B I16..4: 0.5% 0.1% 0.0% B16..8: 22.3% 1.3% 0.2% direct: 1.1% skip:74.4% L0:48.0% L1:48.2% BI: 3.8%
x264 [info]: 8x8 transform intra:61.7% inter:65.7%
x264 [info]: direct mvs spatial:99.9% temporal:0.1%
x264 [info]: coded y,uvDC,uvAC intra: 50.2% 55.4% 27.0% inter: 5.7% 6.1% 1.6%
x264 [info]: i16 v,h,dc,p: 25% 53% 2% 19%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 25% 16% 32% 4% 4% 4% 4% 6% 6%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 21% 21% 13% 7% 8% 9% 7% 7% 6%
x264 [info]: i8c dc,h,v,p: 38% 35% 19% 8%
x264 [info]: Weighted P-Frames: Y:0.1% UV:0.0%
x264 [info]: ref P L0: 65.2% 7.0% 16.1% 6.0% 5.2% 0.4%
x264 [info]: ref B L0: 75.7% 16.1% 6.2% 2.0%
x264 [info]: ref B L1: 93.9% 6.1%
x264 [info]: kb/s:840.20
[15:06:16] mux: track 0, 30098 frames, 105377116 bytes, 840.19 kbps, fifo 2048
[15:06:16] mux: track 1, 47010 frames, 20119414 bytes, 160.42 kbps, fifo 4096
[15:06:16] mux: track 2, 31339 frames, 64182272 bytes, 511.74 kbps, fifo 4096
[15:06:16] Finished work at: Sat Oct 28 15:06:16 2023
[15:06:16] libhb: work result = 0

# Job Completed!

Here's the verbose output of the CLI run

Y:\videos\Capture>handbrakecli -v --preset-import-file SuperHQAllsubtitleMKV.json -i "Search bar[118].mpg" -o output.mkv
[14:44:04] Compile-time hardening features are enabled
[14:44:04] qsv: not available on this system
[14:44:04] vcn: not available on this system
Cannot load nvEncodeAPI64.dll
[14:44:04] hb_init: starting libhb thread
[14:44:04] thread 1 started ("libhb")
HandBrake 1.6.1 (2023012300) - MinGW x86_64 - https://handbrake.fr
12 CPUs detected
Opening Search bar[118].mpg...
[14:44:04] CPU: Intel(R) Core(TM) i7 CPU X 980 @ 3.33GHz
[14:44:04] - logical processor count: 12
[14:44:04] Intel Quick Sync Video support: no
[14:44:04] hb_scan: path=Search bar[118].mpg, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:333: failed opening UDF image Search bar[118].mpg
src/libbluray/disc/disc.c:437: error opening file BDMV\index.bdmv
src/libbluray/disc/disc.c:437: error opening file BDMV\BACKUP\index.bdmv
[14:44:04] 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: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: vm: failed to read VIDEO_TS.IFO
[14:44:04] dvd: not a dvd - trying as a stream/file instead
[14:44:04] file is MPEG Program Stream
Scanning title 1 of 1, 0.00 %[14:44:06] Probing 1 unknown stream
[14:44:06] Probe: Found stream mpegvideo. stream id 0xe0-0x0
[14:44:06] Found the following streams
[14:44:06] Video Streams :
[14:44:06] 0xe0-0x0 type mpegvideo (0x2)
[14:44:06] Audio Streams :
[14:44:06] 0xc0-0x0 type MPEG2 (0x4)
[14:44:06] Subtitle Streams :
[14:44:06] Other Streams :
[14:44:06] stream id 0xc0 (type 0x4 substream 0x0) audio 0xc0
Scanning title 1 of 1, 0.00 %[14:44:07] scan: decoding previews for title 1
[14:44:07] file is MPEG Program Stream
Scanning title 1 of 1, preview 1, 0.00 %[14:44:08] Probing 1 unknown stream
[14:44:08] Probe: Found stream mpegvideo. stream id 0xe0-0x0
[14:44:08] scan: audio 0xc0: mp2, rate=48000Hz, bitrate=128000 Unknown (MPEG) (2.0 ch) (128 kbps)
Scanning title 1 of 1, preview 6, 60.00 %[14:44:08] stream: 7 good frames, 0 errors (0%)
[14:44:08] scan: 10 previews, 970x614, 30.000 fps, autocrop = 0/0/0/0, aspect 1.58:1, PAR 1:1, color profile: 1-1-1, chroma location: left
Scanning title 1 of 1, preview 10, 100.00 %[14:44:08] libhb: scan thread found 1 valid title(s)
+ Using preset: CLI Default
+ title 1:
+ stream: Search bar[118].mpg
+ duration: 00:16:42
+ size: 970x614, pixel aspect: 1/1, display aspect: 1.58, 30.000 fps
+ autocrop: 0/0/0/0
+ chapters:
+ 1: duration 00:16:42
+ audio tracks:
+ 1, Unknown (MPEG) (2.0 ch) (128 kbps) (iso639-2: und)
+ subtitle tracks:
[14:44:08] Starting work at: Sat Oct 28 14:44:08 2023

[14:44:08] 1 job(s) to process
[14:44:08] json job:
{
"Audio": {
"AudioList": [
{
"Bitrate": 128,
"CompressionLevel": -1.0,
"DRC": 0.0,
"DitherMethod": "auto",
"Encoder": "av_aac",
"Gain": 0.0,
"Mixdown": "stereo",
"NormalizeMixLevel": false,
"PresetEncoder": "av_aac",
"Quality": -3.0,
"Samplerate": 0,
"Track": 0
}
],
"CopyMask": [
"copy:aac",
"copy:ac3",
"copy:eac3",
"copy:dtshd",
"copy:dts",
"copy:mp3",
"copy:truehd",
"copy:flac"
],
"FallbackEncoder": "av_aac"
},
"Destination": {
"AlignAVStart": false,
"ChapterList": [
{
"Duration": {
"Hours": 0,
"Minutes": 16,
"Seconds": 42,
"Ticks": 90228787
},
"Name": "Chapter 1"
}
],
"ChapterMarkers": false,
"File": "output.mkv",
"InlineParameterSets": false,
"Mp4Options": {
"IpodAtom": false,
"Mp4Optimize": false
},
"Mux": "mkv"
},
"Filters": {
"FilterList": [
{
"ID": 7,
"Settings": {
"mode": 0
}
},
{
"ID": 14,
"Settings": {
"crop-bottom": 0,
"crop-left": 0,
"crop-right": 0,
"crop-top": 0,
"height": 614,
"width": 970
}
}
]
},
"Metadata": {},
"PAR": {
"Den": 1,
"Num": 1
},
"SequenceID": 0,
"Source": {
"Angle": 0,
"Path": "Search bar[118].mpg",
"Range": {
"End": 1,
"Start": 1,
"Type": "chapter"
},
E n c o d i n"gT:i ttlaes"k: -11
o f -}1,,
0 . 0 0" S%ubtitle": {
"Search": {
"Burn": true,
"Default": false,
"Enable": false,
"Forced": false
},
"SubtitleList": []
},
"Video": {
"ChromaLocation": 1,
"ColorInputFormat": 0,
"ColorMatrix": 1,
"ColorOutputFormat": 0,
"ColorPrimaries": 1,
"ColorRange": 1,
"ColorTransfer": 1,
"Encoder": "x264",
"HardwareDecode": 0,
"Level": "auto",
"Options": "",
"Preset": "medium",
"Profile": "auto",
"QSV": {
"AdapterIndex": 0,
"AsyncDepth": 0,
"Decode": false
},
"Quality": 22.0,
"Tune": "",
"Turbo": false,
"TwoPass": false
}
}
[14:44:09] Starting Task: Encoding Pass
[14:44:09] Skipping vfr filter
[14:44:09] Skipping crop/scale filter
[14:44:09] job configuration:
[14:44:09] * source
[14:44:09] + Search bar[118].mpg
[14:44:09] + title 1, chapter(s) 1 to 1
[14:44:09] * destination
[14:44:09] + output.mkv
[14:44:09] + container: Matroska (libavformat)
[14:44:09] * video track
[14:44:09] + decoder: mpeg2video 8-bit (yuv420p)
[14:44:09] + bitrate 200 kbps
[14:44:09] + Output geometry
[14:44:09] + storage dimensions: 970 x 614
[14:44:09] + pixel aspect ratio: 1 : 1
[14:44:09] + display dimensions: 970 x 614
[14:44:09] + encoder: H.264 (libx264)
[14:44:09] + preset: medium
[14:44:09] + profile: auto
[14:44:09] + level: auto
[14:44:09] + quality: 22.00 (RF)
[14:44:09] + color profile: 1-1-1
[14:44:09] + chroma location: left
[14:44:09] * audio track 1
[14:44:09] + decoder: Unknown (MPEG) (2.0 ch) (128 kbps) (track 1, id 0xc0)
[14:44:09] + bitrate: 128 kbps, samplerate: 48000 Hz
[14:44:09] + mixdown: Stereo
[14:44:09] + encoder: AAC (libavcodec)
[14:44:09] + bitrate: 128 kbps, samplerate: 48000 Hz
[14:44:09] file is MPEG Program Stream
Encoding: task 1 of 1, 0.00 %[14:44:09] Probing 1 unknown stream
[14:44:09] Probe: Found stream mpegvideo. stream id 0xe0-0x0
fErnacmoedsiync: expecting 30076 video
ng: task 1 of 1, 0.00 %[14:44:09] encx264: min-keyint: 30, keyint: 300
[14:44:09] encx264: encoding at constant RF 22.000000
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 UnalignedStack
x264 [info]: profile High, level 3.1, 4:2:0, 8-bit
[14:44:09] sync: first pts audio 0xc0 is 0
[14:44:09] sync: first pts video is 990
Encoding: task 1 of 1, 99.82 % (112.29 fps, avg 120.54 fps, ETA 00h00m01s)[14:48:18] reader: done. 1 scr changes
Encoding: task 1 of 1, 100.00 % (112.29 fps, avg 120.54 fps, ETA 00h00m01s)[14:48:18] work: average encoding speed for job is 120.540054 fps
[14:48:19] stream: 32586 good frames, 0 errors (0%)
[14:48:19] mp2-decoder done: 41786 frames, 0 decoder errors
[14:48:19] mpeg2video-decoder done: 30098 frames, 0 decoder errors
[14:48:19] sync: got 30098 frames, 30076 expected
9E.n9c9o8d ifnpgs:ramerate min 10.000 fps, max 30.000 fps, avg 2
ta[aac @ 0000000005a3e700] sIgnoring attempt to flush encoder that doesn't support it
k [aac @ 0000000005a3e700] 1Qavg: 1040.156
oxf2 614, [1i0n0f.o0]0: %frame I:102 Avg QP:15.22 size: 47633
x(216142 .[2i9n ffop]s:, frame P:8734 Avg QP:18.41 size: 4752
axv2g6 41 2[0i.n5f4o ]f:p sframe B:21262 Avg QP:20.32 size: 510
,x 2E6T4A [0i0nhf0o0]m:0 1consecutive B-frames: 1.0% 6.5% 24.0% 68.5%
sx)264 [info]: mb I I16..4: 21.1% 69.6% 9.3%
x264 [info]: mb P I16..4: 0.9% 2.0% 0.1% P16..4: 21.4% 6.2% 4.6% 0.0% 0.0% skip:64.8%
x264 [info]: mb B I16..4: 0.1% 0.0% 0.0% B16..8: 14.3% 0.3% 0.0% direct: 0.2% skip:85.1% L0:40.7% L1:57.6% BI: 1.7%
x264 [info]: 8x8 transform intra:66.2% inter:78.6%
x264 [info]: coded y,uvDC,uvAC intra: 47.1% 62.9% 24.8% inter: 3.7% 5.8% 0.4%
x264 [info]: i16 v,h,dc,p: 30% 24% 6% 40%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 27% 17% 34% 3% 4% 4% 3% 5% 3%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 28% 27% 22% 4% 5% 4% 4% 4% 3%
x264 [info]: i8c dc,h,v,p: 52% 21% 21% 6%
x264 [info]: Weighted P-Frames: Y:0.0% UV:0.0%
x264 [info]: ref P L0: 69.5% 8.6% 17.2% 4.7% 0.0%
x264 [info]: ref B L0: 82.6% 15.4% 2.0%
x264 [info]: ref B L1: 96.2% 3.8%
x264 [info]: kb/s:456.03
[14:48:19] mux: track 0, 30098 frames, 57193600 bytes, 456.01 kbps, fifo 8192
[14:48:19] mux: track 1, 47010 frames, 16108504 bytes, 128.44 kbps, fifo 8192
[14:48:19] Finished work at: Sat Oct 28 14:48:19 2023

[14:48:19] libhb: work result = 0

Encode done!

HandBrake has exited.






Please replace this text with the contents of your log file between the two code tags - OR - provide a pastebin URL in place of these 3 lines.
If you are unable to do so, please state why so we can help you.
[/code]
nasruddin
Posts: 49
Joined: Mon Jun 05, 2023 6:13 pm

Re: CLI vs GUI

Post by nasruddin »

I looked at VLC's view of the 2 media.
CLI metadata:
Image
https://imgur.com/a/bgk30Oc

GUI metadata:
Image
https://imgur.com/yk7F6jZ

Strange that there are 2 streams with different audio in the GUI version
nasruddin
Posts: 49
Joined: Mon Jun 05, 2023 6:13 pm

Re: CLI vs GUI

Post by nasruddin »

Read "codec" for "metadata" above
nasruddin
Posts: 49
Joined: Mon Jun 05, 2023 6:13 pm

Re: CLI vs GUI

Post by nasruddin »

Looking around, I found use here of something called mediainfo, so downloaded & tried.
First, the handbrake GUI file, 2nd the handbrake CLI file.
There are some differences obvious to me I don't understand (there may be other diffs I didn't pick up)
The field "Overall bit rate" is quite different
The field "Encoding settings" has differences in some of the various settings listed
Don't understand how that could be, if the preset used is the same

(1) file produced by handbrake GUI
General
Unique ID : 273306573743780277988157895991403911359 (0xCD9CEE72A975668A1363A6265C2698BF)
Complete name : Y:...
Format : Matroska
Format version : Version 4
File size : 182 MiB
Duration : 16 min 43 s
Overall bit rate : 1 518 kb/s
Frame rate : 30.000 FPS
Encoded date : 2023-10-28 21:51:35 UTC
Writing application : HandBrake 1.6.1 2023012300
Writing library : Lavf59.27.100
ErrorDetectionType : Per level 1

Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4
Format settings : CABAC / 5 Ref Frames
Format settings, CABAC : Yes
Format settings, Reference frames : 5 frames
Codec ID : V_MPEG4/ISO/AVC
Duration : 16 min 43 s
Width : 970 pixels
Height : 614 pixels
Display aspect ratio : 16:10
Frame rate mode : Constant
Frame rate : 30.000 FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Writing library : x264 core 164 r3100 ed0f7a6
Encoding settings : cabac=1 / ref=5 / deblock=1:0:0 / analyse=0x3:0x133 / me=umh / subme=10 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=24 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=18 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=5 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=300 / keyint_min=30 / scenecut=40 / intra_refresh=0 / rc_lookahead=60 / rc=crf / mbtree=1 / crf=18.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / vbv_maxrate=25000 / vbv_bufsize=31250 / crf_max=0.0 / nal_hrd=none / filler=0 / ip_ratio=1.40 / aq=1:1.00
Default : Yes
Forced : No
Color range : Limited
Color primaries : BT.709
Transfer characteristics : BT.709
Matrix coefficients : BT.709

Audio #1
ID : 2
Format : AAC LC
Format/Info : Advanced Audio Codec Low Complexity
Codec ID : A_AAC-2
Duration : 16 min 42 s
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 48.0 kHz
Frame rate : 46.875 FPS (1024 SPF)
Compression mode : Lossy
Delay relative to video : -32 ms
Title : Stereo
Default : Yes
Forced : No

Audio #2
ID : 3
Format : AC-3
Format/Info : Audio Coding 3
Commercial name : Dolby Digital
Codec ID : A_AC3
Duration : 16 min 42 s
Bit rate mode : Constant
Bit rate : 512 kb/s
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 48.0 kHz
Frame rate : 31.250 FPS (1536 SPF)
Compression mode : Lossy
Delay relative to video : -16 ms
Stream size : 61.2 MiB (34%)
Title : Stereo
Service kind : Complete Main
Default : No
Forced : No

(2) File produced by handbrake CLI
General
Unique ID : 132884440444883998594679448290905536558 (0x63F89CBFAA8D78AA8CA1CF85E373B82E)
Complete name : Y:...
Format : Matroska
Format version : Version 4
File size : 70.4 MiB
Duration : 16 min 43 s
Overall bit rate : 589 kb/s
Frame rate : 30.000 FPS
Encoded date : 2023-10-28 23:57:08 UTC
Writing application : HandBrake 1.6.1 2023012300
Writing library : Lavf59.27.100
ErrorDetectionType : Per level 1

Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L3.1
Format settings : CABAC / 4 Ref Frames
Format settings, CABAC : Yes
Format settings, Reference frames : 4 frames
Codec ID : V_MPEG4/ISO/AVC
Duration : 16 min 43 s
Width : 970 pixels
Height : 614 pixels
Display aspect ratio : 16:10
Frame rate mode : Constant
Frame rate : 30.000 FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Writing library : x264 core 164 r3100 ed0f7a6
Encoding settings : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=18 / lookahead_threads=3 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=300 / keyint_min=30 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=22.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Default : Yes
Forced : No
Color range : Limited
Color primaries : BT.709
Transfer characteristics : BT.709
Matrix coefficients : BT.709

Audio
ID : 2
Format : AAC LC
Format/Info : Advanced Audio Codec Low Complexity
Codec ID : A_AAC-2
Duration : 16 min 42 s
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 48.0 kHz
Frame rate : 46.875 FPS (1024 SPF)
Compression mode : Lossy
Delay relative to video : -32 ms
Title : Stereo
Default : Yes
Forced : No
User avatar
Ritsuka
HandBrake Team
Posts: 1658
Joined: Fri Jan 12, 2007 11:29 am

Re: CLI vs GUI

Post by Ritsuka »

--preset-import-file only imports the preset in the presets list, then you have to select it to.
nasruddin
Posts: 49
Joined: Mon Jun 05, 2023 6:13 pm

Re: CLI vs GUI

Post by nasruddin »

--preset-import-file only imports the preset in the presets list, then you have to select it to.
Ok! That resolves the differences between the two, it looks to me like I have the same results.
Not obvious that this
handbrakecli -v --preset-import-file SuperHQAllsubtitleMKV.json --preset "SuperHQAllsubtitleMKV" -i "Search bar[118].mpg" -o output.mkv

extra --preset option was needed.

I see that the ac3 audio is from the surround sound added to the preset, appropriate for some of these conversions, some not. seems to require a lot of file space when used so worth removing when not appropriate.

Thanks, ==mwh
Post Reply