[MPlayer-dev-eng] want get rid of .ifo file in vobsub

陆 然 hephooey at hotmail.com
Fri Mar 22 05:47:05 CET 2002


I'm trying to improve vobsub.c to get rid of .ifo. I think all the 
infomation needed to display subtitles is in .idx.

this is the head of a .idx file

# VobSub index file, v4 (do not modify this line!)

# 

# To repair desyncronization, you can insert gaps this way:

# (it usually happens after vob id changes)

# 

#	 delay: [sign]hh:mm:ss:ms

# 

# Where:

#	 [sign]: +, - (optional)

#	 hh: hours (0 <= hh)

#	 mm/ss: minutes/seconds (0 <= mm/ss <= 59)

#	 ms: milliseconds (0 <= ms <= 999)

# 

#	 Note: You can't position a sub before the previous with a negative 
value.

# 

# You can also modify timestamps or delete a few subs you don't like.

# Just make sure they stay in increasing order.





# Settings



# Original frame size

size: 720x480



//////////////////////////////////////////////////////////
//here can get the resolution which is read from .ifo in// //vobsub.c       
                                       //   
//////////////////////////////////////////////////////////

# Origin, relative to the upper-right corner, can be overloaded by aligment

org: 0, 0



# Image scaling, origin is at the upper-right or at the alignment point (x, 
y)

scale: 100%



# Alpha blending

alpha: 100%



# Smoothing for very blocky images (use OLD for no filtering)

smooth: OFF



# In millisecs

fadein/out: 50, 50



# Force subtitle placement relative to (x, y)

align: OFF at LEFT TOP



# For correcting non-progressive desync. (in millisecs or hh:mm:ss:ms)

# Note: Not effective in DirectVobSub, use "delay: ... " instead.

time offset: 0



# Custom colors (transp idxs and the four colors)

custom colors: OFF, tridx: 1000, colors: ebe9ea, ebe9ea, 326a15, 110f10


here is the color of the subtitles. and four color can be chosen. I think 
the color is rrggbb or something like that . I just don't understand the 
code in vobsub.c
for (idx = 0; idx < 16; ++idx) 
{
	unsigned char *p = block + pgc_offset + 0xa4 + 4 * idx;
	vob->palette[idx] = p[0] << 24 | p[1] << 16 | p[2] << 8 | p[3];
}
I don't know how the change the color "ebe9ea" to the 16 int in vobsub.c.

hope the infomation is useful to improve vobsub

_________________________________________________________________
与联机的朋友进行交流,请使用 MSN Messenger:
http://messenger.microsoft.com/cn




More information about the MPlayer-dev-eng mailing list