Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Burn-in .ass subtitle does not render corrrectly #1028

Closed
joshuaavalon opened this issue Nov 28, 2017 · 5 comments

Comments

@joshuaavalon
Copy link

commented Nov 28, 2017

Description of problem or feature request

Stroke and shadow of .ass subtitle does not render correctly.

I heard about HandBrake and want to give it a try. Batch process is way better than Megui but the subtitle rendering is bothering me.

Steps to reproduce the problem

.ass subtitle in the zip
example.zip

HandBrake version (e.g., 1.0.0)

1.0.7 (2017040900) - 64bit

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

Windows 10 Creators Update (inside KVM)

Error message text or screenshot

Source File (.mkv with embedded .ass subtitle - Using Media Player Classic)
mkv

Handbrake Burn-in
handbrake

Megui with VSFilter
megui

HandBrake Activity Log required (see https://handbrake.fr/docs/en/latest/help/activity-log.html)

Drag and drop file or...

HandBrake 1.0.7 (2017040900) - 64bit
OS: Microsoft Windows NT 10.0.16299.0 - 64bit
CPU: Intel(R) Xeon(R) CPU E5-2660 0 @ 2.20GHz
Ram: 16892 MB, 
GPU Information:
  Microsoft 基本顯示卡 - 10.0.16299.15
Screen: 1920x1080
Temp Dir: C:\Users\joshua\AppData\Local\Temp\
Install Dir: C:\Program Files\HandBrake
Data Dir: C:\Users\joshua\AppData\Roaming\HandBrake Team\HandBrake\1.0.7.0

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


# Starting Encode ...

[22:47:41] hb_init: starting libhb thread
[22:47:41] 1 job(s) to process
[22:47:41] json job:
{
  "Audio": {
    "AudioList": [
      {
        "Bitrate": 160,
        "DRC": 0.0,
        "Encoder": 65536,
        "Gain": 0.0,
        "Mixdown": 4,
        "NormalizeMixLevel": false,
        "Samplerate": 0,
        "Track": 0,
        "DitherMethod": 0
      }
    ],
    "CopyMask": [
      1073807360,
      1073743872,
      1074003968,
      1073750016,
      1090519040,
      1074790400,
      1074266112,
      1107296256
    ],
    "FallbackEncoder": 2048
  },
  "Destination": {
    "ChapterList": [
      {
        "Name": "Avant-title"
      },
      {
        "Name": "Opening"
      },
      {
        "Name": "A-part"
      },
      {
        "Name": "B-part"
      },
      {
        "Name": "Ending"
      },
      {
        "Name": "Next time"
      }
    ],
    "ChapterMarkers": true,
    "File": "C:\\Users\\joshua\\Desktop\\a\\1.mp4",
    "Mp4Options": {
      "IpodAtom": false,
      "Mp4Optimize": false
    },
    "Mux": 131072
  },
  "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": 11,
        "Settings": {
          "crop-bottom": "0",
          "crop-left": "0",
          "crop-right": "0",
          "crop-top": "0",
          "height": "1080",
          "width": "1920"
        }
      },
      {
        "ID": 6,
        "Settings": {
          "mode": "0"
        }
      }
    ]
  },
  "PAR": {
    "Num": 1,
    "Den": 1
  },
  "Metadata": {},
  "SequenceID": 0,
  "Source": {
    "Angle": 1,
    "Range": {
      "Type": "chapter",
      "Start": 1,
      "End": 6
    },
    "Title": 1,
    "Path": "C:\\Users\\joshua\\Desktop\\a\\1.mkv"
  },
  "Subtitle": {
    "Search": {
      "Burn": false,
      "Default": false,
      "Enable": false,
      "Forced": false
    },
    "SubtitleList": [
      {
        "Burn": true,
        "Default": false,
        "Forced": true,
        "ID": 1,
        "Offset": 0,
        "Track": 0
      }
    ]
  },
  "Video": {
    "Encoder": 65536,
    "Level": "4.0",
    "TwoPass": false,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Options": "",
    "Preset": "veryfast",
    "Profile": "main",
    "Quality": 18.0,
    "OpenCL": false,
    "HWDecode": false,
    "QSV": {
      "Decode": false,
      "AsyncDepth": 0
    }
  }
}
[22:47:41] CPU: Intel(R) Xeon(R) CPU E5-2660 0 @ 2.20GHz
[22:47:41]  - Intel microarchitecture Sandy Bridge
[22:47:41]  - logical processor count: 16
[22:47:41] Intel Quick Sync Video support: no
[22:47:41] hb_scan: path=C:\Users\joshua\Desktop\a\1.mkv, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:274: failed opening UDF image C:\Users\joshua\Desktop\a\1.mkv
src/libbluray/disc/disc.c:352: error opening file BDMV\index.bdmv
src/libbluray/disc/disc.c:352: error opening file BDMV\BACKUP\index.bdmv
[22:47:41] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 5.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
[22:47:41] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from 'C:\Users\joshua\Desktop\a\1.mkv':
  Duration: 00:24:11.77, start: 0.000000, bitrate: N/A
    Chapter #0:0: start 0.000000, end 97.014000
    Metadata:
      title           : Avant-title
    Chapter #0:1: start 97.014000, end 186.812000
    Metadata:
      title           : Opening
    Chapter #0:2: start 186.812000, end 858.816000
    Metadata:
      title           : A-part
    Chapter #0:3: start 858.816000, end 1330.829000
    Metadata:
      title           : B-part
    Chapter #0:4: start 1330.829000, end 1420.836000
    Metadata:
      title           : Ending
    Chapter #0:5: start 1420.836000, end 1451.776000
    Metadata:
      title           : Next time
    Stream #0:0(jpn): Video: h264 (High 10)
      yuv420p10le, tv, bt709/bt709/bt709
      1920x1080 [PAR 1:1 DAR 16:9], PAR 1:1 DAR 16:9
      23.98 fps, 1k tbn (default)
    Metadata:
      BPS             : 8164590
      BPS-eng         : 8164590
      DURATION        : 00:24:11.701000000
      DURATION-eng    : 00:24:11.701000000
      NUMBER_OF_FRAMES: 34806
      NUMBER_OF_FRAMES-eng: 34806
      NUMBER_OF_BYTES : 1481568113
      NUMBER_OF_BYTES-eng: 1481568113
      _STATISTICS_WRITING_APP: mkvmerge v18.0.0 ('Apricity') 64-bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v18.0.0 ('Apricity') 64-bit
      _STATISTICS_WRITING_DATE_UTC: 2017-11-20 14:22:24
      _STATISTICS_WRITING_DATE_UTC-eng: 2017-11-20 14:22:24
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:1(jpn): Audio: alac
      48000 Hz, stereo, s16p (default)
    Metadata:
      BPS             : 706352
      BPS-eng         : 706352
      DURATION        : 00:24:11.776000000
      DURATION-eng    : 00:24:11.776000000
      NUMBER_OF_FRAMES: 17013
      NUMBER_OF_FRAMES-eng: 17013
      NUMBER_OF_BYTES : 128183281
      NUMBER_OF_BYTES-eng: 128183281
      _STATISTICS_WRITING_APP: mkvmerge v18.0.0 ('Apricity') 64-bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v18.0.0 ('Apricity') 64-bit
      _STATISTICS_WRITING_DATE_UTC: 2017-11-20 14:22:24
      _STATISTICS_WRITING_DATE_UTC-eng: 2017-11-20 14:22:24
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:2(chi): Subtitle: ssa (default)
    Metadata:
      BPS             : 148
      BPS-eng         : 148
      DURATION        : 00:24:09.250000000
      DURATION-eng    : 00:24:09.250000000
      NUMBER_OF_FRAMES: 441
      NUMBER_OF_FRAMES-eng: 441
      NUMBER_OF_BYTES : 26982
      NUMBER_OF_BYTES-eng: 26982
      _STATISTICS_WRITING_APP: mkvmerge v18.0.0 ('Apricity') 64-bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v18.0.0 ('Apricity') 64-bit
      _STATISTICS_WRITING_DATE_UTC: 2017-11-20 14:22:24
      _STATISTICS_WRITING_DATE_UTC-eng: 2017-11-20 14:22:24
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
[22:47:41] scan: decoding previews for title 1
[22:47:41] scan: audio 0x1: alac, rate=48000Hz, bitrate=1 日本語 (alac) (2.0 ch)
[22:47:42] scan: 10 previews, 1920x1080, 23.976 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1
[22:47:42] libhb: scan thread found 1 valid title(s)
[22:47:42] starting job
[22:47:42] decomb filter thread started for segment 1
[22:47:42] decomb filter thread started for segment 5
[22:47:42] decomb filter thread started for segment 6
[22:47:42] decomb filter thread started for segment 3
[22:47:42] decomb filter thread started for segment 4
[22:47:42] decomb filter thread started for segment 0
[22:47:42] decomb filter thread started for segment 2
[22:47:42] decomb filter thread started for segment 7
[22:47:42] decomb filter thread started for segment 8
[22:47:42] decomb filter thread started for segment 9
[22:47:42] decomb filter thread started for segment 10
[22:47:42] decomb filter thread started for segment 11
[22:47:42] decomb filter thread started for segment 12
[22:47:42] decomb filter thread started for segment 13
[22:47:42] mask filter thread started for segment 1
[22:47:42] mask filter thread started for segment 2
[22:47:42] mask filter thread started for segment 3
[22:47:42] mask filter thread started for segment 5
[22:47:42] decomb check thread started for segment 2
[22:47:42] mask filter thread started for segment 9
[22:47:42] mask filter thread started for segment 11
[22:47:42] mask filter thread started for segment 13
[22:47:42] decomb check thread started for segment 6
[22:47:42] mask erode thread started for segment 0
[22:47:42] decomb check thread started for segment 8
[22:47:42] mask erode thread started for segment 3
[22:47:42] decomb check thread started for segment 10
[22:47:42] decomb check thread started for segment 11
[22:47:42] decomb check thread started for segment 12
[22:47:42] decomb check thread started for segment 13
[22:47:42] decomb check thread started for segment 14
[22:47:42] mask erode thread started for segment 13
[22:47:42] mask erode thread started for segment 15
[22:47:42] mask dilate thread started for segment 0
[22:47:42] decomb filter thread started for segment 15
[22:47:42] decomb check thread started for segment 0
[22:47:42] mask filter thread started for segment 4
[22:47:42] decomb check thread started for segment 1
[22:47:42] mask dilate thread started for segment 9
[22:47:42] mask filter thread started for segment 7
[22:47:42] mask dilate thread started for segment 13
[22:47:42] decomb check thread started for segment 3
[22:47:42] mask filter thread started for segment 10
[22:47:42] mask filter thread started for segment 12
[22:47:42] decomb check thread started for segment 4
[22:47:42] yadif thread started for segment 0
[22:47:42] yadif thread started for segment 1
[22:47:42] mask filter thread started for segment 15
[22:47:42] yadif thread started for segment 3
[22:47:42] mask erode thread started for segment 1
[22:47:42] yadif thread started for segment 6
[22:47:42] yadif thread started for segment 8
[22:47:42] mask erode thread started for segment 4
[22:47:42] mask erode thread started for segment 5
[22:47:42] mask erode thread started for segment 6
[22:47:42] mask erode thread started for segment 7
[22:47:42] mask erode thread started for segment 8
[22:47:42] mask erode thread started for segment 9
[22:47:42] mask erode thread started for segment 10
[22:47:42] mask erode thread started for segment 11
[22:47:42] mask erode thread started for segment 12
[22:47:42] decomb check thread started for segment 15
[22:47:42] mask erode thread started for segment 14
[22:47:42] mask filter thread started for segment 0
[22:47:42] decomb filter thread started for segment 14
[22:47:42] mask dilate thread started for segment 1
[22:47:42] mask dilate thread started for segment 2
[22:47:42] mask dilate thread started for segment 3
[22:47:42] mask dilate thread started for segment 4
[22:47:42] mask dilate thread started for segment 5
[22:47:42] mask dilate thread started for segment 6
[22:47:42] mask dilate thread started for segment 7
[22:47:42] mask dilate thread started for segment 8
[22:47:42] mask filter thread started for segment 6
[22:47:42] mask dilate thread started for segment 10
[22:47:42] mask dilate thread started for segment 11
[22:47:42] mask dilate thread started for segment 12
[22:47:42] mask filter thread started for segment 8
[22:47:42] mask dilate thread started for segment 14
[22:47:42] mask dilate thread started for segment 15
[22:47:42] decomb check thread started for segment 5
[22:47:42] mask filter thread started for segment 14
[22:47:42] yadif thread started for segment 2
[22:47:42] decomb check thread started for segment 7
[22:47:42] yadif thread started for segment 4
[22:47:42] yadif thread started for segment 5
[22:47:42] mask erode thread started for segment 2
[22:47:42] yadif thread started for segment 7
[22:47:42] decomb check thread started for segment 9
[22:47:42] yadif thread started for segment 9
[22:47:42] yadif thread started for segment 10
[22:47:42] yadif thread started for segment 11
[22:47:42] yadif thread started for segment 12
[22:47:42] yadif thread started for segment 13
[22:47:42] yadif thread started for segment 14
[22:47:42] yadif thread started for segment 15
[22:47:42] [ass] Shaper: FriBidi 0.19.7 (SIMPLE) HarfBuzz-ng 1.3.0 (COMPLEX)
[22:47:48] [ass] Using font provider directwrite
[22:47:48] work: track 1, dithering not supported by codec
[22:47:48] job configuration:
[22:47:48]  * source
[22:47:48]    + C:\Users\joshua\Desktop\a\1.mkv
[22:47:48]    + title 1, chapter(s) 1 to 6
[22:47:48]    + container: matroska,webm
[22:47:48]  * destination
[22:47:48]    + C:\Users\joshua\Desktop\a\1.mp4
[22:47:48]    + container: MPEG-4 (libavformat)
[22:47:48]      + chapter markers
[22:47:48]  * video track
[22:47:48]    + decoder: h264
[22:47:48]    + filters
[22:47:48]      + 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)
[22:47:48]      + Decomb (mode=39)
[22:47:48]      + Framerate Shaper (mode=0)
[22:47:48]        + frame rate: same as source (around 23.976 fps)
[22:47:48]      + Subtitle renderer ()
[22:47:48]      + Crop and Scale (width=1920:height=1080:crop-top=0:crop-bottom=0:crop-left=0:crop-right=0)
[22:47:48]        + source: 1920 * 1080, crop (0/0/0/0): 1920 * 1080, scale: 1920 * 1080
[22:47:48]    + Output geometry
[22:47:48]      + storage dimensions: 1920 x 1080
[22:47:48]      + pixel aspect ratio: 1 : 1
[22:47:48]      + display dimensions: 1920 x 1080
[22:47:48]    + encoder: H.264 (libx264)
[22:47:48]      + preset:  veryfast
[22:47:48]      + profile: main
[22:47:48]      + level:   4.0
[22:47:48]      + quality: 18.00 (RF)
[22:47:48]  * subtitle track 1, Chinese (track 0, id 0x2) Text [SSA] -> Render/Burn-in, Forced Only
[22:47:48]  * audio track 1
[22:47:48]    + decoder: 日本語 (alac) (2.0 ch) (track 1, id 0x1)
[22:47:48]      + samplerate: 48000 Hz
[22:47:48]    + mixdown: Stereo
[22:47:48]    + encoder: AAC (libavcodec)
[22:47:48]      + bitrate: 160 kbps, samplerate: 48000 Hz
[22:47:48] sync: expecting 34807 video frames
[22:47:48] encx264: min-keyint: 24, keyint: 240
[22:47:48] encx264: encoding at constant RF 18.000000
[22:47:48] encx264: unparsed options: level=4.0:weightp=1:ref=1:trellis=0:8x8dct=0:subme=2:vbv-bufsize=25000:rc-lookahead=10:mixed-refs=0:vbv-maxrate=20000
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
x264 [info]: profile Main, level 4.0
[22:47:49] sync: first pts video is 0
[22:47:49] sync: "Avant-title" (1) at frame 1 time 0
[22:47:49] sync: first pts audio 0x1 is 0
[22:47:49] sync: first pts subtitle 0x2 is 0
[22:47:49] sync: subtitle 0x2 duration <= 0, PTS 0
[22:47:49] sync: subtitle 0x2 duration <= 0, PTS 0
[22:47:49] sync: subtitle 0x2 duration <= 0, PTS 0
[22:47:49] sync: subtitle 0x2 duration <= 0, PTS 0
[22:47:49] sync: subtitle 0x2 duration <= 0, PTS 2700
[22:47:49] sync: subtitle 0x2 duration <= 0, PTS 2700
[22:47:49] sync: subtitle 0x2 duration <= 0, PTS 2700
[22:48:09] [ass] fontselect: (zhunyuan, 700, 0) -> ZhunYuan, 0, (none)
[22:48:41] sync: "Opening" (2) at frame 2327 time 8731222
[22:48:50] [ass] fontselect: (DFGMaruGothic-Bd, 700, 0) -> DFMaruGothic-Bd-WING-RKSJ-H, 0, DFMaruGothic-Bd-WING-RKSJ-H
[22:49:23] sync: "A-part" (3) at frame 4480 time 16813046
[22:53:21] sync: "B-part" (4) at frame 20592 time 77293466
[22:55:48] sync: "Ending" (5) at frame 31909 time 119774655
[22:56:35] sync: "Next time" (6) at frame 34067 time 127875247
[22:56:46] reader: done. 1 scr changes
[22:56:47] work: average encoding speed for job is 64.657944 fps
[22:56:47] comb detect: heavy 2520 | light 2952 | uncombed 29334 | total 34806
[22:56:47] decomb: deinterlaced 2520 | blended 2952 | unfiltered 29334 | total 34806
[22:56:47] vfr: lost time: 0 (0 frames)
[22:56:47] vfr: gained time: 0 (0 frames) (0 not accounted for)
[22:56:48] alac-decoder done: 17013 frames, 0 decoder errors
[22:56:48] h264-decoder done: 34806 frames, 0 decoder errors
[22:56:48] sync: got 34806 frames, 34807 expected
[22:56:48] sync: framerate min 23.981 fps, max 23.981 fps, avg 23.976 fps
x264 [info]: frame I:441   Avg QP:13.90  size:189005
x264 [info]: frame P:12163 Avg QP:16.56  size: 37427
x264 [info]: frame B:22202 Avg QP:18.07  size:  6595
x264 [info]: consecutive B-frames: 10.2% 12.8%  3.9% 73.0%
x264 [info]: mb I  I16..4: 52.2%  0.0% 47.8%
x264 [info]: mb P  I16..4: 15.8%  0.0%  3.5%  P16..4: 23.0%  8.7%  5.4%  0.0%  0.0%    skip:43.5%
x264 [info]: mb B  I16..4:  1.6%  0.0%  0.2%  B16..8: 10.2%  2.4%  0.4%  direct: 7.2%  skip:78.0%  L0:41.5% L1:49.2% BI: 9.3%
x264 [info]: coded y,uvDC,uvAC intra: 40.8% 59.1% 28.8% inter: 6.5% 11.4% 1.0%
x264 [info]: i16 v,h,dc,p: 36% 29% 22% 12%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 25% 23% 20%  6%  6%  5%  6%  5%  5%
x264 [info]: i8c dc,h,v,p: 54% 22% 18%  5%
x264 [info]: Weighted P-Frames: Y:1.1% UV:1.0%
x264 [info]: kb/s:3774.88
[22:56:48] mux: track 0, 34806 frames, 684986064 bytes, 3774.70 kbps, fifo 2048
[22:56:48] mux: track 1, 68049 frames, 29078546 bytes, 160.24 kbps, fifo 4096
[22:56:48] libhb: work result = 0

