get-them-all-no-matter-what setting for subtitles?

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.
markfilipak
Bright Spark User
Posts: 313
Joined: Thu Aug 01, 2019 8:58 pm

get-them-all-no-matter-what setting for subtitles?

Post by markfilipak »

Description of problem or question:

I've written a Windows script that processes 24 FPS (BD & soft telecined DVD) videos. As Step 3, HandBrakeCLI runs to extract the subtitles & chapters for later merging via mkvmerge.

HandBrakeCLI appears to not work for me. I'm sure it's my fault. The input has subtitles. The output has no subtitles. I think the problem is the preset (not) used.

The input, g:\BDMV\STREAM\00007.m2ts, will have subtitles but they won't have ISO 639-2 codes unless I can figure out how to get HandBrakeCLI to fetch them from the pertinent playlist file (in this case, g:\BDMV\PLAYLIST\00006.mpls). But even if I could direct HandBrakeCLI to 00006.mpls, doing so in a script -- matching 00006.mpls to 00007.m2ts -- would be next to impossible. I was hoping there was a get-them-all-no-matter-what setting for subtitles, but I couldn't find one in the documentation.

Can you help?

Thanks,
Mark.

Command line:
HandBrakeCLI --preset-import-gui "C:\CMD & tiny apps\HandBrakeCLI\p24-subs-&-chaps.json" -i "g:\BDMV\STREAM\00007.m2ts" -o "[G][BDMV][STREAM]00007.01.3-handbrake.MKV" 2>"[G][BDMV][STREAM]00007.01.3-handbrake.LOG"

From the log ([G][BDMV][STREAM]00007.01.3-handbrake.LOG):

Oddity: My 'p24-subs-&-chaps' preset appears to be wrong.
[09:24:09] Preset p24-subs-&-chaps: Incorrect value type for key PictureDeinterlacePreset. Converting.
[09:24:09] Preset p24-subs-&-chaps: Incorrect value type for key PictureDeinterlaceCustom. Converting.
[09:24:09] Preset p24-subs-&-chaps: Incorrect value type for key PictureRotate. Converting.
[09:24:09] Preset p24-subs-&-chaps: Incorrect value type for key PictureWidth. Converting.
[09:24:09] Preset p24-subs-&-chaps: Incorrect value type for key PictureHeight. Converting.
[09:24:09] Preset p24-subs-&-chaps: Incorrect value type for key PresetDescription. Converting.
[09:24:09] Preset p24-subs-&-chaps: Incorrect value type for key VideoPreset. Converting.
[09:24:09] Preset p24-subs-&-chaps: Incorrect value type for key VideoProfile. Converting.
[09:24:09] Preset p24-subs-&-chaps: Incorrect value type for key x264Option. Converting.

Oddity: HandBrakeCLI can't find (or open) the disc directories?
src/libbluray/disc/disc.c:323: failed opening UDF image g:\BDMV\STREAM\00007.m2ts
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
src/libbluray/bluray.c:2585: nav_get_title_list(g:\BDMV\STREAM\00007.m2ts\) failed

Oddity: These pretty much confirm that my 'p24-subs-&-chaps' preset was not used.
"Encoder": "x264",
"Quality": 22.0,

HandBrake version (e.g., 1.0.0):

C:\>handbrakecli --version
[06:01:23] Compile-time hardening features are enabled
Cannot load NvEncodeAPIGetMaxSupportedVersion
[06:01:23] hb_init: starting libhb thread
[06:01:23] thread 1 started ("libhb")
HandBrake 1.3.1

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

Win10-1803,

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

Here's the full log ([G][BDMV][STREAM]00007.01.3-handbrake.LOG).

Code: Select all

