You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On mpv running on NixOS (Linux), I want to play Japanese TV broadcasts recorded as MPEG-2 TS files, which contains subtitles in ARIB STD-B24 format.
Recent development version of ffmepg support rendering ARIB STD-B24 subtitles when compiled with libaribcaption library and --enable-libaribcaption option. Applying patches are no longer required on recent version.
Enabling libaribcaption will add those options to ffplay:
aribcaption decoder AVOptions:
-sub_type <int> .D...S..... subtitle rendering type (from 0 to 3) (default ass)
none 0 .D...S..... do nothing
bitmap 1 .D...S..... bitmap rendering
text 2 .D...S..... plain text
ass 3 .D...S..... formatted text
-caption_encoding <int> .D...S..... encoding scheme of subtitle text (from 0 to 3) (default auto)
auto 0 .D...S..... automatically detect encoding scheme
jis 1 .D...S..... 8bit-char JIS encoding (Japanese ISDB captions)
utf8 2 .D...S..... UTF-8 encoding (Philippines ISDB-T captions)
latin 3 .D...S..... latin characters (SBTVD / ISDB-Tb captions used in South America)
-ass_single_rect <boolean> .D...S..... workaround of ASS subtitle for players which can't handle multi-rectangle [ass] (default false)
-font <string> .D...S..... comma-separated font family [ass, bitmap]
-replace_fullwidth_ascii <boolean> .D...S..... replace MSZ fullwidth alphanumerics with halfwidth alphanumerics [ass, bitmap] (default true)
-force_outline_text <boolean> .D...S..... always render characters with outline [(ass), bitmap] (default false)
-ignore_background <boolean> .D...S..... ignore rendering caption background [(ass), bitmap] (default false)
-ignore_ruby <boolean> .D...S..... ignore ruby-like characters [ass, bitmap] (default false)
-outline_width <float> .D...S..... outline width of text [(ass), bitmap] (from 0 to 3) (default 1.5)
-replace_drcs <boolean> .D...S..... replace known DRCS [bitmap] (default true)
-canvas_size <image_size> .D...S..... set input video size (WxH or abbreviation) [bitmap]
I already confirmed that ffplay can render ARIB STD-B24 subtitles already. I just needed to add -sub_type bitmap to ffplay arguments.
However, I don't know how I can pass sub_type option to mpv. --vd-lavc-o does not work for this case.
AVOption 'sub_type' not found.
By default sub_type is set to ass. On ffplay ASS subtitles do not show up at all.
On mpv, ASS subtitles do show up, however does not look as nice as subtitles rendered with -sub_type bitmap on ffplay: ASS subtitles lack transparent background, font color, gaiji (additional emoji) rendering, etc.
Subtitles rendered with -sub_type bitmap on ffplay look best.
Still, I was able to set sub_type to mpeg by modifying ffmpeg's source code like this: vroad/FFmpeg@66c8dd7
Does this mean that mpv does not support rendering bitmap subtitles rendered by ffmpeg?
Looks like mpv do nothing even when the AVSubtitle contains bitmap subtitles, even on the latest version. Or am I mssing something?
@sfan5 Thanks. After digging it with debugger, I found that I just needed to add single line to sd_lavc.c to show ARIB subtitles (because Supported codecs must be known to decode to paletted bitmaps):
Without this, mpv tries to decode it as ASS subtitle and fail, even if I change ffmpeg's source code to output bitmap subtitles for libaribcaption subtitles by default.
I will ask a separate question for how to implement libaribcaption support properly (without changing ffmpeg source code to change libaribcaption defaults) on mpv.
On mpv running on NixOS (Linux), I want to play Japanese TV broadcasts recorded as MPEG-2 TS files, which contains subtitles in ARIB STD-B24 format.
Recent development version of ffmepg support rendering ARIB STD-B24 subtitles when compiled with libaribcaption library and
--enable-libaribcaption
option. Applying patches are no longer required on recent version.Enabling libaribcaption will add those options to ffplay:
I already confirmed that ffplay can render ARIB STD-B24 subtitles already. I just needed to add
-sub_type bitmap
to ffplay arguments.However, I don't know how I can pass sub_type option to mpv.
--vd-lavc-o
does not work for this case.By default
sub_type
is set toass
. On ffplay ASS subtitles do not show up at all.On mpv, ASS subtitles do show up, however does not look as nice as subtitles rendered with
-sub_type bitmap
on ffplay: ASS subtitles lack transparent background, font color, gaiji (additional emoji) rendering, etc.Subtitles rendered with
-sub_type bitmap
on ffplay look best.Still, I was able to set sub_type to mpeg by modifying ffmpeg's source code like this:
vroad/FFmpeg@66c8dd7
Now I get log messages like this instad:
Does this mean that mpv does not support rendering bitmap subtitles rendered by ffmpeg?
Looks like mpv do nothing even when the AVSubtitle contains bitmap subtitles, even on the latest version. Or am I mssing something?
mpv/sub/lavc_conv.c
Line 267 in e172755
Log file
mpv-log-ignoring-bitmap-subtitle.txt
The text was updated successfully, but these errors were encountered: