2

Hey guys how can I add box around subtitle like on picture with ffmpeg here is mi current command

ffmpeg -i movie.mkv -strict -2 -vf "subtitles=subtitle.srt:force_style='FontName=ubuntu,fontsize=30',scale=720:-1" -qscale:v 3  Movie.avi

enter image description here

1

Use

ffmpeg -i movie.mkv -strict -2 -vf "subtitles=subtitle.srt:force_style='FontName=ubuntu,fontsize=30,BorderStyle=3,OutlineColour=&H80000000',scale=720:-1" -qscale:v 3  Movie.avi

See Style Fields and Data Types for tag info and color syntax.

| improve this answer | |
  • Tnx onece again :) – Slobodan Vidovic Dec 14 '16 at 17:27
  • This solution will produce a horizontal artifact for subtitles with more than one lines, see this answer for details and a working solution: stackoverflow.com/questions/25870169/… – sup Mar 17 '18 at 12:17
  • @sup - I had been using the same method - two passes with transparent text in pass 1 (with scaleX,Y > 100 instead of larger fontsize) until I saw that with BorderStyle 4, Shadow is rerouted to indicate margin size. So, I do it with a single pass now. – Gyan Mar 17 '18 at 12:26
  • @mulvya I tired doing exactly that multiple times and it never workd. It is the sixth value from the right, right? What software do you use for displaying and burning the subtitles and at what versions? – sup Mar 17 '18 at 16:29
  • 1
    I overrode the value via force_style in subtitles filter, not in the .ass. I can check and get back to you tomorrow. – Gyan Mar 17 '18 at 16:34

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.