[05:00:57] Compile-time hardening features are enabled
Cannot load NvEncodeAPIGetMaxSupportedVersion
[05:00:58] hb_init: starting libhb thread
[05:00:58] thread 1 started ("libhb")
[05:00:58] Preset (null): Incorrect value type for key AudioDitherMethod. Converting.
[05:00:58] Preset p24-to-p24: Incorrect value type for key PictureDeinterlacePreset. Converting.
[05:00:58] Preset p24-to-p24: Incorrect value type for key PictureDeinterlaceCustom. Converting.
[05:00:58] Preset p24-to-p24: Incorrect value type for key PictureRotate. Converting.
[05:00:58] Preset p24-to-p24: Incorrect value type for key PictureWidth. Converting.
[05:00:58] Preset p24-to-p24: Incorrect value type for key PictureHeight. Converting.
[05:00:58] Preset p24-to-p24: Incorrect value type for key PresetDescription. Converting.
[05:00:58] Preset p24-to-p24: Incorrect value type for key x264Option. Converting.
[05:00:58] Preset (null): Incorrect value type for key AudioDitherMethod. Converting.
[05:00:58] Preset i30-to-p24: Incorrect value type for key PictureRotate. Converting.
[05:00:58] Preset i30-to-p24: Incorrect value type for key PictureWidth. Converting.
[05:00:58] Preset i30-to-p24: Incorrect value type for key PictureHeight. Converting.
[05:00:58] Preset i30-to-p24: Incorrect value type for key PresetDescription. Converting.
[05:00:58] Preset i30-to-p24: Incorrect value type for key x264Option. Converting.
[05:00:58] Preset (null): Incorrect value type for key AudioDitherMethod. Converting.
[05:00:58] Preset i30-to-p60: Incorrect value type for key PictureRotate. Converting.
[05:00:58] Preset i30-to-p60: Incorrect value type for key PictureWidth. Converting.
[05:00:58] Preset i30-to-p60: Incorrect value type for key PictureHeight. Converting.
[05:00:58] Preset i30-to-p60: Incorrect value type for key PresetDescription. Converting.
[05:00:58] Preset i30-to-p60: Incorrect value type for key x264Option. Converting.
[05:00:58] Preset (null): Incorrect value type for key AudioDitherMethod. Converting.
[05:00:58] Preset i30-to-p30: Incorrect value type for key PictureRotate. Converting.
[05:00:58] Preset i30-to-p30: Incorrect value type for key PictureWidth. Converting.
[05:00:58] Preset i30-to-p30: Incorrect value type for key PictureHeight. Converting.
[05:00:58] Preset i30-to-p30: Incorrect value type for key PresetDescription. Converting.
[05:00:58] Preset i30-to-p30: Incorrect value type for key x264Option. Converting.
[05:00:58] Preset (null): Incorrect value type for key AudioDitherMethod. Converting.
[05:00:58] Preset p24-subs-&-chaps: Incorrect value type for key PictureDeinterlacePreset. Converting.
[05:00:58] Preset p24-subs-&-chaps: Incorrect value type for key PictureDeinterlaceCustom. Converting.
[05:00:58] Preset p24-subs-&-chaps: Incorrect value type for key PictureRotate. Converting.
[05:00:58] Preset p24-subs-&-chaps: Incorrect value type for key PictureWidth. Converting.
[05:00:58] Preset p24-subs-&-chaps: Incorrect value type for key PictureHeight. Converting.
[05:00:58] Preset p24-subs-&-chaps: Incorrect value type for key PresetDescription. Converting.
[05:00:58] Preset p24-subs-&-chaps: Incorrect value type for key VideoPreset. Converting.
[05:00:58] Preset p24-subs-&-chaps: Incorrect value type for key VideoProfile. Converting.
[05:00:58] Preset p24-subs-&-chaps: Incorrect value type for key x264Option. Converting.
HandBrake 1.3.1 (2020010400) - MinGW x86_64 - https://handbrake.fr
8 CPUs detected
Opening G:\BDMV\STREAM\00007.m2ts...
[05:00:58] CPU: Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
[05:00:58]  - Intel microarchitecture Skylake
[05:00:58]  - logical processor count: 8
[05:00:58] Intel Quick Sync Video support: yes
[05:00:58]  - Intel Media SDK hardware: API 1.30 (minimum: 1.3)
[05:00:58]  - H.264 encoder: yes
[05:00:58]     - preferred implementation: hardware (any) via D3D11
[05:00:58]     - capabilities (hardware):  breftype icq+la+i+downs vsinfo opt1 opt2+mbbrc+extbrc+trellis+ib_adapt+nmpslice
[05:00:58]  - H.265 encoder: yes (8bit: yes, 10bit: no)
[05:00:58]     - preferred implementation: hardware (any) via D3D11
[05:00:58]     - capabilities (hardware):  bpyramid icq vsinfo opt1
[05:00:58] hb_scan: path=G:\BDMV\STREAM\00007.m2ts, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:323: failed opening UDF image G:\BDMV\STREAM\00007.m2ts
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
src/libbluray/bluray.c:2585: nav_get_title_list(G:\BDMV\STREAM\00007.m2ts\) failed
[05:00:58] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 6.0.1
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.IFO.
libdvdnav: vm: failed to read VIDEO_TS.IFO
[05:00:58] dvd: not a dvd - trying as a stream/file instead
[05:00:58] file is MPEG Transport Stream with 192 byte packets offset 4 bytes
[05:00:58] build_program_map - Continuity Counter 5 out of sequence - expected 1
[05:00:58] Found the following PIDS
[05:00:58]     Video PIDS : 
[05:00:58]       0x1011 type MPEG2 (0x2)
[05:00:58]     Audio PIDS : 
[05:00:58]       0x1100 type AC3 (0x81)
[05:00:58]       0x1101 type AC3 (0x81)
[05:00:58]       0x1102 type AC3 (0x81)
[05:00:58]       0x1103 type AC3 (0x81)
[05:00:58]       0x1104 type AC3 (0x81)
[05:00:58]       0x1105 type AC3 (0x81)
[05:00:58]       0x1106 type AC3 (0x81)
[05:00:58]       0x1107 type AC3 (0x81)
[05:00:58]     Subtitle PIDS : 
[05:00:58]       0x1200 type PGS Subtitle (0x90)
[05:00:58]       0x1201 type PGS Subtitle (0x90)
[05:00:58]       0x1202 type PGS Subtitle (0x90)
[05:00:58]       0x1203 type PGS Subtitle (0x90)
[05:00:58]       0x1204 type PGS Subtitle (0x90)
[05:00:58]       0x1205 type PGS Subtitle (0x90)
[05:00:58]       0x1206 type PGS Subtitle (0x90)
[05:00:58]       0x1207 type PGS Subtitle (0x90)
[05:00:58]       0x1208 type PGS Subtitle (0x90)
[05:00:58]       0x1209 type PGS Subtitle (0x90)
[05:00:58]       0x120a type PGS Subtitle (0x90)
[05:00:58]       0x120b type PGS Subtitle (0x90)
[05:00:58]       0x120c type PGS Subtitle (0x90)
[05:00:58]       0x120d type PGS Subtitle (0x90)
[05:00:58]       0x120e type PGS Subtitle (0x90)
[05:00:58]       0x120f type PGS Subtitle (0x90)
[05:00:58]       0x1210 type PGS Subtitle (0x90)
[05:00:58]       0x1211 type PGS Subtitle (0x90)
[05:00:58]     Other PIDS : 
[05:00:58]       0x1001 type Unknown (0xff) (PCR)
[05:00:58] stream id 0x1100 (type 0x81 substream 0x0) audio 0x1100
[05:00:58] stream id 0x1101 (type 0x81 substream 0x0) audio 0x1101
[05:00:58] stream id 0x1102 (type 0x81 substream 0x0) audio 0x1102
[05:00:58] stream id 0x1103 (type 0x81 substream 0x0) audio 0x1103
[05:00:58] stream id 0x1104 (type 0x81 substream 0x0) audio 0x1104
[05:00:58] stream id 0x1105 (type 0x81 substream 0x0) audio 0x1105
[05:00:58] stream id 0x1106 (type 0x81 substream 0x0) audio 0x1106
[05:00:58] stream id 0x1107 (type 0x81 substream 0x0) audio 0x1107
[05:00:58] stream id 0x1200 (type 0x90 substream 0x0) subtitle 0x1200
[05:00:58] stream id 0x1201 (type 0x90 substream 0x0) subtitle 0x1201
[05:00:58] stream id 0x1202 (type 0x90 substream 0x0) subtitle 0x1202
[05:00:58] stream id 0x1203 (type 0x90 substream 0x0) subtitle 0x1203
[05:00:58] stream id 0x1204 (type 0x90 substream 0x0) subtitle 0x1204
[05:00:58] stream id 0x1205 (type 0x90 substream 0x0) subtitle 0x1205
[05:00:58] stream id 0x1206 (type 0x90 substream 0x0) subtitle 0x1206
[05:00:58] stream id 0x1207 (type 0x90 substream 0x0) subtitle 0x1207
[05:00:58] stream id 0x1208 (type 0x90 substream 0x0) subtitle 0x1208
[05:00:58] stream id 0x1209 (type 0x90 substream 0x0) subtitle 0x1209
[05:00:58] stream id 0x120a (type 0x90 substream 0x0) subtitle 0x120a
[05:00:58] stream id 0x120b (type 0x90 substream 0x0) subtitle 0x120b
[05:00:58] stream id 0x120c (type 0x90 substream 0x0) subtitle 0x120c
[05:00:58] stream id 0x120d (type 0x90 substream 0x0) subtitle 0x120d
[05:00:58] stream id 0x120e (type 0x90 substream 0x0) subtitle 0x120e
[05:00:58] stream id 0x120f (type 0x90 substream 0x0) subtitle 0x120f
[05:00:58] stream id 0x1210 (type 0x90 substream 0x0) subtitle 0x1210
[05:00:58] stream id 0x1211 (type 0x90 substream 0x0) subtitle 0x1211
[05:00:58] scan: decoding previews for title 1
[05:00:58] file is MPEG Transport Stream with 192 byte packets offset 4 bytes
[05:00:58] build_program_map - Continuity Counter 5 out of sequence - expected 1
[05:00:58] scan: audio 0x1100: ac3, rate=48000Hz, bitrate=192000 Unknown (AC3) (2.0 ch) (192 kbps)
[05:00:58] scan: audio 0x1101: ac3, rate=48000Hz, bitrate=192000 Unknown (AC3) (2.0 ch) (192 kbps)
[05:00:58] scan: audio 0x1102: ac3, rate=48000Hz, bitrate=192000 Unknown (AC3) (2.0 ch) (192 kbps)
[05:00:58] scan: audio 0x1103: ac3, rate=48000Hz, bitrate=192000 Unknown (AC3) (2.0 ch) (192 kbps)
[05:00:58] scan: audio 0x1104: ac3, rate=48000Hz, bitrate=192000 Unknown (AC3) (2.0 ch) (192 kbps)
[05:00:58] scan: audio 0x1105: ac3, rate=48000Hz, bitrate=192000 Unknown (AC3) (2.0 ch) (192 kbps)
[05:00:58] scan: audio 0x1106: ac3, rate=48000Hz, bitrate=192000 Unknown (AC3) (2.0 ch) (192 kbps)
[05:00:58] scan: audio 0x1107: ac3, rate=48000Hz, bitrate=192000 Unknown (AC3) (2.0 ch) (192 kbps)
[05:00:58] stream: 6 good frames, 0 errors (0%)
[05:00:58] scan: 10 previews, 720x480, 23.976 fps, autocrop = 0/0/4/0, aspect 4:3, PAR 8:9
[05:00:58] libhb: scan thread found 1 valid title(s)
+ Using preset: CLI Default
+ title 1:
  + stream: G:\BDMV\STREAM\00007.m2ts
  + duration: 00:23:08
  + size: 720x480, pixel aspect: 8/9, display aspect: 1.33, 23.976 fps
  + autocrop: 0/0/4/0
  + chapters:
    + 1: duration 00:23:08
  + audio tracks:
    + 1, Unknown (AC3) (2.0 ch) (192 kbps) (iso639-2: und), 48000Hz, 192000bps
    + 2, Unknown (AC3) (2.0 ch) (192 kbps) (iso639-2: und), 48000Hz, 192000bps
    + 3, Unknown (AC3) (2.0 ch) (192 kbps) (iso639-2: und), 48000Hz, 192000bps
    + 4, Unknown (AC3) (2.0 ch) (192 kbps) (iso639-2: und), 48000Hz, 192000bps
    + 5, Unknown (AC3) (2.0 ch) (192 kbps) (iso639-2: und), 48000Hz, 192000bps
    + 6, Unknown (AC3) (2.0 ch) (192 kbps) (iso639-2: und), 48000Hz, 192000bps
    + 7, Unknown (AC3) (2.0 ch) (192 kbps) (iso639-2: und), 48000Hz, 192000bps
    + 8, Unknown (AC3) (2.0 ch) (192 kbps) (iso639-2: und), 48000Hz, 192000bps
  + subtitle tracks:
    + 1, Unknown [PGS]
    + 2, Unknown [PGS]
    + 3, Unknown [PGS]
    + 4, Unknown [PGS]
    + 5, Unknown [PGS]
    + 6, Unknown [PGS]
    + 7, Unknown [PGS]
    + 8, Unknown [PGS]
    + 9, Unknown [PGS]
    + 10, Unknown [PGS]
    + 11, Unknown [PGS]
    + 12, Unknown [PGS]
    + 13, Unknown [PGS]
    + 14, Unknown [PGS]
    + 15, Unknown [PGS]
    + 16, Unknown [PGS]
    + 17, Unknown [PGS]
    + 18, Unknown [PGS]
    + 19, Unknown, Closed Caption [CC608]
