Subtitle disappears after encode

General questions or discussion about HandBrake, Video and/or audio transcoding, trends etc.
Post Reply
Sigward003
Posts: 9
Joined: Tue Sep 15, 2020 5:49 am

Subtitle disappears after encode

Post by Sigward003 »

Subtitle disappears after encode:

Hello guys, it's my first time handbrake, I have a kinda stupid question here
I have a Japanese game show video with .mp4 file and I did try to encode it to .MKV file.
With all settings are keep default as it could be (I've only switched target format from .mp4 to .mkv) and choose desktop as the output folder.
I 100% sure that this video have subtitle embedded while I open the original mp4 video with VLC/ media player, there is a subtitle and no .srt or .ass attached with the original video.

But the embedded subtitle disappeared after transcoding, I 've checked "subtitle" tag in hb and there's "foreign audio scan", none of these options make and effect to the video.

I just wonder the reason & how does it functioning , plus, if all embedded subtitile will be "removed" after encode. I don't have much sample video to attempt yet but feed my curiosity.


HandBrake version (e.g., 1.3.3):



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

WIN10 educational

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

Code: Select all

HandBrake 1.3.3 (2020061300)
OS: Microsoft Windows NT 10.0.18363.0
CPU: Intel(R) Core(TM) i5-2320 CPU @ 3.00GHz
Ram: 10157 MB, 
GPU Information:
  Intel(R) HD Graphics - 9.17.10.4459
  NVIDIA GeForce GTX 550 Ti - 23.21.13.8813
Screen: 1920x1080
Temp Dir: C:\Users\PC\AppData\Local\Temp\
Install Dir: C:\Program Files\HandBrake
Data Dir: C:\Users\PC\AppData\Roaming\HandBrake

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


# Starting Encode ...

[03:23:00] base preset: Fast 1080p30 (Modified)
[15:23:00] hb_init: starting libhb thread
[15:23:00] Starting work at: Wed Sep 16 15:23:00 2020
[15:23:00] 1 job(s) to process
[15:23:00] json job:
{
  "Audio": {
    "AudioList": [
      {
        "Bitrate": 160,
        "DRC": 0.0,
        "Encoder": "av_aac",
        "Gain": 0.0,
        "Mixdown": 4,
        "NormalizeMixLevel": false,
        "Samplerate": 0,
        "Track": 0,
        "DitherMethod": 0
      }
    ],
    "CopyMask": [
      "copy:aac",
      "copy:ac3",
      "copy:dtshd",
      "copy:dts",
      "copy:eac3",
      "copy:flac",
      "copy:mp3",
      "copy:truehd"
    ],
    "FallbackEncoder": "ac3"
  },
  "Destination": {
    "ChapterList": [
      {
        "Name": "Chapter 1"
      }
    ],
    "ChapterMarkers": true,
    "AlignAVStart": false,
    "File": "C:\\Users\\PC\\Desktop\\第五十回「ほう フェアウェイかい」-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": 12,
        "Settings": {
          "crop-bottom": "60",
          "crop-left": "148",
          "crop-right": "110",
          "crop-top": "84",
          "height": "464",
          "width": "822"
        }
      },
      {
        "ID": 6,
        "Settings": {
          "mode": "2",
          "rate": "27000000/900000"
        }
      }
    ]
  },
  "PAR": {
    "Num": 1216,
    "Den": 1215
  },
  "Metadata": {},
  "SequenceID": 0,
  "Source": {
    "Angle": 1,
    "Range": {
      "Type": "chapter",
      "Start": 1,
      "End": 1
    },
    "Title": 1,
    "Path": "C:\\Users\\PC\\Desktop\\第五十回「ほう フェアウェイかい」.mp4"
  },
  "Subtitle": {
    "Search": {
      "Burn": true,
      "Default": false,
      "Enable": true,
      "Forced": true
    },
    "SubtitleList": []
  },
  "Video": {
    "Encoder": "x264",
    "Level": "4.0",
    "TwoPass": false,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Options": "",
    "Preset": "fast",
    "Profile": "main",
    "Quality": 22.0,
    "QSV": {
      "Decode": false,
      "AsyncDepth": 0
    }
  }
}
[15:23:00] CPU: Intel(R) Core(TM) i5-2320 CPU @ 3.00GHz
[15:23:00]  - Intel microarchitecture Sandy Bridge
[15:23:00]  - logical processor count: 4
[15:23:00] Intel Quick Sync Video support: no
[15:23:00] hb_scan: path=C:\Users\PC\Desktop\第五十回「ほう フェアウェイかい」.mp4, title_index=1
src/libbluray/disc/disc.c:323: failed opening UDF image C:\Users\PC\Desktop\绗簲鍗佸洖銆屻伝銇?銉曘偋銈偊銈с偆銇嬨亜銆?mp4
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(C:\Users\PC\Desktop\绗簲鍗佸洖銆屻伝銇?銉曘偋銈偊銈с偆銇嬨亜銆?mp4\) failed
[15:23:00] 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
[15:23:00] dvd: not a dvd - trying as a stream/file instead
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Users\PC\Desktop\绗簲鍗佸洖銆屻伝銇?銉曘偋銈偊銈с偆銇嬨亜銆?mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf57.0.100
    description     : Coded by New Bilibili Transcoder v2.1
  Duration: 00:29:44.74, start: 0.000000, bitrate: 504 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1080x608 [SAR 1216:1215 DAR 16:9], 411 kb/s, 23 fps, 23 tbr, 11776 tbn, 46 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 87 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
