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

ffmpeg always uses simple shaping with "-vf subtitles", messing up Arabic text #682

Closed
0TTA opened this issue Feb 3, 2023 · 1 comment
Closed

Comments

@0TTA
Copy link

0TTA commented Feb 3, 2023

Screenshots

When Arabic subtitles are burned into the video, it does not look as it should

When I use the following command in FFmpeg, It gives me the following result, which is wrong:
-vf "subtitles=test.ass"

subtitles

mpv:
mpv

MPC-HC:
MPC-HC

VLC:
VLC

Description of the issue

Let's see what exactly the problem is, because if you are not an Arabic speaker, you might not get what the problem is.

This is a screenshot from MPV Player (not burned):

mpv

And the following one is the result of the following command (it should not look like this):

-vf "subtitles=test.ass"

subtitles

libass version

ffmpeg version N-109745-g7d49fef8b4-20230202

Is it a regression?

I didn't know.

ASS Sample

[Script Info]
PlayResX: 384
PlayResY: 288
ScriptType: v4.00+
PlayDepth: 0
ScaledBorderAndShadow: Yes

[V4+ Styles]
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
Style: Default,Calibri,42,&H00FFFFFF,&H00FFFFFF,&H00000000,&H00000000,0,0,0,0,100,100,0,0,1,1,0,2,30,30,30,1

[Events]
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
Dialogue: 0,0:00:01.00,0:16:40.00,Default,,0,0,0,,‫هَذَا اَلنَّصِّ هُوَ مِثَالٌ لِنَصِّ!

Special Fonts

I uploaded or linked to the required font

System Information

Fonts - Copy.zip

Log

No response

Additional info

For more context:
jellyfin/jellyfin-ffmpeg#217 (comment)

@0TTA 0TTA changed the title Rendering: Rendering: When Arabic subtitles are burned into the video, it does not look as it should Feb 3, 2023
@rcombs
Copy link
Member

rcombs commented Feb 3, 2023

This seems to be an ffmpeg bug where ass_set_shaper is always called with the "simple" shaper when using the subtitles filter (not the ass filter). Please report this to them.

@rcombs rcombs closed this as completed Feb 3, 2023
@TheOneric TheOneric changed the title Rendering: When Arabic subtitles are burned into the video, it does not look as it should ffmpeg always uses simple shaping with "-vf subtitles", messing up Arabic text Feb 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants