Help with burned in subtitles in CLI command

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
DConroy
Posts: 2
Joined: Fri Apr 15, 2022 12:24 pm

Help with burned in subtitles in CLI command

Post by DConroy »

Description of problem or question:
I'm trying to automate a process I do by hand now, and works in the GUI. I want the resulting files to have english subtitles burned in to the video, and for the "forced" scenarios only, such as when two characters are speaking spanish, or klingon or something. :)
I can do this in the gui by going to the subtitles tab, and listing two entries...
Foreign Audio Search Forced: Yes, Burned: Yes
English Forced: Yes, Burned Yes

I believe it also works when I only have the English entry.


Steps to reproduce the problem (If Applicable):
I have been running the following command with no luck:
HandbrakeCLI --preset "Apple 1080p30 Surround" -i source.mkv -o test.mp4 --subtitle=1 --subtitle-forced=1 --subtitle-burned=1



HandBrake version (e.g., 1.0.0):
1.5.1



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



HandBrake Activity Log ***required*** (see How-to get an activity log)
Can't seem to find the log in the place in the above link, and since CLI, no window to copy from, but I grabbed from the terminal window just as one test starts to do encoding passes.

Code: Select all


0:51] Compile-time hardening features are enabled
[08:30:51] hb_init: starting libhb thread
[08:30:51] thread 16fc27000 started ("libhb")
HandBrake 1.5.1 (2022011000) - Darwin arm64 - https://handbrake.fr
10 CPUs detected
Opening source.mkv...
[08:30:51] CPU: 
[08:30:51]  - logical processor count: 10
[08:30:51] hb_scan: path=source.mkv, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
disc.c:333: failed opening UDF image source.mkv
disc.c:437: error opening file BDMV/index.bdmv
disc.c:437: error opening file BDMV/BACKUP/index.bdmv
bluray.c:2646: nav_get_title_list(source.mkv/) failed
[08:30:51] bd: not a bd - trying as a stream/file instead
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
[08:30:51] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from 'source.mkv':
  Metadata:
    title           : Redacted
    encoder         : libebml v1.4.2 + libmatroska v1.6.4
    creation_time   : 2022-01-25T06:01:03.000000Z
  Duration: 02:35:50.30, start: 0.000000, bitrate: 31671 kb/s
  Chapters:
    Chapter #0:0: start 0.000000, end 403.194000
      Metadata:
        title           : Chapter 01
    Chapter #0:1: start 403.194000, end 1222.888000
      Metadata:
        title           : Chapter 02
    Chapter #0:2: start 1222.888000, end 1871.703000
      Metadata:
        title           : Chapter 03
    Chapter #0:3: start 1871.703000, end 2104.436000
      Metadata:
        title           : Chapter 04
    Chapter #0:4: start 2104.436000, end 2581.412000
      Metadata:
        title           : Chapter 05
    Chapter #0:5: start 2581.412000, end 2969.008000
      Metadata:
        title           : Chapter 06
    Chapter #0:6: start 2969.008000, end 3350.097000
      Metadata:
        title           : Chapter 07
    Chapter #0:7: start 3350.097000, end 3749.537000
      Metadata:
        title           : Chapter 08
    Chapter #0:8: start 3749.537000, end 4076.531000
      Metadata:
        title           : Chapter 09
    Chapter #0:9: start 4076.531000, end 4239.569000
      Metadata:
        title           : Chapter 10
    Chapter #0:10: start 4239.569000, end 4738.275000
      Metadata:
        title           : Chapter 11
    Chapter #0:11: start 4738.275000, end 5076.780000
      Metadata:
        title           : Chapter 12
    Chapter #0:12: start 5076.780000, end 5396.516000
      Metadata:
        title           : Chapter 13
    Chapter #0:13: start 5396.516000, end 5763.049000
      Metadata:
        title           : Chapter 14
    Chapter #0:14: start 5763.049000, end 6167.578000
      Metadata:
        title           : Chapter 15
    Chapter #0:15: start 6167.578000, end 6387.881000
      Metadata:
        title           : Chapter 16
    Chapter #0:16: start 6387.881000, end 6711.163000
      Metadata:
        title           : Chapter 17
    Chapter #0:17: start 6711.163000, end 6957.951000
      Metadata:
        title           : Chapter 18
    Chapter #0:18: start 6957.951000, end 7306.132000
      Metadata:
        title           : Chapter 19
    Chapter #0:19: start 7306.132000, end 7590.249000
      Metadata:
        title           : Chapter 20
    Chapter #0:20: start 7590.249000, end 7901.894000
      Metadata:
        title           : Chapter 21
    Chapter #0:21: start 7901.894000, end 8192.351000
      Metadata:
        title           : Chapter 22
    Chapter #0:22: start 8192.351000, end 8590.665000
      Metadata:
        title           : Chapter 23
    Chapter #0:23: start 8590.665000, end 8745.028000
      Metadata:
        title           : Chapter 24
    Chapter #0:24: start 8745.028000, end 8876.493000
      Metadata:
        title           : Chapter 25
    Chapter #0:25: start 8876.493000, end 9267.175000
      Metadata:
        title           : Chapter 26
    Chapter #0:26: start 9267.175000, end 9350.304000
      Metadata:
        title           : Chapter 27
  Stream #0:0: Video: h264 (High), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
    Metadata:
      BPS-eng         : 25839572
      DURATION-eng    : 02:35:50.299000000
      NUMBER_OF_FRAMES-eng: 224183
      NUMBER_OF_BYTES-eng: 30200965687
      _STATISTICS_WRITING_APP-eng: mkvmerge v55.0.0 ('Waiting For Space') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2022-01-25 06:01:03
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:1(eng): Audio: dts (DTS-HD MA), 48000 Hz, 7.1, s32p (24 bit) (default)
    Metadata:
      title           : DTS-HD MA 7.1
      BPS-eng         : 4848929
      DURATION-eng    : 02:35:50.304000000
      NUMBER_OF_FRAMES-eng: 876591
      NUMBER_OF_BYTES-eng: 5667370456
      _STATISTICS_WRITING_APP-eng: mkvmerge v55.0.0 ('Waiting For Space') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2022-01-25 06:01:03
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:2(eng): Audio: ac3, 48000 Hz, stereo, fltp, 320 kb/s
    Metadata:
      title           : Audio Description / AC-3 2.0
      BPS-eng         : 320000
      DURATION-eng    : 02:35:50.304000000
      NUMBER_OF_FRAMES-eng: 292197
      NUMBER_OF_BYTES-eng: 374012160
      _STATISTICS_WRITING_APP-eng: mkvmerge v55.0.0 ('Waiting For Space') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2022-01-25 06:01:03
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:3(eng): Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
    Metadata:
      title           : Commentary Track / AC-3 2.0
      BPS-eng         : 192000
      DURATION-eng    : 02:35:50.304000000
      NUMBER_OF_FRAMES-eng: 292197
      NUMBER_OF_BYTES-eng: 224407296
      _STATISTICS_WRITING_APP-eng: mkvmerge v55.0.0 ('Waiting For Space') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2022-01-25 06:01:03
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:4(eng): Subtitle: hdmv_pgs_subtitle, 1920x1080
    Metadata:
      BPS-eng         : 35085
      DURATION-eng    : 02:35:34.867000000
      NUMBER_OF_FRAMES-eng: 4430
      NUMBER_OF_BYTES-eng: 40940362
      _STATISTICS_WRITING_APP-eng: mkvmerge v55.0.0 ('Waiting For Space') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2022-01-25 06:01:03
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:5(fre): Subtitle: hdmv_pgs_subtitle, 1920x1080
    Metadata:
      BPS-eng         : 22534
      DURATION-eng    : 02:35:39.830000000
      NUMBER_OF_FRAMES-eng: 3140
      NUMBER_OF_BYTES-eng: 26308844
      _STATISTICS_WRITING_APP-eng: mkvmerge v55.0.0 ('Waiting For Space') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2022-01-25 06:01:03
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:6(ger): Subtitle: hdmv_pgs_subtitle, 1920x1080
    Metadata:
      BPS-eng         : 23902
      DURATION-eng    : 02:35:40.373000000
      NUMBER_OF_FRAMES-eng: 3010
      NUMBER_OF_BYTES-eng: 27907430
      _STATISTICS_WRITING_APP-eng: mkvmerge v55.0.0 ('Waiting For Space') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2022-01-25 06:01:03
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:7(dut): Subtitle: hdmv_pgs_subtitle, 1920x1080
    Metadata:
      BPS-eng         : 25060
      DURATION-eng    : 02:35:40.373000000
      NUMBER_OF_FRAMES-eng: 2804
      NUMBER_OF_BYTES-eng: 29258834
      _STATISTICS_WRITING_APP-eng: mkvmerge v55.0.0 ('Waiting For Space') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2022-01-25 06:01:03
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:8(dan): Subtitle: hdmv_pgs_subtitle, 1920x1080
    Metadata:
      BPS-eng         : 22938
      DURATION-eng    : 02:35:40.289000000
      NUMBER_OF_FRAMES-eng: 2220
      NUMBER_OF_BYTES-eng: 26781293
      _STATISTICS_WRITING_APP-eng: mkvmerge v55.0.0 ('Waiting For Space') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2022-01-25 06:01:03
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:9(fin): Subtitle: hdmv_pgs_subtitle, 1920x1080
    Metadata:
      BPS-eng         : 27110
      DURATION-eng    : 02:35:40.373000000
      NUMBER_OF_FRAMES-eng: 3336
      NUMBER_OF_BYTES-eng: 31653075
      _STATISTICS_WRITING_APP-eng: mkvmerge v55.0.0 ('Waiting For Space') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2022-01-25 06:01:03
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:10(nor): Subtitle: hdmv_pgs_subtitle, 1920x1080
    Metadata:
      BPS-eng         : 24051
      DURATION-eng    : 02:35:40.373000000
      NUMBER_OF_FRAMES-eng: 3310
      NUMBER_OF_BYTES-eng: 28080913
      _STATISTICS_WRITING_APP-eng: mkvmerge v55.0.0 ('Waiting For Space') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2022-01-25 06:01:03
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:11(swe): Subtitle: hdmv_pgs_subtitle, 1920x1080
    Metadata:
      BPS-eng         : 23737
      DURATION-eng    : 02:35:40.122000000
      NUMBER_OF_FRAMES-eng: 2636
      NUMBER_OF_BYTES-eng: 27713513
      _STATISTICS_WRITING_APP-eng: mkvmerge v55.0.0 ('Waiting For Space') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2022-01-25 06:01:03
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:12(eng): Subtitle: hdmv_pgs_subtitle, 1920x1080
    Metadata:
      BPS-eng         : 74658
      DURATION-eng    : 02:35:48.506000000
      NUMBER_OF_FRAMES-eng: 6228
      NUMBER_OF_BYTES-eng: 87243076
      _STATISTICS_WRITING_APP-eng: mkvmerge v55.0.0 ('Waiting For Space') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2022-01-25 06:01:03
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:13(fre): Subtitle: hdmv_pgs_subtitle, 1920x1080
    Metadata:
      BPS-eng         : 60458
      DURATION-eng    : 02:35:48.506000000
      NUMBER_OF_FRAMES-eng: 5988
      NUMBER_OF_BYTES-eng: 70649721
      _STATISTICS_WRITING_APP-eng: mkvmerge v55.0.0 ('Waiting For Space') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2022-01-25 06:01:03
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:14(ger): Subtitle: hdmv_pgs_subtitle, 1920x1080
    Metadata:
      BPS-eng         : 70550
      DURATION-eng    : 02:35:48.506000000
      NUMBER_OF_FRAMES-eng: 5996
      NUMBER_OF_BYTES-eng: 82443040
      _STATISTICS_WRITING_APP-eng: mkvmerge v55.0.0 ('Waiting For Space') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2022-01-25 06:01:03
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:15(dut): Subtitle: hdmv_pgs_subtitle, 1920x1080
    Metadata:
      BPS-eng         : 55482
      DURATION-eng    : 02:35:46.754000000
      NUMBER_OF_FRAMES-eng: 4468
      NUMBER_OF_BYTES-eng: 64823085
      _STATISTICS_WRITING_APP-eng: mkvmerge v55.0.0 ('Waiting For Space') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2022-01-25 06:01:03
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
[08:30:51] scan: decoding previews for title 1
[08:30:51] scan: audio 0x1: dca, rate=48000Hz, bitrate=1 English (DTS-HD MA) (7.1 ch)
[08:30:51] scan: audio 0x2: ac3, rate=48000Hz, bitrate=320000 English (AC3) (2.0 ch) (320 kbps)
[08:30:51] scan: audio 0x3: ac3, rate=48000Hz, bitrate=192000 English (AC3) (2.0 ch) (192 kbps)
Scanning title 1 of 1, preview 10, 100.00 %[08:30:52] scan: 10 previews, 1920x1080, 23.976 fps, autocrop = 138/138/0/0, aspect 16:9, PAR 1:1, color profile: 1-1-1, chroma location: left
[08:30:52] libhb: scan thread found 1 valid title(s)
+ Using preset: Apple 1080p30 Surround
+ title 1:
  + stream: source.mkv
  + duration: 02:35:50
  + size: 1920x1080, pixel aspect: 1/1, display aspect: 1.78, 23.976 fps
  + autocrop: 138/138/0/0
  + chapters:
    + 1: duration 00:06:43
    + 2: duration 00:13:40
    + 3: duration 00:10:49
    + 4: duration 00:03:53
    + 5: duration 00:07:57
    + 6: duration 00:06:28
    + 7: duration 00:06:21
    + 8: duration 00:06:39
    + 9: duration 00:05:27
    + 10: duration 00:02:43
    + 11: duration 00:08:19
    + 12: duration 00:05:39
    + 13: duration 00:05:20
    + 14: duration 00:06:07
    + 15: duration 00:06:45
    + 16: duration 00:03:40
    + 17: duration 00:05:23
    + 18: duration 00:04:07
    + 19: duration 00:05:48
    + 20: duration 00:04:44
    + 21: duration 00:05:12
    + 22: duration 00:04:50
    + 23: duration 00:06:38
    + 24: duration 00:02:34
    + 25: duration 00:02:11
    + 26: duration 00:06:31
    + 27: duration 00:01:23
  + audio tracks:
    + 1, English (DTS-HD MA) (7.1 ch) (iso639-2: eng)
    + 2, English (AC3) (2.0 ch) (320 kbps) (iso639-2: eng), 48000Hz, 320000bps
    + 3, English (AC3) (2.0 ch) (192 kbps) (iso639-2: eng), 48000Hz, 192000bps
  + subtitle tracks:
    + 1, English [PGS]
    + 2, Francais [PGS]
    + 3, Deutsch [PGS]
    + 4, Nederlands [PGS]
    + 5, dansk [PGS]
    + 6, suomi [PGS]
    + 7, norsk [PGS]
    + 8, svenska [PGS]
    + 9, English [PGS]
    + 10, Francais [PGS]
    + 11, Deutsch [PGS]
    + 12, Nederlands [PGS]