[05:00:58] Starting work at: Sat May 02 05:00:58 2020

[05:00:58] 1 job(s) to process
[05:00:58] 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": 23,
                    "Seconds": 8,
                    "Ticks": 124948606
                },
                "Name": "Chapter 1"
            }
        ],
        "ChapterMarkers": false,
        "File": "C:\\AVOut\\[G][BDMV][STREAM]00007.01.3-handbrake.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": 4,
                    "crop-right": 0,
                    "crop-top": 0,
                    "height": 480,
                    "width": 716
                }
            }
        ]
    },
    "Metadata": {},
    "PAR": {
        "Den": 9,
        "Num": 8
    },
    "SequenceID": 0,
    "Source": {
        "Angle": 0,
        "Path": "G:\\BDMV\\STREAM\\00007.m2ts",
        "Range": {
            "End": 1,
            "Start": 1,
            "Type": "chapter"
        },
        "Title": 1
    },
    "Subtitle": {
        "Search": {
            "Burn": true,
            "Default": false,
            "Enable": false,
            "Forced": false
        },
        "SubtitleList": []
    },
    "Video": {
        "ColorFormat": 0,
        "ColorMatrix": 6,
        "ColorPrimaries": 6,
        "ColorRange": 1,
        "ColorTransfer": 1,
        "Encoder": "x264",
        "Level": "auto",
        "Options": "",
        "Preset": "medium",
        "Profile": "auto",
        "QSV": {
            "AsyncDepth": 4,
            "Decode": false
        },
        "Quality": 22.0,
        "Tune": "",
        "Turbo": false,
        "TwoPass": false
    }
}
[05:00:58] Starting Task: Encoding Pass
[05:00:58] Skipping vfr filter
[05:00:58] job configuration:
[05:00:58]  * source
[05:00:58]    + G:\BDMV\STREAM\00007.m2ts
[05:00:58]    + title 1, chapter(s) 1 to 1
[05:00:58]  * destination
[05:00:58]    + C:\AVOut\[G][BDMV][STREAM]00007.01.3-handbrake.MKV
[05:00:58]    + container: Matroska (libavformat)
[05:00:58]  * video track
[05:00:58]    + decoder: mpeg2video
[05:00:58]      + bitrate 200 kbps
[05:00:58]    + filters
[05:00:58]      + Crop and Scale (width=716:height=480:crop-top=0:crop-bottom=0:crop-left=4:crop-right=0)
[05:00:58]        + source: 720 * 480, crop (0/0/4/0): 716 * 480, scale: 716 * 480
[05:00:58]    + Output geometry
[05:00:58]      + storage dimensions: 716 x 480
[05:00:58]      + pixel aspect ratio: 8 : 9
[05:00:58]      + display dimensions: 636 x 480
[05:00:58]    + encoder: H.264 (libx264)
[05:00:58]      + preset:  medium
[05:00:58]      + profile: auto
[05:00:58]      + level:   auto
[05:00:58]      + quality: 22.00 (RF)
[05:00:58]      + color profile: 6-1-6
[05:00:58]  * audio track 1
[05:00:58]    + decoder: Unknown (AC3) (2.0 ch) (192 kbps) (track 1, id 0x1100)
[05:00:58]      + bitrate: 192 kbps, samplerate: 48000 Hz
[05:00:58]    + mixdown: Stereo
[05:00:58]    + dither: triangular
[05:00:58]    + encoder: AAC (libavcodec)
[05:00:58]      + bitrate: 128 kbps, samplerate: 48000 Hz
[05:00:58] file is MPEG Transport Stream with 192 byte packets offset 4 bytes
[05:00:58] build_program_map - Continuity Counter 5 out of sequence - expected 1
[05:00:58] sync: expecting 33286 video frames
[05:00:58] encx264: min-keyint: 24, keyint: 240
[05:00:58] encx264: encoding at constant RF 22.000000
x264 [info]: using SAR=8/9
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x264 [info]: profile High, level 3.0, 4:2:0, 8-bit
[05:00:58] sync: first pts video is 0
[05:00:58] sync: first pts audio 0x1100 is 0
[05:05:26] hb_ts_stream_decode - eof
[05:05:26] reader: done. 1 scr changes
[05:05:26] work: average encoding speed for job is 124.206383 fps
[05:05:27] stream: 33362 good frames, 0 errors (0%)
[05:05:27] ac3-decoder done: 43482 frames, 0 decoder errors
[05:05:27] mpeg2video-decoder done: 33362 frames, 0 decoder errors
[05:05:27] sync: got 33362 frames, 33286 expected
[05:05:27] sync: framerate min 19.980 fps, max 29.970 fps, avg 23.977 fps
[aac @ 0000000006da1000] Qavg: 345.413
x264 [info]: frame I:223   Avg QP:20.73  size: 32102
x264 [info]: frame P:8606  Avg QP:23.44  size: 14820
x264 [info]: frame B:24533 Avg QP:25.93  size:  4668
x264 [info]: consecutive B-frames:  1.3%  1.2%  2.1% 95.4%
x264 [info]: mb I  I16..4: 13.6% 67.7% 18.7%
x264 [info]: mb P  I16..4:  3.0%  9.4%  1.7%  P16..4: 50.0% 22.0% 11.8%  0.0%  0.0%    skip: 2.1%
x264 [info]: mb B  I16..4:  0.5%  0.9%  0.1%  B16..8: 41.8%  5.4%  1.0%  direct:16.6%  skip:33.7%  L0:43.1% L1:42.5% BI:14.4%
x264 [info]: 8x8 transform intra:64.7% inter:74.0%
x264 [info]: coded y,uvDC,uvAC intra: 61.3% 97.1% 79.9% inter: 26.5% 57.8% 19.4%
x264 [info]: i16 v,h,dc,p: 26% 26%  8% 39%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 19% 22% 16%  5%  7%  7%  8%  7%  9%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 19% 27% 11%  5%  9%  8%  9%  6%  6%
x264 [info]: i8c dc,h,v,p: 56% 22% 13%  9%
x264 [info]: Weighted P-Frames: Y:29.3% UV:16.3%
x264 [info]: ref P L0: 45.2% 15.4% 23.0% 13.5%  2.9%
x264 [info]: ref B L0: 80.2% 15.8%  4.0%
x264 [info]: ref B L1: 94.2%  5.8%
x264 [info]: kb/s:1432.89
[05:05:27] mux: track 0, 33362 frames, 249207696 bytes, 1432.77 kbps, fifo 2048
[05:05:27] mux: track 1, 65224 frames, 22311865 bytes, 128.28 kbps, fifo 4096
[05:05:27] Finished work at: Sat May 02 05:05:27 2020

