[MPlayer-users] Win32 / Linux VobSub for MPlayer multi-platform color fix
John Evans
jevans64 at knology.net
Sun Dec 8 09:21:03 CET 2002
Hi All,
I thought I would post a quick fix for the color palette
differences between VobSub for Windows and Vobsub for Linux. I am not
very good at C programming and this is just a crude mod of the code in
vobsub.c. This will only work if the origional .idx file was edited to
only display the middle two ( tridx: 1001 ) or last three colors (
tridx: 1000 ) and changed the palette to a light text w/ dark outline. I
changed all of my Windows subs to white text w/ black outline with the
following line in the .idx file.
custom colors: ON, tridx: 1000, colors: 000000, 000000, ffffff, 000000
**** This will not work if the .idx was already created and edited to
work with Linux VobSub **** The Windows VobSub source would have to be
altered instead.
I welcome any better way of fixing this for both Windows and Linux.
On to the meat. ;-)
Attached is a template for use on the Windows version of VobSub. Just
paste this to the beginning of your existing .idx file and edit out any
duplicate lines ( Win users already have this part but VobSub for
MPlayer does not generate this. I have added a 5th color just in case it
is needed for Linux VobSub but it is not necessary if the last color is
black ( 000000 ). Test play the subs on a Windows box to properly set
the "Origin" and "Image scaling" parameters. These have no effect on a
Linux box.
Windows VobSub reads the colors as : background, outline, text, border
between text & outline.
Linux VobSub in MPlayer reads the colors as: background ( not used ),
text, outline, border between text & outline ( not used ).
Attached is the replacement vobsub.c file. Unpack the MPlayer-0.90pre10
( or similar ) archive. Go into the directory created by the tarball and
replace the vobsub.c with my version. Back up the origional just in
case. ;-) Do the usual ./configure , make , make install. That's it.
What I did:
changed line 820 <line += 40;> to read <line += 48;>
just shifts the parse to the second color and grabs from there.
Very simple. ;-) A second set of 4 colors could even be added to the end
of the first 4.
Happy encoding,
John
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: VobSubTemplate.idx
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-users/attachments/20021208/4586cd6b/attachment.asc>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: vobsub.c
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-users/attachments/20021208/4586cd6b/attachment.txt>
More information about the MPlayer-users
mailing list