Answers.Body: <p>You can avoid multiple lines overlaying each other by using <code>BorderStyle=4</code> together with <code>BackColour=&amp;H80000000</code> which gives a 50% opaque black color background.</p>
  <p>Full command would be:</p>
  <pre><code>ffmpeg -i source_video_path.mp4 -vf &quot;subtitles=srt_source.srt:force_style='OutlineColour=&amp;H80000000,BorderStyle=4,BackColour=&amp;H80000000,Outline=0,Shadow=0,MarginV=25,Fontname=Arial,Fontsize=10,Alignment=2'&quot; video_destination.mp4
  </code></pre>
  <p><a href="https://i.sstatic.net/uqgcb.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/uqgcb.png" alt="enter image description here" /></a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-02-25T18:31:28.030Z
Answers.Text: How to increase the margins to have bigger outside area with those settings? While setting outline=5 I get funny looking outlines which are less transparent than that area which I wanted to get bigger.
Answers.UserDisplayName: Peter.k
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-02-25T19:09:06.823Z
Answers.Text: Ok, found the way. `OutlineColour=&HFFFFFFFF,BorderStyle=4,BackColour=&H44FFFFFF,Outline=6,Shadow=0,MarginV=10`. Increased outline and set outline color to full transparency.
Answers.UserDisplayName: Peter.k
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-05-03T13:43:20.167Z
Answers.LastActivityDate: 2022-05-03T13:43:20.167Z
Answers.UserDisplayName: Dr. House
Body: <p>While using <code>ffmpeg</code> to burn <code>.srt</code> subtitles to <code>mp4</code> files I'm having an issue with multiple text lines  - background is overlaying each other.</p>
  <p>Command I'm using:</p>
  <p><code>ffmpeg -i source_video_path.mp4 -vf &quot;subtitles=srt_source.srt:force_style='OutlineColour=&amp;H80000000,BorderStyle=3,Outline=1,Shadow=0,MarginV=25,Fontname=Arial,Fontsize=10,Alignment=2'&quot; video_destination.mp4</code></p>
  <p><a href="https://i.sstatic.net/1QIDX.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/1QIDX.png" alt="enter image description here" /></a></p>
  <p>Question is - is it possible to overcome the overlay while still having a transparent background while using <code>.srt</code> format or I need to use <code>.ass</code> format as a fix?</p>
  
Tags: <ffmpeg>
Title: ffmpeg subtitles background issue when multiple lines (using .srt format)
UserDisplayName: Dr. House
ThreadText: # ffmpeg subtitles background issue when multiple lines (using .srt format)
  
  (Asked by: username_0 on 2022-05-02)
  
  While using `ffmpeg` to burn `.srt` subtitles to `mp4` files I'm having an issue with multiple text lines - background is overlaying each other.
  
  Command I'm using:
  
  `ffmpeg -i source_video_path.mp4 -vf "subtitles=srt_source.srt:force_style='OutlineColour=&H80000000,BorderStyle=3,Outline=1,Shadow=0,MarginV=25,Fontname=Arial,Fontsize=10,Alignment=2'" video_destination.mp4`
  
  [![enter image description here](https://i.sstatic.net/1QIDX.png)](https://i.sstatic.net/1QIDX.png)
  
  Question is - is it possible to overcome the overlay while still having a transparent background while using `.srt` format or I need to use `.ass` format as a fix?
  
  **Tags:** ffmpeg
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2022-05-03. Score: 4 | Accepted answer
  
  You can avoid multiple lines overlaying each other by using `BorderStyle=4` together with `BackColour=&H80000000` which gives a 50% opaque black color background.
  
  Full command would be:
  
  ```
  ffmpeg -i source_video_path.mp4 -vf "subtitles=srt_source.srt:force_style='OutlineColour=&H80000000,BorderStyle=4,BackColour=&H80000000,Outline=0,Shadow=0,MarginV=25,Fontname=Arial,Fontsize=10,Alignment=2'" video_destination.mp4
  
  ```
  
  [![enter image description here](https://i.sstatic.net/uqgcb.png)](https://i.sstatic.net/uqgcb.png)
  
  > **Comments:**
  > **username_1**: How to increase the margins to have bigger outside area with those settings? While setting outline=5 I get funny looking outlines which are less transparent than that area which I wanted to get bigger.  
  > **username_1**: Ok, found the way. `OutlineColour=&HFFFFFFFF,BorderStyle=4,BackColour=&H44FFFFFF,Outline=6,Shadow=0,MarginV=10`. Increased outline and set outline color to full transparency.  
  
  ---
  
  