Skip to content

Subtitle Mutilated During Re-encode (Coversion to ASS) #6155

@Dougal666

Description

@Dougal666

Problem Description

When doing a re-encode with de-telecine, I include the subtitles (as passthru), so they'll be re-sync'd with the video.

Today I wanted to modify something in a post-sync subtitle and found a line missing... comparing it with the original I discovered it was literally butchered: most timecodes had their text truncated to two lines only, some were just deleted entirely (e.g. line 5 in the original).

Included are the original subtitle and the post-encode version (I'm also including a SRT version, for easy comparison to the original).
subtitles.zip

Activity Log, Crash Log or any other details

HandBrake 1.7.3 (2024021000)
OS: Microsoft Windows NT 10.0.19045.0
CPU: Intel(R) Pentium(R) CPU G4560 @ 3.50GHz
Ram: 8064 MB, 
GPU Information:
  Intel(R) HD Graphics 610 - 31.0.101.2128
Screen: 1920x1080
Temp Dir: C:\Users\Rosemary\AppData\Local\Temp\
Install Dir: C:\Program Files\HandBrake\
Data Dir: C:\Users\Rosemary\AppData\Roaming\HandBrake

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

 # Starting Encode ...

[13:59:14] base preset: HDTV 2 (Modified)
[13:59:15] Remote Process started with Process ID: 6364 using port: 8037. Max Allowed Instances: 1
[13:59:16] Worker: Starting HandBrake Engine ...
[13:59:16] Worker: Parent Process Id 3976
[13:59:16] Worker: Starting Web Server on port 8037 ...
[13:59:16] Worker: Starting Listener: 1
[13:59:16] Worker: Server Started
[13:59:16] Worker: Disconnected worker monitoring enabled!
[13:59:17] Compile-time hardening features are enabled
Cannot load nvEncodeAPI64.dll
[13:59:17] vcn: not available on this system
[13:59:18] qsv: is available on this system
[13:59:19] hb_init: starting libhb thread
[13:59:19] Starting work at: Wed Jun 26 13:59:19 2024
[13:59:19] 1 job(s) to process
[13:59:19] json job:
{
  "Audio": {
    "AudioList": [
      {
        "DRC": 0,
        "Encoder": "copy:aac",
        "Gain": 0,
        "Mixdown": -1,
        "NormalizeMixLevel": false,
        "Samplerate": 0,
        "Track": 0,
        "DitherMethod": 0
      }
    ],
    "CopyMask": [
      "copy:aac",
      "copy:ac3"
    ],
    "FallbackEncoder": "av_aac"
  },
  "Destination": {
    "ChapterList": [],
    "ChapterMarkers": false,
    "AlignAVStart": false,
    "File": "C:\\Users\\Rosemary\\Downloads\\A Spectacular Showdown 1959 1080i HDTV AAC2.0 MPEG2-JPTVclub_QSV-icq21.mkv",
    "Options": {
      "IpodAtom": false,
      "Optimize": false
    },
    "Mux": "av_mkv"
  },
  "Filters": {
    "FilterList": [
      {
        "ID": 3,
        "Settings": {}
      },
      {
        "ID": 19,
        "Settings": {
          "crop-bottom": "134",
          "crop-left": "4",
          "crop-right": "2",
          "crop-top": "132",
          "height": "814",
          "width": "1912"
        }
      },
      {
        "ID": 10,
        "Settings": {
          "mode": "1",
          "rate": "27000000/1126125"
        }
      }
    ]
  },
  "PAR": {
    "Num": 1,
    "Den": 1
  },
  "Metadata": {},
  "SequenceID": 0,
  "Source": {
    "Angle": 1,
    "Range": {
      "Type": "chapter",
      "Start": 1,
      "End": 1
    },
    "Title": 1,
    "Path": "I:\\0_ACM\\A Spectacular Showdown 1959 1080i HDTV AAC2.0 MPEG2-JPTVclub.mkv",
    "HWDecode": 6
  },
  "Subtitle": {
    "Search": {
      "Burn": false,
      "Default": false,
      "Enable": false,
      "Forced": false
    },
    "SubtitleList": [
      {
        "Burn": false,
        "Default": false,
        "Forced": false,
        "ID": 1,
        "Offset": 0,
        "Track": 0,
        "Name": "OCR from DVD vobsub"
      },
      {
        "Burn": false,
        "Default": false,
        "Forced": false,
        "ID": 2,
        "Offset": 0,
        "Track": 1
      }
    ]
  },
  "Video": {
    "Encoder": "qsv_h265_10bit",
    "Level": "auto",
    "MultiPass": false,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Options": "",
    "Preset": "quality",
    "Profile": "auto",
    "Quality": 21,
    "QSV": {
      "Decode": true
    },
    "HardwareDecode": 0
  }
}
[13:59:19] CPU: Intel(R) Pentium(R) CPU G4560 @ 3.50GHz
[13:59:19]  - Intel microarchitecture Kaby Lake
[13:59:19]  - logical processor count: 4
[13:59:19] Intel Quick Sync Video support: yes, gpu list: 0
[13:59:19] Intel Quick Sync Video integrated adapter with index 0
[13:59:19] Impl mfxhw64 library path: C:\WINDOWS\System32\DriverStore\FileRepository\iigd_dch.inf_amd64_58ee72dee7989949\libmfxhw64.dll
[13:59:19]  - Intel Media SDK hardware: API 1.35 (minimum: 1.3)
[13:59:19]  - Decode support:  h264 hevc (8bit: yes, 10bit: yes)
[13:59:19]  - H.264 encoder: yes
[13:59:19]     - preferred implementation: hardware (1) via D3D11
[13:59:19]     - capabilities (hardware):  breftype icq+la+i+downs vsinfo chromalocinfo opt1 opt2+mbbrc+extbrc+trellis+repeatpps+ib_adapt+nmpslice
[13:59:19]  - H.265 encoder: yes (8bit: yes, 10bit: yes)
[13:59:19]     - preferred implementation: hardware (1) via D3D11
[13:59:19]     - capabilities (hardware):  bpyramid icq vsinfo masteringinfo cllinfo opt1
[13:59:19]  - AV1 encoder: no
[13:59:19] hb_scan: path=I:\0_ACM\A Spectacular Showdown 1959 1080i HDTV AAC2.0 MPEG2-JPTVclub.mkv, title_index=1
Input #0, matroska,webm, from 'I:\0_ACM\A Spectacular Showdown 1959 1080i HDTV AAC2.0 MPEG2-JPTVclub.mkv':
  Metadata:
    encoder         : libebml v1.4.5 + libmatroska v1.7.1
    creation_time   : 2024-06-26T04:09:30.000000Z
  Duration: 01:54:24.67, start: 0.034000, bitrate: 7448 kb/s
  Stream #0:0(jpn): Video: mpeg2video (Main), yuv420p(tv, bt709, top first), 1440x1080 [SAR 4:3 DAR 16:9], 29.97 fps, 29.97 tbr, 1k tbn (default)
    Metadata:
      BPS             : 7304547
      DURATION        : 01:54:24.574000000
      NUMBER_OF_FRAMES: 164594
      NUMBER_OF_BYTES : 6267825493
      _STATISTICS_WRITING_APP: mkvmerge v82.0 ('I'm The President') 64-bit
      _STATISTICS_WRITING_DATE_UTC: 2024-06-26 04:09:30
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Side data:
      cpb: bitrate max/min/avg: 8324800/0/0 buffer size: 7995392 vbv_delay: N/A
  Stream #0:1(jpn): Audio: aac (LC), 48000 Hz, stereo, fltp (default)
    Metadata:
      BPS             : 140625
      DURATION        : 01:54:24.640000000
      NUMBER_OF_FRAMES: 321780
      NUMBER_OF_BYTES : 120667500
      _STATISTICS_WRITING_APP: mkvmerge v82.0 ('I'm The President') 64-bit
      _STATISTICS_WRITING_DATE_UTC: 2024-06-26 04:09:30
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:2(eng): Subtitle: subrip (default)
    Metadata:
      title           : OCR from DVD vobsub
      BPS             : 44
      DURATION        : 01:54:18.779000000
      NUMBER_OF_FRAMES: 1159
      NUMBER_OF_BYTES : 38468
      _STATISTICS_WRITING_APP: mkvmerge v82.0 ('I'm The President') 64-bit
      _STATISTICS_WRITING_DATE_UTC: 2024-06-26 04:09:30
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:3(jpn): Subtitle: subrip
    Metadata:
      BPS             : 64
      DURATION        : 01:52:02.480000000
      NUMBER_OF_FRAMES: 1325
      NUMBER_OF_BYTES : 54419
      _STATISTICS_WRITING_APP: mkvmerge v82.0 ('I'm The President') 64-bit
      _STATISTICS_WRITING_DATE_UTC: 2024-06-26 04:09:30
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
[13:59:19] scan: decoding previews for title 1
[13:59:19] scan: audio 0x1: aac, rate=48000Hz, bitrate=1 ??? (AAC LC, 2.0 ch)
[13:59:20] using bitstream PAR 4:3
[13:59:20] scan: 10 previews, 1440x1080, 23.976 fps, autocrop = 132/56/4/0, aspect 16:9, PAR 4:3, color profile: 1-1-1, chroma location: left
[13:59:20] libhb: scan thread found 1 valid title(s)
[13:59:20] Starting Task: Encoding Pass
[13:59:20] job configuration:
[13:59:20]  * source
[13:59:20]    + I:\0_ACM\A Spectacular Showdown 1959 1080i HDTV AAC2.0 MPEG2-JPTVclub.mkv
[13:59:20]    + title 1, chapter(s) 1 to 1
[13:59:20]    + container: matroska,webm
[13:59:20]    + data rate: 7448 kbps
[13:59:20]  * destination
[13:59:20]    + C:\Users\Rosemary\Downloads\A Spectacular Showdown 1959 1080i HDTV AAC2.0 MPEG2-JPTVclub_QSV-icq21.mkv
[13:59:20]    + container: Matroska (libavformat)
[13:59:20]  * video track
[13:59:20]    + decoder: mpeg2video 8-bit (yuv420p)
[13:59:20]    + filters
[13:59:20]      + Detelecine (pullup) ()
[13:59:20]      + Framerate Shaper (mode=1:rate=27000000/1126125)
[13:59:20]        + frame rate: 23.976 fps -> constant 23.976 fps
[13:59:20]      + Crop and Scale (width=1912:height=814:crop-top=132:crop-bottom=134:crop-left=4:crop-right=2)
[13:59:20]        + source: 1440 * 1080, crop (132/134/4/2): 1434 * 814, scale: 1912 * 814
[13:59:20]      + Format (format=p010le)
[13:59:20]    + Output geometry
[13:59:20]      + storage dimensions: 1912 x 814
[13:59:20]      + pixel aspect ratio: 1 : 1
[13:59:20]      + display dimensions: 1912 x 814
[13:59:20]    + encoder: H.265 10-bit (Intel Media SDK)
[13:59:20]      + preset:  quality
[13:59:20]      + profile: auto
[13:59:20]      + level:   auto
[13:59:20]      + quality: 21.00 (ICQ)
[13:59:20]      + color profile: 1-1-1
[13:59:20]      + chroma location: left
[13:59:20]  * subtitle track 1, English (UTF-8) (track 0, id 0x2, Text) -> Passthrough
[13:59:20]    + name: OCR from DVD vobsub
[13:59:20]  * subtitle track 2, ??? (UTF-8) (track 1, id 0x3, Text) -> Passthrough
[13:59:20]  * audio track 1
[13:59:20]    + decoder: ??? (AAC LC, 2.0 ch) (track 1, id 0x1)
[13:59:20]      + samplerate: 48000 Hz
[13:59:20]    + AAC Passthru
[13:59:20] sync: expecting 164587 video frames
[13:59:21] encqsvInit: using encode-only via system memory path
[13:59:21] encqsvInit: H.265/HEVC Main 10 profile @ level (null)
[13:59:21] encqsvInit: TargetUsage 4 AsyncDepth 4
[13:59:21] encqsvInit: GopRefDist 4 GopPicSize 48 NumRefFrame 3 IdrInterval 0
[13:59:21] encqsvInit: BFramesMax 3 BRefType pyramid
[13:59:21] encqsvInit: RateControlMethod ICQ ICQQuality 21
[13:59:21] sync: first pts video is 0
[13:59:21] sync: Chapter 1 at frame 1 time 0
[13:59:21] sync: first pts audio 0x1 is 0
[13:59:21] 1.168000s: Video -> Film
[13:59:21] qsv_enc_init: using 'hardware (1) via D3D11' implementation, API: 1.35
[13:59:22] sync: first pts subtitle 0x2 is 366930
[13:59:32] sync: subtitle 0x2 time went backwards 0 ms, PTS 2496600
[13:59:33] sync: subtitle 0x2 time went backwards 0 ms, PTS 2845080
[13:59:35] sync: subtitle 0x2 time went backwards 0 ms, PTS 3193380
[13:59:39] sync: subtitle 0x2 time went backwards 0 ms, PTS 4205700
[13:59:40] sync: subtitle 0x2 time went backwards 0 ms, PTS 4695300
[13:59:43] sync: subtitle 0x2 time went backwards 0 ms, PTS 5169870
[13:59:45] sync: subtitle 0x2 time went backwards 0 ms, PTS 5659470
[13:59:47] sync: subtitle 0x2 time went backwards 0 ms, PTS 6140070
[13:59:49] sync: subtitle 0x2 time went backwards 0 ms, PTS 6671700
[13:59:51] sync: subtitle 0x2 time went backwards 0 ms, PTS 7221330
[13:59:53] sync: subtitle 0x2 time went backwards 0 ms, PTS 7762050
[13:59:55] sync: subtitle 0x2 time went backwards 0 ms, PTS 8302680
[13:59:58] sync: subtitle 0x2 time went backwards 0 ms, PTS 8777250
[14:00:00] sync: subtitle 0x2 time went backwards 0 ms, PTS 9275940
[14:00:08] sync: first pts subtitle 0x3 is 11049660
[14:00:16] sync: subtitle 0x2 time went backwards 0 ms, PTS 12781170
[14:00:35] 185.051331s: Film -> Video
[14:00:35] 185.184998s: Video -> Film
[14:18:52] sync: subtitle 0x2 time went backwards 0 ms, PTS 246616920
[14:19:22] sync: subtitle 0x2 time went backwards 0 ms, PTS 253128870
[14:48:27] reader: done. 1 scr changes
[14:48:29] work: average encoding speed for job is 55.830929 fps
[14:48:29] vfr: 164585 frames output, 2 dropped and 2 duped for CFR/PFR
[14:48:29] vfr: lost time: 30060 (0 frames)
[14:48:29] vfr: gained time: 30060 (32 frames) (0 not accounted for)
[14:48:29] aac-decoder done: 321780 frames, 0 decoder errors
[14:48:29] mpeg2video-decoder done: 164593 frames, 0 decoder errors
[14:48:29] sync: got 164593 frames, 164587 expected
[14:48:29] sync: framerate min 23.976 fps, max 30.303 fps, avg 23.977 fps
[14:48:29] mux: track 0, 164585 frames, 2986424178 bytes, 3480.33 kbps, fifo 4096
[14:48:29] mux: track 1, 321780 frames, 120667500 bytes, 140.62 kbps, fifo 8192
[14:48:29] mux: track 2, 1142 frames, 62045 bytes, 0.07 kbps, fifo 32
[14:48:29] mux: track 3, 1325 frames, 85109 bytes, 0.10 kbps, fifo 32
[14:48:30] Finished work at: Wed Jun 26 14:48:30 2024
[14:48:30] libhb: work result = 0

 # Job Completed!

What Operating System are you running?

Windows 10

What version of HandBrake are you running?

1.7.3 (2024021000)

Where did you download HandBrake from?

handbrake.fr

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions