Subtitles video filter does not correctly rotate/position some Japanese punctuation characters in vertical ASS subtitles
|Reported by:||y3kcjd5||Owned by:|
|Blocking:||Reproduced by developer:||no|
|Analyzed by developer:||no|
Certain Japanese punctuation characters have to be oriented a certain way for vertical display of subtitles to look correct. The "subtitles" video filter gets it wrong with some characters. I'm attaching some demo files to demonstrate the characters I've found, but there are probably more I've missed.
How to reproduce:
Run a command such as
ffmpeg -i "5-sec-blank.mp4" -map 0:0 -report -loglevel verbose -map_chapters -1 -map_metadata -1 -vsync "passthrough" -aspect 16:9 -c:v libx264 -movflags faststart -preset slower -x264-params partitions=all:ref=6:me=umh:subme=10:merange=64:trellis=2:fast-pskip=0:bframes=6:b_adapt=2:direct=auto:rc_lookahead=60:crf=20:qcomp=0.80:qpmax=30:qpstep=4 -sws_flags spline+full_chroma_int+full_chroma_inp+accurate_rnd -filter:v subtitles="misrotationdemosubs.ass":original_size=1920x1080:alpha=1,format=yuv420p "subtitlehardcode.mp4"
and observe the orientation of the characters hardcoded into the video, then either open the .ass file directly with subtitling software such as Aegisub, or run something like
ffmpeg -i "5-sec-blank.mp4" -i "misrotationdemosubs.ass" -map 0:0 -map 1:0 -c copy subtitlesoftcode.mkv
and play the resulting file in a media player with ASS subtitle support (mine uses DirectVobSub).
I am running ffmpeg-2022-02-28-git-7a4840a8ca-full_build from gyan.dev in a Windows environment. If you can't get your hands on the "MS UI Gothic" font, just text edit the entry in the .ass file to something on your system (but keep the '@' mark at the beginning that denotes vertical orientation).