user25215: 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 ?

user1871: 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.

25215: <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>
 1871: <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>