[05:05:27] libhb: work result = 0

Encode done!
HandBrake has exited.
rollin_eng
Veteran User
Posts: 4840
Joined: Wed May 04, 2011 11:06 pm

Re: get-them-all-no-matter-what setting for subtitles?

Post by rollin_eng »

If you are processing a BD rip you should point HB to the root folder, not the individual m2ts files.
markfilipak
Bright Spark User
Posts: 313
Joined: Thu Aug 01, 2019 8:58 pm

Re: get-them-all-no-matter-what setting for subtitles?

Post by markfilipak »

rollin_eng wrote: Sat May 02, 2020 10:30 am If you are processing a BD rip you should point HB to the root folder, not the individual m2ts files.
Thanks, but that creates a bit of a script problem -- probably not insurmountable.

So, I should submit this:
HandBrakeCLI --preset-import-gui "C:\CMD & tiny apps\HandBrakeCLI\p24-subs-&-chaps.json" -i "g:\BDMV" -o "[G][BDMV][STREAM]00007.01.3-handbrake.MKV" 2>"[G][BDMV][STREAM]00007.01.3-handbrake.LOG"
I can do that, but there's 2 issues:
1 - How do I point HBCLI to the desired title? (remember that this is in a script and the script currently works on files, e.g., '.m2ts') and
2 - Is there an explanation/workaround for the subtitle issue?

