<p>Use</p>

<pre><code>ffmpeg -i input.webm -vf ass=subtitles.ass -b:v 0 -crf 20 output.webm
</code></pre>

<p>The libvpx encoders for WebM, by default, perform Constrained Quality encoding, and use the bitrate as a ceiling. Default bitrate is 200 kbps. To remove bitrate ceiling, set bitrate to 0. <code>-crf</code> controls the <a href="https://developers.google.com/media/vp9/bitrate-modes/" rel="nofollow noreferrer">quality level</a>.</p>

CC BY-SA 4.0
2019-05-16T20:32:32.897Z
Cheers!  Worked perfectly.
Jon
CC BY-SA 4.0
2019-05-16T21:06:57.023Z
@Jon, so why you don't accept this answer? Click on check mark near it.
MarianD
CC BY-SA 4.0
2019-05-15T05:53:40.113Z
2019-05-15T06:02:23.490Z
2019-05-15T06:02:23.490Z
Gyan
<p>I'm trying to burn .ass subtitles onto a .webm, using  <code>ffmpeg -i input.webm -vf ass=subtitles.ass output.webm</code>  but it shrinks from like 150MB to 9MB.   How do I add the subtitles without losing quality ?</p>

CC BY-SA 4.0
2019-05-14T08:51:35.633Z
Do you want to mux the subtitles or burn them?
Gyan
CC BY-SA 4.0
2019-05-14T20:52:50.503Z
Burn -- based on https://trac.ffmpeg.org/wiki/HowToBurnSubtitlesIntoVideo
Jon
<ffmpeg><subtitles>
Burn .ass subtitle onto .webm with no loss of quality
Jon
# Burn .ass subtitle onto .webm with no loss of quality

(Asked by: username_0 on 2019-05-14)

I'm trying to burn .ass subtitles onto a .webm, using `ffmpeg -i input.webm -vf ass=subtitles.ass output.webm` but it shrinks from like 150MB to 9MB. How do I add the subtitles without losing quality ?

**Tags:** ffmpeg, subtitles

> **Comments:**
> **username_1**: Do you want to mux the subtitles or burn them?  
> **username_0**: Burn -- based on https://trac.ffmpeg.org/wiki/HowToBurnSubtitlesIntoVideo  

---

## 1 answers

### Answer by username_1 on 2019-05-15. Score: 3 | Accepted answer

Use
ffmpeg -i input.webm -vf ass=subtitles.ass -b:v 0 -crf 20 output.webm

The libvpx encoders for WebM, by default, perform Constrained Quality encoding, and use the bitrate as a ceiling. Default bitrate is 200 kbps. To remove bitrate ceiling, set bitrate to 0. -crf controls the quality level.

> **Comments:**
> **username_0**: Cheers!  Worked perfectly.  
> **username_2**: @username_0, so why you don't accept this answer? Click on check mark near it.  

---