[08:30:52] Starting work at: Fri Apr 15 08:30:52 2022

[08:30:52] 1 job(s) to process
[08:30:52] json job:
{
    "Audio": {
        "AudioList": [
            {
                "Bitrate": 160,
                "CompressionLevel": -1.0,
                "DRC": 0.0,
                "DitherMethod": "auto",
                "Encoder": "ca_aac",
                "Gain": 0.0,
                "Mixdown": "stereo",
                "Name": "DTS-HD MA 7.1",
                "NormalizeMixLevel": false,
                "PresetEncoder": "ca_aac",
                "Quality": -3.0,
                "Samplerate": 0,
                "Track": 0
            },
            {
                "Bitrate": 640,
                "CompressionLevel": -1.0,
                "DRC": 0.0,
                "DitherMethod": "auto",
                "Encoder": "ac3",
                "Gain": 0.0,
                "Mixdown": "5point1",
                "Name": "DTS-HD MA 7.1",
                "NormalizeMixLevel": false,
                "PresetEncoder": "copy:ac3",
                "Quality": -3.0,
                "Samplerate": 0,
                "Track": 0
            }
        ],
        "CopyMask": [
            "copy:aac",
            "copy:ac3"
        ],
        "FallbackEncoder": "ca_aac"
    },
    "Destination": {
        "AlignAVStart": false,
        "ChapterList": [
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 6,
                    "Seconds": 43,
                    "Ticks": 36287460
                },
                "Name": "Chapter 1"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 13,
                    "Seconds": 40,
                    "Ticks": 73772460
                },
                "Name": "Chapter 2"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 10,
                    "Seconds": 49,
                    "Ticks": 58393350
                },
                "Name": "Chapter 3"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 3,
                    "Seconds": 53,
                    "Ticks": 20945970
                },
                "Name": "Chapter 4"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 7,
                    "Seconds": 57,
                    "Ticks": 42927840
                },
                "Name": "Chapter 5"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 6,
                    "Seconds": 28,
                    "Ticks": 34883640
                },
                "Name": "Chapter 6"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 6,
                    "Seconds": 21,
                    "Ticks": 34298010
                },
                "Name": "Chapter 7"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 6,
                    "Seconds": 39,
                    "Ticks": 35949600
                },
                "Name": "Chapter 8"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 5,
                    "Seconds": 27,
                    "Ticks": 29429460
                },
                "Name": "Chapter 9"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 2,
                    "Seconds": 43,
                    "Ticks": 14673420
                },
                "Name": "Chapter 10"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 8,
                    "Seconds": 19,
                    "Ticks": 44883540
                },
                "Name": "Chapter 11"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 5,
                    "Seconds": 39,
                    "Ticks": 30465450
                },
                "Name": "Chapter 12"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 5,
                    "Seconds": 20,
                    "Ticks": 28776240
                },
                "Name": "Chapter 13"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 6,
                    "Seconds": 7,
                    "Ticks": 32987970
                },
                "Name": "Chapter 14"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 6,
                    "Seconds": 45,
                    "Ticks": 36407610
                },
                "Name": "Chapter 15"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 3,
                    "Seconds": 40,
                    "Ticks": 19827270
                },
                "Name": "Chapter 16"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 5,
                    "Seconds": 23,
                    "Ticks": 29095380
                },
                "Name": "Chapter 17"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 4,
                    "Seconds": 7,
                    "Ticks": 22210920
                },
                "Name": "Chapter 18"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 5,
                    "Seconds": 48,
                    "Ticks": 31336290
                },
                "Name": "Chapter 19"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 4,
                    "Seconds": 44,
                    "Ticks": 25570530
                },
                "Name": "Chapter 20"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 5,
                    "Seconds": 12,
                    "Ticks": 28048050
                },
                "Name": "Chapter 21"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 4,
                    "Seconds": 50,
                    "Ticks": 26141130
                },
                "Name": "Chapter 22"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 6,
                    "Seconds": 38,
                    "Ticks": 35848260
                },
                "Name": "Chapter 23"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 2,
                    "Seconds": 34,
                    "Ticks": 13892670
                },
                "Name": "Chapter 24"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 2,
                    "Seconds": 11,
                    "Ticks": 11831850
                },
                "Name": "Chapter 25"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 6,
                    "Seconds": 31,
                    "Ticks": 35161380
                },
                "Name": "Chapter 26"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 1,
                    "Seconds": 23,
                    "Ticks": 7481610
                },
                "Name": "Chapter 27"
            }
        ],
        "ChapterMarkers": true,
        "File": "test.mp4",
        "InlineParameterSets": false,
        "Mp4Options": {
            "IpodAtom": false,
            "Mp4Optimize": false
        },
        "Mux": "m4v"
    },
    "Filters": {
        "FilterList": [
            {
                "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": 4,
                "Settings": {
                    "mode": "7"
                }
            },
            {
                "ID": 6,
                "Settings": {
                    "mode": 2,
                    "rate": "27000000/900000"
                }
            },
            {
                "ID": 13,
                "Settings": {
                    "crop-bottom": 138,
                    "crop-left": 0,
                    "crop-right": 0,
                    "crop-top": 138,
                    "height": 804,
                    "width": 1920
                }
            }
        ]
    },
    "Metadata": {
        "Name": "Redacted"
    },
    "PAR": {
        "Den": 1,
        "Num": 1
    },
    "SequenceID": 0,
    "Source": {
        "Angle": 0,
        "Path": "source.mkv",
        "Range": {
            "End": 27,
            "Start": 1,
            "Type": "chapter"
        },
        "Title": 1
    },
    "Subtitle": {
        "Search": {
            "Burn": false,
            "Default": true,
            "Enable": true,
            "Forced": true
        },
        "SubtitleList": [
            {
                "Burn": true,
                "Default": false,
                "Forced": true,
                "Track": 0
            }
        ]
    },
    "Video": {
        "ChromaLocation": 1,
        "ColorInputFormat": 0,
        "ColorMatrix": 1,
        "ColorOutputFormat": 0,
        "ColorPrimaries": 1,
        "ColorRange": 0,
        "ColorTransfer": 1,
        "Encoder": "x264",
        "Level": "4.0",
        "Options": "",
        "Preset": "medium",
        "Profile": "high",
        "QSV": {
            "AdapterIndex": 0,
            "AsyncDepth": 0,
            "Decode": false
        },
        "Quality": 22.0,
        "Tune": "",
        "Turbo": false,
        "TwoPass": false
    }
}
[08:30:52] Starting Task: Subtitle Scan
[08:30:52] job configuration:
[08:30:52]  * source
[08:30:52]    + source.mkv
[08:30:52]    + title 1, chapter(s) 1 to 27
[08:30:52]    + container: matroska,webm
[08:30:52]    + data rate: 31671 kbps
[08:30:52]  * destination
[08:30:52]    + test.mp4
[08:30:52]    + container: MPEG-4 (libavformat)
[08:30:52]      + chapter markers
[08:30:52]  * video track
[08:30:52]    + decoder: h264 8-bit (yuv420p)
[08:30:52]    + filters
[08:30:52]      + 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)
[08:30:52]      + Decomb (mode=39)
[08:30:52]      + Framerate Shaper (mode=2:rate=27000000/900000)
[08:30:52]        + frame rate: 23.976 fps -> peak rate limited to 30.000 fps
[08:30:52]      + Crop and Scale (width=1920:height=804:crop-top=138:crop-bottom=138:crop-left=0:crop-right=0)
[08:30:52]        + source: 1920 * 1080, crop (138/138/0/0): 1920 * 804, scale: 1920 * 804
[08:30:52]    + Output geometry
[08:30:52]      + storage dimensions: 1920 x 804
[08:30:52]      + pixel aspect ratio: 1 : 1
[08:30:52]      + display dimensions: 1920 x 804
[08:30:52]  * Foreign Audio Search: Passthrough, Forced Only, Default
[08:30:52]    + subtitle, English [PGS] (track 0, id 0x4, Picture)
[08:30:52]    + subtitle, English [PGS] (track 8, id 0xc, Picture)
[08:30:52] sync: expecting 224183 video frames
Encoding: task 1 of 2, 99.91 % (0.00 fps, avg 0.00 fps, ETA 00h00m00s)[08:37:16] reader: done. 1 scr changes
[08:37:16] work: average encoding speed for job is 0.000000 fps
[08:37:16] comb detect: heavy 0 | light 0 | uncombed 0 | total 0
[08:37:16] decomb: deinterlaced 0 | blended 0 | unfiltered 0 | total 0
[08:37:16] vfr: 0 frames output, 0 dropped and 0 duped for CFR/PFR
[08:37:16] vfr: lost time: 0 (0 frames)
[08:37:16] vfr: gained time: 0 (0 frames) (0 not accounted for)
[08:37:16] h264-decoder done: 0 frames, 0 decoder errors
[08:37:16] sync: got 0 frames, 224183 expected
Encoding: task 1 of 2, 100.00 % (0.00 fps, avg 0.00 fps, ETA 00h00m00s)[08:37:16] Subtitle track 0 (id 0x4) 'English [PGS]': 2212 hits (0 forced)
[08:37:16] Subtitle track 8 (id 0xc) 'English [PGS]': 3113 hits (0 forced)
[08:37:16] No candidate detected during subtitle scan
[08:37:16] Starting Task: Encoding Pass
[08:37:16] job configuration:
[08:37:16]  * source
[08:37:16]    + source.mkv
[08:37:16]    + title 1, chapter(s) 1 to 27
[08:37:16]    + container: matroska,webm
[08:37:16]    + data rate: 31671 kbps
[08:37:16]  * destination
[08:37:16]    + test.mp4
[08:37:16]    + container: MPEG-4 (libavformat)
[08:37:16]      + chapter markers
[08:37:16]  * video track
[08:37:16]    + decoder: h264 8-bit (yuv420p)
[08:37:16]    + filters
[08:37:16]      + 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)
[08:37:16]      + Decomb (mode=39)
[08:37:16]      + Framerate Shaper (mode=2:rate=27000000/900000)
[08:37:16]        + frame rate: 23.976 fps -> peak rate limited to 30.000 fps
[08:37:16]      + Subtitle renderer ()
[08:37:16]      + Crop and Scale (width=1920:height=804:crop-top=138:crop-bottom=138:crop-left=0:crop-right=0)
[08:37:16]        + source: 1920 * 1080, crop (138/138/0/0): 1920 * 804, scale: 1920 * 804
[08:37:16]    + Output geometry
[08:37:16]      + storage dimensions: 1920 x 804
[08:37:16]      + pixel aspect ratio: 1 : 1
[08:37:16]      + display dimensions: 1920 x 804
[08:37:16]    + encoder: H.264 (libx264)
[08:37:16]      + preset:  medium
[08:37:16]      + profile: high
[08:37:16]      + level:   4.0
[08:37:16]      + quality: 22.00 (RF)
[08:37:16]      + color profile: 1-1-1
[08:37:16]      + chroma location: left
[08:37:16]  * subtitle track 1, English [PGS] (track 0, id 0x4, Picture) -> Render/Burn-in, Forced Only
[08:37:16]  * audio track 1
[08:37:16]    + name: DTS-HD MA 7.1
[08:37:16]    + decoder: English (DTS-HD MA) (7.1 ch) (track 1, id 0x1)
[08:37:16]      + samplerate: 48000 Hz
[08:37:16]    + mixdown: Stereo
[08:37:16]    + encoder: AAC (Apple AudioToolbox)
[08:37:16]      + bitrate: 160 kbps, samplerate: 48000 Hz
[08:37:16]  * audio track 2
[08:37:16]    + name: DTS-HD MA 7.1
[08:37:16]    + decoder: English (DTS-HD MA) (7.1 ch) (track 1, id 0x1)
[08:37:16]      + samplerate: 48000 Hz
[08:37:16]    + mixdown: 5.1 Channels
[08:37:16]    + encoder: AC3 (libavcodec)
[08:37:16]      + bitrate: 640 kbps, samplerate: 48000 Hz
[08:37:17] sync: expecting 224183 video frames
[08:37:17] encx264: min-keyint: 24, keyint: 240
[08:37:17] encx264: encoding at constant RF 22.000000
[08:37:17] encx264: unparsed options: level=4.0:vbv-bufsize=31250:vbv-maxrate=25000
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: ARMv8 NEON
x264 [info]: profile High, level 4.0, 4:2:0, 8-bit
[08:37:17] sync: first pts video is 0
[08:37:17] sync: "Chapter 1" (1) at frame 1 time 0
[08:37:17] sync: first pts audio 0x1 is 0
[08:37:17] sync: first pts audio 0x1 is 0
Woodstock
Veteran User
Posts: 4613
Joined: Tue Aug 27, 2013 6:39 am

