User Tools

Site Tools


linux:add_subtitles_to_movies

Adding subtitles to movies (inside the video)

12.07.2012

Burn-in the subtitles

Using mencoder (part of the mplayer package).

mencoder -subcp UTF-8 -ovc xvid -xvidencopts fixed_quant=4:autoaspect -vf scale=720:306 -oac copy -sub subtitle.srt -o output.avi source.avi 

  • -subcp UTF-8 - specify the encoding of the subtitles
  • -oac copy - how to deal with the audio (here just copy it). On .mkv files we use -oac pcm instead
  • -xvidencopts - details for the video encoding
  • -vf scale=720:306 - rescale to these dimensions (if needed)

Another possible options:

  • -subpos 95 - subtitle position
  • -vf expand=640:384

Join two parts of the same movie

First, do the above operation regarding the subtitles burn-in.

Then

mencoder -oac copy -ovc copy start.avi end.avi -o complete.avi

linux/add_subtitles_to_movies.txt · Last modified: 2013/03/16 17:40 (external edit)