I have an ASS as the subtitle stream (with these fonts: - Orotund, jagb_.tff, jagw_.ttf, JUST.ttf, Gabrielle.ttf) in an MKV.

What technique should I use to hardsub this subtitle stream onto the MPEG4 (ISO/AVC) without losing quality?

Thanks for all suggestions

2 Answers 2


ffmpeg has an amazing article on burning the subs into the videos.

I trust ffmpeg to be very careful with (the lack of) quality loss.

Given you are dealing with ASS, here are the important bits,

You can burn text subtitles (hardsubs) with one of two filters: subtitles or ass.

ass filter

Same as the subtitles filter, except that it doesn’t require libavcodec and libavformat to work. This filter requires ffmpeg to be compiled with --enable-libass. On the other hand, it is limited to ​ASS (Advanced Substation Alpha) subtitles files. See the ​ass video filter documentation for more details.

ffmpeg -i video.avi -vf "ass=subtitle.ass" out.avi

If your subtitle is in SubRip, MicroDVD or any other supported text subtitles, you have to convert it to ASS before using this filter:

ffmpeg -i subtitle.srt subtitle.ass

Windows users will have to ​setup font paths to get libass to work

  • ~10 years later! - Ah but that looks right (obviously I don't have the files anymore to test, but your syntax seems likely to work)
    – A T
    Jan 7, 2022 at 20:24

I'm pretty sure it's impossible to hardcode subs without quality loss.

Unless there's a new technique developed in the last 4 years, the file needs to be converted to a lossless type then the subs need to be coded frame by frame and then compress again.

So: There is no technique that may be used to hardsub onto a compressed video without losing [more] quality.

  • Well which technique has the least amount of quality loss?
    – A T
    Feb 4, 2012 at 6:43
  • I can point the way, but I can't explain the technique - I used to do this a looooooooooooooong time ago. Try checking this out. The concept is taking the video OUT from the MKV conteiner and then hardcode it. Feb 7, 2012 at 13:07
  • 1
    I cannot downvote yet, but this is a bad suggestion. ffmpeg has native support for hardcoding subs, and given ffmpeg is very careful with the losses, it's very much possible to burn in subs without overall quality loss
    – TAbdiukov
    Jan 4, 2022 at 12:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.