Also, I didn't previously notice that in addition to no subs, the output also lacks chapter indexes.

Regards,
Mark.
Woodstock
Veteran User
Posts: 4614
Joined: Tue Aug 27, 2013 6:39 am

Re: get-them-all-no-matter-what setting for subtitles?

Post by Woodstock »

Subtitle and audio track numbers can be specified as "1-99" in the CLI. If you have sources with more than 99 tracks, you can use a larger number.
markfilipak
Bright Spark User
Posts: 313
Joined: Thu Aug 01, 2019 8:58 pm

Re: get-them-all-no-matter-what setting for subtitles?

Post by markfilipak »

Woodstock wrote: Sat May 02, 2020 3:41 pm Subtitle and audio track numbers can be specified as "1-99" in the CLI. If you have sources with more than 99 tracks, you can use a larger number.
Thank you. The HBCLI command is in a Windows script that's meant to be general in nature. Having to craft a custom command for each run would sorta defeat the purpose of a script. You see, I'm working to launch many runs simultaneously on groups of movies, all to run while I sleep or do my spring housecleaning.

Thanks for your concern. Be safe and stay healthy, okay?
Regards,
Mark.
Deleted User 11865

Re: get-them-all-no-matter-what setting for subtitles?

Post by Deleted User 11865 »

