1

I have tried several suggested methods and commands, mostly using mencoder with commands like this:

sudo mencoder movie.avi \
-ovc lavc -oac mp3lame \
-sub movie.srt \
-font "/usr/share/fonts/truetype/msttcorefonts/tahoma.ttf" -subfont-autoscale 2 \
-o movieplussub.avi

The problem is that the subtitle is in non-Latin fonts (but still utf8) however they end up being displayed on the avi as '???????' .

corev
  • 1,317
  • Just want to point out that using sudo to run mencoder (or any other non-administrative task) is a Really Bad Practice... – Sergey Nov 06 '11 at 20:07
  • May I ask why Sergey? – corev Nov 06 '11 at 20:31
  • I was going to ask this question separately to get some good answers for you, but it seems it's already been asked: http://askubuntu.com/questions/16178/why-is-it-bad-to-run-as-root – Sergey Nov 07 '11 at 00:31

1 Answers1

1

Ok, I could figured out how to (kind of) do so using this mencoder command

mencoder input-video.avi -sub mysub.srt -subcp utf8 -subfont-text-scale 3 -subfont-outline 1 -ovc xvid -oac mp3lame -xvidencopts pass=1 -o output-video.avi

Note: You need to either import a proper ttf file to your ~/.mplayer OR symlink the folder to a ttf file in /usr/share/fonts. (Doc)

The command can burn the Arabic utf8 fonts into AVI video, However, the only annoying thing that I see is that when a line in the .srt is long, the second line goes above the first one.

corev
  • 1,317