[FFmpeg-user] Multiline subtitles without thin dark line

Bouke / Videotoolshed bouke at videotoolshed.com
Wed Feb 15 14:45:59 EET 2023


> On 15 Feb 2023, at 13:21, Steinar Apalnes <steipal at gmail.com> wrote:
> 
> Hi,
> 
> I want to create subtitles with multiple text lines using BorderStyle=3 in
> order to have the background color adapt to the length of each line. The
> problem is that I get a thin dark line between every text line.

You do not have a stupid black line, you have overlapping boxes so the alpha will double.
Increase line spacing and it ’should’ be fine. (I did not try, but I’m pretty confident.)
And for my taste, just outline is enough, boxes are ugly and came from stupid CC / TeleText.

Bouke


> Is there a
> way to avoid this so that all background areas appear uniform and
> transparent?
> Using BorderStyle=4 is not an option, nor is using a solid black background.
> 
> ffmpeg -f lavfi -i mandelbrot=size=1280x720 -filter_complex
> "subtitles=sub.srt:force_style='Alignment=0,OutlineColour=&H80000000,BorderStyle=3'"
> -c:v rawvideo -f nut - | ffplay -
> 
> Thanks
> -steinar
> 
> [image: sub.jpg]
> <sub.jpg><sub.srt>_______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
> 
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".



More information about the ffmpeg-user mailing list