# Encode Completed ...
@galad87

This comment has been minimized.

Copy link
Contributor

commented Nov 28, 2017

HandBrake uses libass to render substation alpha subtitles, does the same issue happens other applications that uses this library (mpv or vlc for example)?

The nighty builds of HandBrake have a more recent version of libass, might be worth trying them too.

@joshuaavalon

This comment has been minimized.

Copy link
Author

commented Nov 28, 2017

@galad87 I just download VLC. It produces the same result as HandBrake. It seems like it is a problem in libass, see libass/libass#289.

@sr55 sr55 added the Upstream Issue label Nov 28, 2017
@astiob

This comment has been minimized.

Copy link
Contributor

commented Nov 29, 2017

Hi, I’m a libass developer. This does look like a libass issue, but the link above is incorrect: this is libass/libass#287.

@sr55 sr55 added the Bug label Dec 2, 2017
@bradleysepos bradleysepos removed the Bug label May 29, 2018
@bradleysepos bradleysepos added this to the Unscheduled milestone Sep 4, 2018
@bradleysepos

This comment has been minimized.

Copy link
Contributor

commented Sep 4, 2018

@jstebbins Correct me if I'm wrong, but it seems like we can fix this by setting the related override?

https://github.com/libass/libass/search?q=ScaledBorderAndShadow&unscoped_q=ScaledBorderAndShadow

@bradleysepos

This comment has been minimized.

Copy link
Contributor

commented Apr 5, 2019

Closing as this issue is very old and we have no additional information. If anyone would like to comment further, we can reopen as necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
6 participants
You can’t perform that action at this time.