Patch attached.

Currently ffmpeg does not set the 'ScaledBorderAndShadow' header for ASS 
subtitles. This currently leads to inconsistent behaviour depending on the 
renderer(see https://github.com/libass/libass/issues/287#issuecomment-338654103)

Although libass will probably change the default to match *VSFilter soon, it is 
imho still a good idea to set this explicitly. Scaling the fontsize but not the
bordersize with the viewport is inconsistent and probably confusing.
Explicitly setting this header to "yes" is also the default in Aegisub (ASS 
authoring tool) since 2007.
https://github.com/TypesettingTools/Aegisub/commit/5269a2e2a1e1dab7aaf4ddde4055c8637cd413d4
>From 51deab727958c5d64ae526f67063cdf141a01d46 Mon Sep 17 00:00:00 2001
From: Oneric <one...@oneric.de>
Date: Fri, 17 Apr 2020 00:38:53 +0200
Subject: [PATCH] avcodec/ass: explicitly set ScaledBorderAndShadow

---
 libavcodec/ass.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/ass.c b/libavcodec/ass.c
index 7c26e3fd6d..627741936a 100644
--- a/libavcodec/ass.c
+++ b/libavcodec/ass.c
@@ -40,6 +40,7 @@ int ff_ass_subtitle_header_full(AVCodecContext *avctx,
              "ScriptType: v4.00+\r\n"
              "PlayResX: %d\r\n"
              "PlayResY: %d\r\n"
+             "ScaledBorderAndShadow: yes\r\n"
              "\r\n"
              "[V4+ Styles]\r\n"
 
-- 
2.20.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to