[MPlayer-users] bug report: the position of the subtitle is too high in my case

Rashkae rashkae at tigershaunt.com
Fri Apr 22 14:22:59 CEST 2011

On 11-04-21 03:13 AM, Richard Chu wrote:
> os: debian squeeze i386
> kernel: 2.6.32-5-686
> mplayer version:2:1.0~rc3++svn20100804-0.2
> description:
> I transcoded a dvd movie to H.264 file with the Handbrake. When I opened it
> with mplayer with subtitle enabled, the position of subtitle is too high (
> see attached file No.1). I tried adjust the value of subtitle position in
> the Preference, it did not work.
> Instead I tried VLC, the subtitle appeared in the lower position which I
> feel great ( see attached file No.2).
> So is it a bug or should I do anything else?

Mplayer had problem for a few versions around that time last year with 
vobsub subtitles missing idx information.  It seems to be fixed now.  In 
any case, here are instructions on how I worked around the issue at the 
time, assuming your transcoded file is in mkv container.

mkvmerge -i your_file.mkv

Take note of which Track ID has the subtitle,, for my example:

Track ID 1: video (V_MPEG4/ISO/AVC)
Track ID 2: audio (A_AC3)
Track ID 3: subtitles (S_VOBSUB)

mkvextract tracks your_file.mkv 3:subtitles

edit the subtitles.idx file

You want to add/modify the 'size' line near the top.  Ex:

# VobSub index file, v7 (do not modify this line!)
size: 720x480
forced subs: OFF
palette: 000000, 000000, ffffff, ffffff, ffffff, ffffff, ffffff, ffffff, 
ffffff, ffffff, ffffff, ffffff, ffffff, ffffff, ffffff, ffffff

Don't worry if the video was cropped, using 720x480 seems to universally 
work well.  Any time I try to experiment with changing those values, the 
subs end up incorrectly positioned too high as in your screenshot.

While you're here, you may want to also modify the palette so that each 
color is either 000000 for black or ffffff for white.  (since mplayer 
doesn't support colors in subtitles and renders them semi-transparent, 
this makes they much more readable on mplayer.)... Unfortunately, each 
subtitle will use a different item from the palette for border and fill 
color of subs, so some experimentation is required to find which is 
which.  In most cases, since the sub border is already black, it's 
simply a matter of changing any non 000000 value to ffffff.  If there is 
no palette information, then you have to make it up and test.

I usually use the gui to remux the mkv file.

mmg your_file.mkv

Uncheck the vobsub track already there.

Click 'add' button.

open the subtitles.idx file to attach your modified subs.

'Start Muxing' to create the new file.

More information about the MPlayer-users mailing list