[15:23:00] scan: decoding previews for title 1
[15:23:00] scan: audio 0x1: aac, rate=48000Hz, bitrate=87952 Unknown (AAC LC) (2.0 ch) (87 kbps)
[15:23:00] scan: 10 previews, 1080x608, 23.000 fps, autocrop = 84/60/148/110, aspect 16:9, PAR 1216:1215
[15:23:00] scan: supported video decoders: avcodec qsv
[15:23:00] libhb: scan thread found 1 valid title(s)
[15:23:00] Skipping subtitle scan.  No suitable subtitle tracks.
[15:23:00] Starting Task: Encoding Pass
[15:23:00] work: only 1 chapter, disabling chapter markers
[15:23:00] job configuration:
[15:23:00]  * source
[15:23:00]    + C:\Users\PC\Desktop\第五十回「ほう フェアウェイかい」.mp4
[15:23:00]    + title 1, chapter(s) 1 to 1
[15:23:00]    + container: mov,mp4,m4a,3gp,3g2,mj2
[15:23:00]    + data rate: 504 kbps
[15:23:00]  * destination
[15:23:00]    + C:\Users\PC\Desktop\第五十回「ほう フェアウェイかい」-1.mkv
[15:23:00]    + container: Matroska (libavformat)
[15:23:00]  * video track
[15:23:00]    + decoder: h264
[15:23:00]      + bitrate 411 kbps
[15:23:00]    + filters
[15:23:00]      + 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)
[15:23:00]      + Decomb (mode=39)
[15:23:00]      + Framerate Shaper (mode=2:rate=27000000/900000)
[15:23:00]        + frame rate: 23.000 fps -> peak rate limited to 30.000 fps
[15:23:00]      + Crop and Scale (width=822:height=464:crop-top=84:crop-bottom=60:crop-left=148:crop-right=110)
[15:23:00]        + source: 1080 * 608, crop (84/60/148/110): 822 * 464, scale: 822 * 464
[15:23:00]    + Output geometry
[15:23:00]      + storage dimensions: 822 x 464
[15:23:00]      + pixel aspect ratio: 1216 : 1215
[15:23:00]      + display dimensions: 822 x 464
[15:23:00]    + encoder: H.264 (libx264)
[15:23:00]      + preset:  fast
[15:23:00]      + profile: main
[15:23:00]      + level:   4.0
[15:23:00]      + quality: 22.00 (RF)
[15:23:00]      + color profile: 1-1-1
[15:23:00]  * audio track 1
[15:23:00]    + decoder: Unknown (AAC LC) (2.0 ch) (87 kbps) (track 1, id 0x1)
[15:23:00]      + bitrate: 87 kbps, samplerate: 48000 Hz
[15:23:00]    + mixdown: Stereo
[15:23:00]    + dither: none
[15:23:00]    + encoder: AAC (libavcodec)
[15:23:00]      + bitrate: 160 kbps, samplerate: 48000 Hz
[15:23:00] sync: expecting 41048 video frames
[15:23:00] encx264: min-keyint: 23, keyint: 230
[15:23:00] encx264: encoding at constant RF 22.000000
[15:23:00] encx264: unparsed options: level=4.0:ref=2:8x8dct=0:weightp=1:subme=6:vbv-bufsize=25000:vbv-maxrate=20000:rc-lookahead=30
x264 [info]: using SAR=1216/1215
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
x264 [info]: profile Main, level 4.0, 4:2:0, 8-bit
[15:23:00] sync: first pts video is 0
[15:23:00] sync: "Chapter 1" (1) at frame 1 time 0
[15:23:00] sync: first pts audio 0x1 is 0
[15:28:43] reader: done. 1 scr changes
[15:28:44] work: average encoding speed for job is 119.471992 fps
[15:28:44] comb detect: heavy 171 | light 594 | uncombed 40283 | total 41048
[15:28:44] decomb: deinterlaced 171 | blended 594 | unfiltered 40283 | total 41048
[15:28:44] vfr: 41048 frames output, 0 dropped and 0 duped for CFR/PFR
[15:28:44] vfr: lost time: 0 (0 frames)
[15:28:44] vfr: gained time: 0 (0 frames) (0 not accounted for)
[15:28:44] aac-decoder done: 83628 frames, 0 decoder errors
[15:28:44] h264-decoder done: 41048 frames, 0 decoder errors
[15:28:44] sync: got 41048 frames, 41048 expected
[15:28:44] sync: framerate min 23.000 fps, max 23.000 fps, avg 23.000 fps
x264 [info]: frame I:422   Avg QP:16.99  size: 34109
x264 [info]: frame P:13723 Avg QP:20.51  size:  5337
x264 [info]: frame B:26903 Avg QP:24.09  size:  1115
x264 [info]: consecutive B-frames:  6.2% 15.0% 12.6% 66.2%
x264 [info]: mb I  I16..4: 38.3%  0.0% 61.7%
x264 [info]: mb P  I16..4:  4.4%  0.0%  3.5%  P16..4: 23.4%  8.6%  4.6%  0.0%  0.0%    skip:55.6%
x264 [info]: mb B  I16..4:  0.9%  0.0%  0.5%  B16..8: 10.6%  3.8%  0.3%  direct: 3.0%  skip:81.0%  L0:42.7% L1:48.3% BI: 9.0%
x264 [info]: coded y,uvDC,uvAC intra: 41.7% 52.7% 28.1% inter: 6.2% 7.6% 0.7%
x264 [info]: i16 v,h,dc,p: 50% 32%  7% 11%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 25% 27% 15%  5%  6%  6%  7%  5%  5%
x264 [info]: i8c dc,h,v,p: 54% 24% 18%  4%
x264 [info]: Weighted P-Frames: Y:0.3% UV:0.2%
x264 [info]: ref P L0: 78.6% 21.4%
x264 [info]: ref B L0: 86.6% 13.4%
x264 [info]: ref B L1: 96.3%  3.7%
x264 [info]: kb/s:527.30
[15:28:44] mux: track 0, 41048 frames, 117616794 bytes, 527.22 kbps, fifo 8192
[15:28:44] mux: track 1, 83657 frames, 35781732 bytes, 160.39 kbps, fifo 16384
[15:28:44] Finished work at: Wed Sep 16 15:28:44 2020
[15:28:44] libhb: work result = 0