You should read CLI help on importing presets…
markfilipak
Bright Spark User
Posts: 313
Joined: Thu Aug 01, 2019 8:58 pm

Re: get-them-all-no-matter-what setting for subtitles?

Post by markfilipak »

Rodeo wrote: Sat May 02, 2020 4:05 pm You should read CLI help on importing presets…
Howdy, Rodeo,

I assume you mean 'handbrakecli --help'. Yeah, that was the first thing I did, and I captured it as a text file.

I further assume you refer to '--preset-import-file <filespec>'. Unfortunately, my presets are GUI presets, not '--preset-export-file <filename>' presets.
Deleted User 11865

Re: get-them-all-no-matter-what setting for subtitles?

Post by Deleted User 11865 »

Well --preset-import-gui does not take an argument, why are you passing one?
Deleted User 11865

Re: get-them-all-no-matter-what setting for subtitles?

Post by Deleted User 11865 »

Plus, you're not specifying a preset name to use…
markfilipak
Bright Spark User
Posts: 313
Joined: Thu Aug 01, 2019 8:58 pm

Re: get-them-all-no-matter-what setting for subtitles?

Post by markfilipak »

Rodeo wrote: Sat May 02, 2020 5:42 pm Well --preset-import-gui does not take an argument, why are you passing one?
Ummm... Because there must be some way to specifiy the preset I want to apply, and that seemed the way to do it, so I thought that whomever wrote the help file left the <filespec> off by mistake?...
Plus, you're not specifying a preset name to use…
Ummm... I figured having the file there would be a clue to the application?...
rollin_eng
Veteran User
Posts: 4840
Joined: Wed May 04, 2011 11:06 pm

Re: get-them-all-no-matter-what setting for subtitles?

Post by rollin_eng »

You can import presets from the GUI or a file, this means potentially multiple preset.

You then have to tell the CLI which to use.
Deleted User 11865

Re: get-them-all-no-matter-what setting for subtitles?

