I'm new to ffmpeg, sorry if this was asked before already but I can't find the exact solution I'm looking for.

So I have a 250MB .mkv file with subs

And I want to turn it into a .mp4 file with burned in subtitles.

I have found this solution FFMPEG mkv to mp4 conversion loses subtitles

Where they offer:

ffmpeg -i input.mkv -vf subtitles=input.mkv output.mp4

Which works!

But, that makes me end up with 180MB .mp4 file that takes a very noticable hit to the quality with a lot of squares/artifacts popping up in motion on the video.

Is there way similar to this option? ffmpeg -i input.mkv -c copy -c:s mov_text output.mp4

Where I still get a .mp4 file with burned in subtitles but the audio and video quality are the same as source? With the same bitrate and also constant and not variable framerate?

Thank you!


No, you can not burn in subtitles without transcoding. You must also set a bitrate, or quality option if you want to control the quality.

ffmpeg -i input.mkv -vf subtitles=input.mkv -c:v libx264 -preset slow -crf 22 -c:a copy output.mp4

| improve this answer | |
  • I see, that's quite okay. Will -crf 22 be okay? I'm not exactly sure how it works but I found that -crf 18 is considered almost lossless, I did some testing doing it this way with quality control. However it behaves really strange: For instance transcoding 250MB .mkv to .mp4 at -crf 18 gives me a 300MB file. However transcoding a 1.2GB .mkv to .mp4 at -crf 18 gives me a 700MB file. I'm not quite sure what is up with that? – lain137 May 4 '19 at 18:35
  • The crf is whatever works for you. Lower numbers have higher quality, and larger files. The behavior you were seeing is not strange. It’s expected. X264 will use as many bit as it need to keep a quality, but no more. So the file size is unpredictable. It can be larger that in input, because “quality” in video means matching the input as close as possible. Regardless of how it was co,pressed in the past. – szatmary May 4 '19 at 18:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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