Re: Help with burned in subtitles in CLI command

Post by Woodstock »

You're actually telling the GUI to burn two tracks; the one specified by "Foreign Audio Search", and the one specified by the English forced command. It isn't going to try burning both, but you have targeted both in your command. It isn't going to be exactly what you want, unless there is only one subtitle available... And it isn't likely, given the strings happening in your example. That isn't relevant to the request, though.

Your command line specifies to burn the #1 command line string in to the output file. Is this the correct string? You should get the first subtitle string found in the source, and it will be burned in. But, that might not be the string you want; you might get the first "partial set" of subtitles, or nothing.

Also, with the string you've given, you should be getting a file that contains "test" in its name that contains the output from the exchange.
DConroy
Posts: 2
Joined: Fri Apr 15, 2022 12:24 pm

Re: Help with burned in subtitles in CLI command

Post by DConroy »

I don't know why this is so confusing to me.
Unfortunately, what I stated originally wasn't true... I didn't get this to work as I stated in the GUI. What seemed to work in the GUI was Foreign Audio Search yes/yes, English(subtitle index 1) no/yes.

But I tried again from the CLI, and it DID burn in the parts that needed subtitles, but ALSO burned in all english dialog....not what was desired.

What I'm looking for, is what is the correct CLI commands to get the desired effect. English subtitles burned in, but only for non-english dialog in the spoken scene...

I have a different file, a TV episode that this worked on(spanish speaking scenes had subtitles, english scenes did not)...but the file in question above, it does not work the same.
HandbrakeCLI --preset "Apple 1080p30 Surround" -i source.mkv -o test.mp4 --subtitle=1 --subtitle-burned=1
floffy
Posts: 5
Joined: Tue Aug 09, 2022 1:35 pm

Re: Help with burned in subtitles in CLI command

Post by floffy »

best thing , if i understand , it use PROFILE create in GUI handbrake in the BAT files ( i export it ) , you can Specify all of it
i post a 2 script in the forum 'start1280' and priority
it work on my 2 Windows-10
Post Reply