# Encode Completed ...




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

Re: Subtitle disappears after encode

Post by Woodstock »

[15:23:00] Skipping subtitle scan. No suitable subtitle tracks.
Handbrake isn't seeing any subtitle tracks within the source video.

Was there a separate ".srt" file with the video, with the same name (just different extension)? Many players will latch on to such a file and make subtitles available, but you have to tell handbrake it is there.
Sigward003
Posts: 9
Joined: Tue Sep 15, 2020 5:49 am

Re: Subtitle disappears after encode

Post by Sigward003 »

Woodstock wrote: Wed Sep 16, 2020 1:07 pm
[15:23:00] Skipping subtitle scan. No suitable subtitle tracks.
Handbrake isn't seeing any subtitle tracks within the source video.

Was there a separate ".srt" file with the video, with the same name (just different extension)? Many players will latch on to such a file and make subtitles available, but you have to tell handbrake it is there.
Thank you Woodstock and appreciate your prompt reply ! :o
I think I've addressed the problem.
The original video has a "black surrounding" on both of 4 sides of the video. the embedded subtitle was on the bottom edge. Seems like HB "automatically cropped" the bottom black zone after encoding.
This is the original picture(without been cropped by HB )


This is the video after HB processing.
https://i.imgur.com/W0d2B6X.png

(failed to upload the image so left the imgur links here)

Fortunately I've transferred the video from .mp4 to .mkv successfully by using a converter tool names "[Removed Dubious Product Reference] Video converter" this one keep the black edge alone with the embedded subtitle for me.

But I really want to know how did I made mistake, or the reason HB will crop the video, and how to setting my HB so next time I could archive the similar transfer task by using handbrake.

Many thanks.
Sigward003
Posts: 9
Joined: Tue Sep 15, 2020 5:49 am

Re: Subtitle disappears after encode

Post by Sigward003 »

the original video without been transferred:
https://i.imgur.com/13P0jK9.png
Woodstock
Veteran User
Posts: 4614
Joined: Tue Aug 27, 2013 6:39 am

Re: Subtitle disappears after encode

Post by Woodstock »

Auto crop is usually a benefit. Sometimes, disks are authored in ways that REQUIRE the letterbox to remain; in those cases, you turn off auto crop and set the cropping values to all zeros.

Many players will scale the subtitle picture to fit the smaller window, but not all will.
Sigward003
Posts: 9
Joined: Tue Sep 15, 2020 5:49 am

Re: Subtitle disappears after encode

Post by Sigward003 »

I've choose the "custom corp" option and it left the subtitle for me(with the edges). I have not even noticed this option.
Thank you :)
Post Reply