Post by Deleted User 11865 »

JSON files can have an infinite number of presets in them. How is HandBrake supposed to know which one to pick? Didn't we already explain this to you in another topic previously?

--preset-import-gui automatically looks for the GUI presets file, hence no need to pass a file to it; if you want to import presets from a file, then you use --preset-import-file and a path; it doesn't matter whether the preset was created by the GUI, CLI or on another platform.

Because you're clearly confused, here's the correct syntax:

Code: Select all

--preset-import-gui --preset="Preset Name"
or

Code: Select all

--preset-import-file /path/to/json/file --preset="Preset Name"
markfilipak
Bright Spark User
Posts: 313
Joined: Thu Aug 01, 2019 8:58 pm

Re: get-them-all-no-matter-what setting for subtitles?

Post by markfilipak »

Rodeo wrote: Sat May 02, 2020 5:51 pm JSON files can have an infinite number of presets in them. How is HandBrake supposed to know which one to pick? Didn't we already explain this to you in another topic previously?
"which"? There's only one preset in the '.json' file. "previously"? No. I began using HBCLI yesterday.
--preset-import-gui automatically looks for the GUI presets file, hence no need to pass a file to it; if you want to import presets from a file, then you use --preset-import-file and a path; it doesn't matter whether the preset was created by the GUI, CLI or on another platform.
The origin of the preset file doesn't matter? Well, that's good to know. The help output makes it appear that it does matter.
Because you're clearly confused, here's the correct syntax:

Code: Select all

--preset-import-gui --preset="Preset Name"
or

Code: Select all

--preset-import-file /path/to/json/file --preset="Preset Name"
Thank you. I'll give that a try.

Now all I have to figure out is how to get HBCLI to include all subtitles found no-matter-what. I don't care about the language codes. I can figure them out later and assign them in MKVToolNix. I'll be runniing a batch of transcodes overnight. Assigning labels to the subs will give me something to do in the morning.

But maybe that will become a non-issue when I use the correct preset directives. I think I read that.
rollin_eng
Veteran User
Posts: 4840
Joined: Wed May 04, 2011 11:06 pm

Re: get-them-all-no-matter-what setting for subtitles?

Post by rollin_eng »

markfilipak wrote: Sat May 02, 2020 6:17 pm
Rodeo wrote: Sat May 02, 2020 5:51 pm JSON files can have an infinite number of presets in them. How is HandBrake supposed to know which one to pick? Didn't we already explain this to you in another topic previously?
"which"? There's only one preset in the '.json' file. "previously"? No. I began using HBCLI yesterday.
The fact you have only 1 preset in it still means you have to specify which to use, yes it could default to the 1 preset but that has its own issues.
--preset-import-gui automatically looks for the GUI presets file, hence no need to pass a file to it; if you want to import presets from a file, then you use --preset-import-file and a path; it doesn't matter whether the preset was created by the GUI, CLI or on another platform.
The origin of the preset file doesn't matter? Well, that's good to know. The help output makes it appear that it does matter.
Import from GUI = No Path, import from file = Path. I believe the JSON has to be in the correct format which has changed from version to version so you are best off using the same version.
markfilipak
Bright Spark User
Posts: 313
Joined: Thu Aug 01, 2019 8:58 pm

Re: get-them-all-no-matter-what setting for subtitles?

Post by markfilipak »

By the way, I'm back from spending 3 months in ffmpeg-land. Did ya miss me? ;-)

ffmpeg has the worst documentation I've ever encountered in any application.

And by the way. I've perfected the 55-telecine via an ffmpeg modulo-5 filtergraph. In the process I uncovered a PTS bug that they're working on. The PTS bug manifests for 'interleave' filters, but only if there are subtitles. However, from reading 3 month's worth of ffmpeg-user posts, I think the PTS bug is responsible for quite a few other malfunctions.

And by the way, the 55-telecine material is gorgeous.
markfilipak
Bright Spark User
Posts: 313
Joined: Thu Aug 01, 2019 8:58 pm

Re: get-them-all-no-matter-what setting for subtitles?

Post by markfilipak »

rollin_eng wrote: Sat May 02, 2020 6:32 pmI believe the JSON has to be in the correct format which has changed from version to version so you are best off using the same version.
Thanks for the tip. They're both v. 1.3.1, but I will be careful.
markfilipak
Bright Spark User
Posts: 313
Joined: Thu Aug 01, 2019 8:58 pm

Re: get-them-all-no-matter-what setting for subtitles?

Post by markfilipak »

Oh, dear. In my enthusiasm, I forgot this:
"1 - How do I point HBCLI to the desired title?"

I afraid that's going to make using HBCLI in a script a non-starter.
rollin_eng
Veteran User
Posts: 4840
Joined: Wed May 04, 2011 11:06 pm

Re: get-them-all-no-matter-what setting for subtitles?

Post by rollin_eng »

