How to set background to subtitle in ffmpeg?

后端 未结 6 1511
陌清茗
陌清茗 2020-12-14 23:14

It is described here how ot burn a srt file into a video. However, I want to put a semi-transparent background to the subtitles so that the texts can be read more easily. H

6条回答
  •  忘掉有多难
    2020-12-14 23:50

    ffmpeg -i input.mp4 -filter_complex "subtitles=input.srt:force_style='BackColour=&H80000000,BorderStyle=4,Fontsize=11'" output.mp4
    

    BackColour=&H80000000 means having a %50 opaque black background.

    Its a hex representation of color, AABBGGRR.

提交回复
热议问题