Log in

View Full Version : Lord of the Rings 2CDs with Subtitles


cdowning
6th March 2003, 16:43
Hi all,
I have spent a great deal of time trying to solve this one. As have many before me no doubt.
I am tyring to encode LOTR - The Two Towers Special edition that runs across 2 CD's. The trick is getting the subtitles for both peaces of the movies.
I found a post from jimbokoz in 'DivX5 Encoding' that gave an example 'AVS' script that seems to mage sense but he follows on to say...
"The script above (once fixed for syntax errors I've inadvertently made!) will load both DVD's with subtitles burned in, and stick one after the other... "

His script was as follows:

Example:

LoadPlugin("MPEG2DEC.dll")
LoadPlugin("VobSub.dll")
disc1 {
MPEG2Source("disc1.d2v")
VobSub("subtitles-1.idx")
}
disc2 {
MPEG2Source("disc2.d2v")
VobSub(subtitles-2.idx")
}
alignedsplice(disc1,disc2)
crop(x,x,x,x)
BilinearResize(x,x,x,x)

Now I've adapted it to this job as follows...

LoadPlugin("C:\PROGRA~1\GORDIA~1\mpeg2dec.dll")
LoadPlugin("C:\WINDOWS\System32\vobsub.dll")
CD1{
mpeg2source("F:\LOTR_SEE_D1\CD1.d2v")
trim(0,151945)
VobSub("F:\LOTR_SEE_D1\VIDEO_TS1\VTS_01_0")
}
CD2{
mpeg2source("F:\LOTR_SEE_D1\CD2.d2v")
trim(0,136622)
VobSub("F:\LOTR_SEE_D1\VIDEO_TS2\VTS_01_0")
}
alignedsplice(CD1,CD2)
crop(10,84,699,408)
BicubicResize(640,256,0,0.5)

Only problem is that it doesn't work! I've read all I can on 'AVS' Syntax and from what I can gather I don't have anything wrong.
The error I get from NanDub is...

"Avisynth open failure:
Script Error: Syntax Error
(C:\Documents and Sett\...\LOTR2.avs, line 3, column 4)"

I've tried all sorts of combinations but I just cant seem to crack it... Does anyone with some degree of experience know what I'm doing wrong?
From what I can tell... It's just the use of "{" and "}" that's causing the problem because the rest of the script works as is as long as I only try to do one disk (set of VOBs) at a time... This one is really driving me nuts. Any help at all would be greatly appreciated.
Cheers,
Chris D.

sh0dan
6th March 2003, 16:49
All the stuff you put in "{}" is very strange - that is not AviSynth syntax at all...?

Replace it with:
disc1 = MPEG2Source("disc1.d2v").VobSub("subtitles-1.idx")
disc2 = MPEG2Source("disc2.d2v").VobSub(subtitles-2.idx")

etc.

Just out of curiosity: Why do you put the subs inside the video? It is very hard to compress, and you cannot turn it off.

bilu
6th March 2003, 17:18
@sh0dan

About permanent subs: do they screw that much on compression?
I suppose they do, after all they are objects constantly appearing and disappering so they must be an overkill to motion estimation. Am I right?


Bilu

sh0dan
6th March 2003, 17:44
@Bilu: Since they are half-transaprent, they are actually a big pain for ME. The main problem is, that if the background moves, (and the letters don't), either the background or the letters have to be completely reconstructed.

Imagine this:
1) An image moving left to right (a simple pan).
2) the same as 1), but with a big 'X' static over the entire picture.

2) is many times harder to compress, than 1), because there are a lot of errors to the motion estimation.

Futhermore subs are hard to compress because they are detailed and high-contrast. Do a test, where you compress a movie with quantizer 2 in XviD, and compare it to the same file with some texts:

I made a test, with a 512x384 video. I added two lines of subs (size 22) - a subtitle size that would be natural for that size video. The text is static and present throughout the clip (2076 frames)

Xvid, Quant 2, No subs: 19.976.192 bytes
Xvid, Quant 2, Subs: 23.691.264 bytes

Approx. 20% size increase.

(ok - I got carried away - better get back on topic!).

cdowning
7th March 2003, 10:03
OK... I'll try the syntax you gave me.

It's strange that you say it's not 'AVS' syntax because if I remove the "{}" and only try one disk the sytax works fine. In fact it's derived from what Gordian Knot generates.

As for your question "Why do I put the subtitles in". Well despite my playing with 'AVS' script I'm still a noob at this and That's the way GKnot does it. I'm more than open to suggestions as to how I might do it diferantly.
PS Turning the Subtitles off in thia case isn't much of an issue as they are only for the elvish lines in the movie, of which there are very few and would be hard to understand without subtitles.

Thanks for your help.
Cheers,
Chris D.