Why?
markfilipak
Bright Spark User
Posts: 313
Joined: Thu Aug 01, 2019 8:58 pm

Re: get-them-all-no-matter-what setting for subtitles?

Post by markfilipak »

rollin_eng wrote: Sat May 02, 2020 6:50 pmWhy?
Because the script doesn't have any way of knowing the number of the desired title. All it knows is either 'D:\BDMV\STREAM\xxxxx.M2TS' or 'D:\VIDEO_TS\VTS_xx_x.VOB'.

Oh, I suppose I could query the user for title number at startup within each script. It's not clean, but it's a way (I guess). It would really be nice if I could feed HBCLI an '.M2TS' and if it then looked through the clips & playlists and matched everything up. Oh, well. I can't have everything, can I?
markfilipak
Bright Spark User
Posts: 313
Joined: Thu Aug 01, 2019 8:58 pm

Re: get-them-all-no-matter-what setting for subtitles?

Post by markfilipak »

I imagine I'll eventually develop the script to process an entire disc and detect video properties and apply one set of applications+arguments to 24FPS material and another set of applications+arguments to hard-telecined material, but that's a long way off.

I would basically tell it 'this disc' and it would transcode everything. Then I would just throw away the previews and menu screens and whatnot.
rollin_eng
Veteran User
Posts: 4840
Joined: Wed May 04, 2011 11:06 pm

Re: get-them-all-no-matter-what setting for subtitles?

Post by rollin_eng »

HB can read the disc structure and report all the titles

If you feed it a m2ts how do you know which one to chose? What if the m2ts is in multiple titles?
markfilipak
Bright Spark User
Posts: 313
Joined: Thu Aug 01, 2019 8:58 pm

Re: get-them-all-no-matter-what setting for subtitles?

Post by markfilipak »

rollin_eng wrote: Sat May 02, 2020 7:09 pm HB can read the disc structure and report all the titles

If you feed it a m2ts how do you know which one to chose?
I preview them via MPV.
What if the m2ts is in multiple titles?
I've not seen that case. Choosing an M2TS always works for MKVToolNix and for ffmpeg. HB is the odd man out. I suppose that an M2TS that appears in several differing playllists is a 'don't care' to me. After all, I don't replicate the menu system. My output is a pile of MKVs that I put descriptive names to after the fact and then browse with a file browser.
Deleted User 11865

Re: get-them-all-no-matter-what setting for subtitles?

Post by Deleted User 11865 »

markfilipak wrote: Sat May 02, 2020 6:17 pm
Rodeo wrote: Sat May 02, 2020 5:51 pm JSON files can have an infinite number of presets in them. How is HandBrake supposed to know which one to pick? Didn't we already explain this to you in another topic previously?
"which"? There's only one preset in the '.json' file.
In this specific file, maybe. But generally speaking, there can be an infinite number of presets in a HandBrake presets file.

Code: Select all

HandBrakeCLI -i /path/to/input --scan
…will scan all titles and, at the end, give you a list of all titles (for Blu-ray, also indicating the corresponding playlist number in its output). If you're good at scripting it shouldn't be too hard to program which title to use.

If your source is a movie and does NOT have multiple fake titles (unfortunately, some DVD and Blu-ray discs do in order to make it harder for pirates to encode the correct title), you can skip the --title option and use this instead:

Code: Select all

--main-feature
…which, BTW, is documented in CLI help, just under title selection and the scan feature :P
Deleted User 11865

Re: get-them-all-no-matter-what setting for subtitles?

Post by Deleted User 11865 »

markfilipak wrote: Sat May 02, 2020 7:21 pm
What if the m2ts is in multiple titles?
I've not seen that case.
https://en.wikipedia.org/wiki/Seamless_branching

Star Wars, Terminator 2, the Alien collection on Blu-ray come to mind off the top of my head, but there's literally dozens if not hundreds of releases with multiple files per title.
markfilipak
Bright Spark User
Posts: 313
Joined: Thu Aug 01, 2019 8:58 pm

Re: get-them-all-no-matter-what setting for subtitles?

Post by markfilipak »

Rodeo wrote: Sat May 02, 2020 7:29 pm

Code: Select all

HandBrakeCLI -i /path/to/input --scan
…will scan all titles and, at the end, give you a list of all titles (for Blu-ray, also indicating the corresponding playlist number in its output). If you're good at scripting it shouldn't be too hard to program which title to use.
Cool. I will automatically/script-wise take that list and generate 'n' number of jobs and launch them en masse.
If your source is a movie and does NOT have multiple fake titles (unfortunately, some DVD and Blu-ray discs do in order to make it harder for pirates to encode the correct title), you can skip the --title option and use this instead:

Code: Select all

--main-feature
…which, BTW, is documented in CLI help, just under title selection and the scan feature :P
Yeah, I saw that. In my case, I want everything.
Post Reply