View Full Version : AutoGK: Lord of the Rings Extended
MelTraX
24th April 2005, 20:52
Hi @ll..
I've been searching the forum for hours now to find a way to encode the Extended LotR Editions but I just found some posts where people are trying to encode it using the "normal" Gordian Knot..
My aim is to have a Double Layer DVD with all the three extended Versions on it with german and english ac3 (dts) audio..
The problem is, as you might guess, that the movies are each on two DVDs. I could encode one DVD after another and then merge the AVIs with VirtualDub, but AutoGK calcutaed different compressibility values for the two DVDs and used different resolutions. I could force it to use the same but due to the different comp-value I guess it would be better to merge the DVDs before I encode them..
Could anyone tell me if AutoGK can be configured to handle this or could anyone tell me what program to use to merge the two DVDs before passing it to AutoGK?
I apolagize if this is already on the forum and I just didn't find it..
Thanks for any help,
MelTraX
jggimi
26th April 2005, 07:29
In order to make sure your video stays in sync with your audio and subtitles:[list=1] Have lots of extra capacity on your HD
Use DVD Decrypter to extract each disc to separate folders in IFO mode.
You may want to examine the opening and closing of each vob set -- use DGIndex, included with AGK -- there are "continued on next disc" chapters and such that you'll want to eliminate. If these are in the PGC, re-rip with DVDDecrypter, but eliminating those leading and trailing chapters from the PGC rip.
Renumber the VOB set in the disc2 folder so that the vobs follow in sequence from the Disc 1 set. That means, if the last Vob in the Disc 1 folder is #7, then change the first vob in the Disc #2 folder to #8, etc.
Use VobEdit (http://www.doom9.org/Soft21/Vobtools/Vobedit06.zip), and its Join Clip function
Wait for the Join Clip to end.
Adjust the Streams Information text file in the new combined VOB folder, if necessary. If you use the file from disc 1, you may not need to make any adjustments.[/list=1]
MelTraX
29th April 2005, 21:09
Thanks for your quick reply..
I tried what you supposed. There were no chapters showing "to be continued" or things like that, so I could use the rips on my HDD..
I didn't know how the join clips function in VobEdit works, so I searched on the web and found an explanation which said, that I had to search for the last Vob-ID in the last Vob of the first disk. But all Vob-IDs showed a one so I didn't really know what to do.
Finally I decided to try just renaming the Vobs of the second disk and AutoGK handled it as one movie.
Now, there is only one big problem. The audio isn't synchronized from the point on where the second disk started.
I guess it's because I didn't use the Join Clips function at all.. But could someone just try to explain how to do it in detail. As I said before the Vob-IDs showed one all the way down in the last Vob of the first disk.
Thanks for your help..
jggimi
30th April 2005, 01:55
It's pretty simple, really. I haven't done it in a while, so this is from memory: After ripping each disc in IFO mode, you will have two folders containing .vob sets.
A .vob set contains one or more files, by default a max of 1GB each.
Each vob file has a filename, VTS_<titleno>_<vobno>.VOB
Note that each disc's vob set starts with vob #1 -- the title numbers will probably be the same. Use the following steps to join the vobsets: Rename all the files in the disc 2 folder so that they are sequential to the .vob files in the disc 1 folder.
e.g.: If the last file in disc 1's folder is VTS_02_7.VOB, then, rename the _1.VOB file in the second folder to VTS_02_8, and so on.
Once this step is completed, I've found it easiest to place all these files in a single folder, so that they LOOK like they're one vob set. However, as I'd told you, and, as you noted, that not yet a usable vob set. The various streams (video, audio, subtitle) are not contiguous.
Have an empty directory ready. Open Vob#1, and Join Clip. It will prompt you for the directory to put the new, properly joined complete vob set.For more on vob sets, see www.doom9.org/dvd-structure.htm.
MelTraX
30th April 2005, 16:22
Thanks for your detailed description..
But I have to admit that it didn't help me a bit.. That's because my VobEdit just doesn't want to start the joining process..
Perhaps you have any idea, why... This is my scenario:
I have Windows XP SP2 installed and I downloaded VobEdit 0.6 from it's own homepage and the hot-linked one from doom9.. It was a ZIP-file with just the executable in it..
I renamed the seven VOB-files from the second disk and put them, together with the ones from the first, into the root-directory of my F: drive (because the long directory name could have been the problem). Now the directory looks like this: (dir > temp.txt)
20.04.2005 14:14 <DIR> LOTR_SEE_D1
20.04.2005 14:36 <DIR> LOTR_SEE_D2
20.04.2005 15:02 <DIR> LOTR_TWO_TOWERS_SEE_D1
30.04.2005 15:42 <DIR> neu
30.04.2005 16:11 0 temp.txt
20.04.2005 14:36 1.319 VTS_01 - Stream Information.txt
20.04.2005 14:14 110.592 VTS_01_0.IFO
20.04.2005 14:18 1.073.723.392 VTS_01_1.VOB
20.04.2005 14:46 1.073.666.048 VTS_01_10.VOB
20.04.2005 14:49 1.073.639.424 VTS_01_11.VOB
20.04.2005 14:52 1.073.383.424 VTS_01_12.VOB
20.04.2005 14:56 1.073.391.616 VTS_01_13.VOB
20.04.2005 14:58 447.416.320 VTS_01_14.VOB
20.04.2005 14:21 1.073.297.408 VTS_01_2.VOB
20.04.2005 14:24 1.073.555.456 VTS_01_3.VOB
20.04.2005 14:27 1.073.375.232 VTS_01_4.VOB
20.04.2005 14:31 1.073.418.240 VTS_01_5.VOB
20.04.2005 14:35 1.073.643.520 VTS_01_6.VOB
20.04.2005 14:36 38.447.104 VTS_01_7.VOB
20.04.2005 14:40 1.073.711.104 VTS_01_8.VOB
20.04.2005 14:43 1.073.453.056 VTS_01_9.VOB
(perhaps I have to rename them to VTS_01_01.VOB in order for it to work) edit: I just tried that; didn't work either!
Now I opened the VTS_01_1.VOB in VobEdit and selected "Join Clips". As you said, it asked me for a new directory. I set it to "neu" which is the empty directory in the listing above.
After that, it asked me for the first Vob-ID.. As I read on the web, this should be 1, if I don't intend to put anything else before my video. But when I now press OK it just switches back to the program and no process is starting at all.. The directory remains empty even when I wait some minutes and I saw in some screenshots there should be a status window.
I can't imagine that anyone can help me with this one but perhaps it's not just a problem with my PC, so any help would be appreciated.
Aegis
30th April 2005, 18:05
Meltrax...I was just trying this...with the same version of Vobedit that you're using, the one linked to in this thread, and it wouldn't join my vob files either when they were named:
VTS_01_01.VOB
VTS_01_02.VOB
etc...
until I renamed them:
VTS_01_001.VOB
VTS_01_002.VOB
etc...
The distinction being that there are 2 leading zeros. I tried it with 1 leading zero, and it just went back to the main screen after asking for the starting vob ID. However, once renamed, a progess window does indeed come up, but it doesn't actually display a progress bar for me, though I think this may because I'm using it through terminal service client. This didn't really bother me once I found out that the program was working, as evidenced by the newly created set of vobs in the destination directory. :)
jggimi, thanks for the info!
jggimi
30th April 2005, 20:08
As I'd said, it's been a while....
Thanks, Aegis! :cool:
MelTraX
30th April 2005, 22:12
Wow, thanks... Now it is processing the Vobs... The rest should be easy.. If there are any problems I'll post again..
Thanks for your help, guys..
MelTraX
2nd May 2005, 10:43
The problem remains..
VobEdit managed to join the disks resulting in 13 (from 14) Vobs where only the last one is significantly smaller than the others.
I encoded them during last night with AutoGK.. The result looks quite pleasing, as the last did, but it also sound exactly (maybe small improvements) like the last one. It doesn't stay in synch from the point where the break was.
The Stream-Information files show that there aren't any delays (except for subtitle-streams which I don't use) in neither the first nor the second disk.
My next guess would be the source files so I would try to play them back but I don't have any DVD-Player-Software on my PC and I don't like all of them I know.. So perhaps you have an idea how to get my movie in synch..
PS: I am sure that I used the joined Vobs and not the old ones ;)..
lol, the reason I even saw read this topic was because I was converting my LOTR collection too. Ironically, I have the exact same problem...where the discs were joined, the "second half" audio plays ~440 ms too soon.
I was thinking about just demuxing the audio & video, inserting a 440 ms silence into the mp3 (at the break), and then remuxing.
This sound like a good or foolish idea?
[Edit] Actually, I think it'd be easier to split the avi file, add a delay to the second, then join them back together. I suppose I should learn how to used GKnot for stuff like this instead of AutoGK.
jggimi
2nd May 2005, 14:48
The last time I played with this was in the fall of 2002, when FOTR:EE was released. My memory isn't very good, but I do have a few recollections. With the R1 discs, I recall having a "continued on disc 2" chapter at the end of disc 1's PGC, and I recall seeing some 6 frames of black in a cell at the beginning of disc 2.
According to the button in my sig, I participated in 5 different threads on FOTR:EE, and as I recall, some were before trying VobEdit.
So, following your hint, I dug up one of your posts:
Technique #1 - Used with LOTR:FOTR EE:
[list=1]
Rip the VOB sets to separate folders, excepting "dvd transition" chapter at end of Part 1.
Use the ADD button to concatenate and create a single .d2v.
Notice that the sound is notably ahead of the video in the second half.
Edit the .avs script, adding Trim() command to excise extra black frames that "magically appeared" when the .vob files were concatenated.
Note that the sound seems to be in sync.
[/list=1]
Technique #2 - Used with LOTR:TTT EE:
[list=1]
Rip the VOB sets to separate folders, excepting "dvd transition" chapter at end of Part 1.
Create separate .d2v files
Convert audio tracks to .wav format with BeSweet.
In .avs, open the .d2v and .wav files as 4 separate clips with mpeg2source() and wavsource() filters.
Delay the audio as described by their .ac3 file names with Delayaudio().
Combine each audio and video track with AudioDub().
Combine the two parts with "++" which is equivalent to AlignedSplice().
Open the .avs and "Save WAV" to extract the audio.
Convert the audio from WAV to preferred compressed soundtrack format (.mp3, .ogg, ...).
Open .avs in Gknot. I found that AVISource() had trouble with the .avs I had it open, as the colorspace was YV12. I've reported the bug to the AviSynth SourceForge project. Until it is fixed, there are two circumventions -- adding ConverttoYUY2() to one's concatenation script, or replacing the AVISource() with the concatenation script. Don't forget to add a KillAudio() to the source script regardless, as your audio will be managed separately.
[/list=1]
Full Thread Here (http://forum.doom9.org/showthread.php?s=&threadid=70440&highlight=lotr)
Since I'm anal, I like #2...however, lines 4-8, 10 don't really mean anything to me...I gather all these "xxxxx()" terms are filters, but I don't know what uses them. Also, I suppose I would have to know their usage, and line 4 is really confusing... "In .avs, open..." From what little I know, .avs is an avi-synth script, correct? If so, when you say "open ... files as 4 separate clips" What does that mean?!
Again, I'm just wondering where I should start looking for references to dechiper the above steps...guides, tutorials, how to use all those filters, etc...
jggimi
2nd May 2005, 22:10
Lines 4-8 deal with a video and audio frameserver (and scripting language) called AviSynth, used by Gordian Knot. Those instructions you repeated assume you are comfortable with the former, and use the latter.
AviSynth is also used by AutoGK, but much more under the covers than in GK.
And neither method shown is necessarily "correct" -- which is why I recommended VobEdit.
I've since given up trying to make each into a "single reel" .avi ever again, or even -- perish the thought -- trying to make a "single reel" out of all three movies, theatrical or extended. I can't sit through even one of 'em non-stop, anyway. Either my bones or my bladder start to ache.
rofl...all three LOTR films in one...whoa. That would be pretty tough to handle. With the extended editions at something like 3.5 hours, that's around a 10.5 hour movie, lol.
Huh. Sic'ing AutoGK on the individual disc rips is tempting, but the 1-file divx movie is so elegant...A dilemma to be sure.
Argh.
homermaster
3rd May 2005, 03:33
I just finished doing this and was rather frustrated at how the join vobs didn't work to keep the audio in sync. I found a way to make AutoGK do it. I used dgindex to extract the audio of the concatenated vobs, besweet to change the ac3 to a wav, and nero's wave editor to copy and paste 440ms of sound at the transition of the disks to sync audio. If you don't have nero there are freeware wave editors out there. As long as you named the output from dgindex the same as your output name in AutoGK you can move the edited wav into the agk_tmp folder and it will replace it and process it into the final movie. The tricky part is that you have to do this after audio decoding and before mp3 encoding happens. I had to open the dos window showing audio decoding and place it's close button over the ok button confirming file replace and click on them very close together. The file must be overwritten after the decoding is closed and before the normalizing step starts. It took me quite a bit of time to get that timing just right but it worked just fine for me. I thought about using an mp3 editor as it would be a little easier as the next step is the compressability test is next and you don't have to go through the file swapping gymnastics with the wav. However, I have tried this before and any appreciable difference in file size of the mp3's will lead to the much greater problem of the audio and video becoming more asynchronous through the movie. So unless you know how to get past that I think the wav process is the way to go.
If you think this is hard try reinserting the deleted scenes back into Episode I. In the movie the 6ch is mapped to 80 and the 2 ch is mapped to 81 while in the deleted scenes it is vice versa. So you have to use stream processing in DVD Decrypter to remap the audio streams and then go through and resync the whole movie. All 3 LOTR movies into 1 avi would be a piece of cake comparatively.
jiggimi as usual has given an incredibly great idea with the Trim() command but it is not usable in AGK unfortunately.
jiggimi as usual has given an incredibly great idea with the Trim() command but it is not usable in AGK unfortunately.
Yes it is, with AGK tweaker (it's somewhere on these boards)
homermaster
4th May 2005, 01:59
found it in the development forum .... not there as much but it seems I need to be. :)
http://forum.doom9.org/showthread.php?s=&threadid=79227
Too bad it just breaks at VDubMod.... would be handy to have a break with audio processing to make my above solution easier. I also could have used this tool when I was looking at prerotation... of course that is a moot point now with the new player. However it leaves many things open for the future.
Thanks for the heads up niamh!!
homermaster
5th May 2005, 01:15
I have been doing some research with both the Trim() and DeleteFrame() avs script commands at http://www.avisynth.org/index.php?page=AviSynthManual
It seems to me that the Trim() command won't work as it cuts the audio as well as the video and won't do anything to actually resync them. The only command that will cut the video and not the audio is DeleteFrames().
However, I'm not entirely sure this will work either as you are only able to make resync adjustmants to the audio in incremants of time taken up by a frame. This means that if you have 23.976 fps, a frame takes up 1/23.976 seconds or roughly .0417 seconds. If we had sync issues that were always on multiples of this we could fix any sync problem. However, as 10 frames takes up 417 ms and 11 frames take up 459 ms, neither of these is very close to the 440 ms required to resync.
This is a great idea using AutoGK Tweaker and AutoGK, but only having sync issues that can be fixed on 42 ms increments isn't very plausable. The only solution that I see is still the one I offered above. If someone could make something like AutoGK Tweaker that works by creating breaks in the audio portion of the encoding process so that it is easier to insert an edited wav it would make that process much easier.
Of course, I am pretty new to avs scripting though and there is a good possibility that there might be another workaround with another command.
MelTraX
6th May 2005, 18:05
Thanks for all your posts...
I finally have my FotR encoded..
It took a while and wasn't as easy as all my other backups but I finally have what I wanted to have..
Here's what I did:
I'm from Germany so I have the PAL version of the disk.. When joining with VobEdit, I got 25 black frames.. So I used AutoGK Tweaker (from another thread) in order to insert a Trim() command into the comptest and movie AVSs..
the Trim() command won't work as it cuts the audio as well as the video
This worked just fine because there is no Audio in the AVS script (at least when using AutoGK, I don't know about GKnot).. The Audio is remuxed in VirtualDubMod and after cutting the 25 frames, the second half was perfectly in synch.. In this case the delay was exactly 1 second because the 25 frames appeared out of nowhere.. Deleting them leads to the original video-stream.
The other problem were the subtitles.. I wanted the english subtitles where the elves were talking.. These are forced ones in the first english subtitle stream. But when I selected just this in AutoGK they didn't show up..
So I ripped the forced subtitles with SubRip and used those in AutoGK (with <CTRL>+<F8>).. This worked just fine and because these aren't just Bitmaps, it looks better with AutoGK doing some shadow-action.. ;)
Now I'm working on TTT... But I'm afraid the same procedure won't work for the 2nd LotR.. I already extracted the subtitles but after joining the disks in VobEdit, the audio on the second half came after the video.. I would say that if I had to delete frames when the audio came before the video, I have to insert frames in this case..
I already searched the forum for this problem but I didn't find much of interest. I will continue my search but I thought I'll post here first to let you know how it worked for me..
But if anyone can tell me what to do or why my subs didn't appear the normal way, I would appreciate it..
homermaster
6th May 2005, 20:27
Wow that is great!! I would be interested in how it works without cutting the audio as everything I have read on it says it will. I'm sure it has something to do with there not being audio in the avs script as you said but I thought it would still happen when it encoded. One of the times it is great to be wrong. :)
I am curious how you found out how many frames were added... was it from some of the process I described in finding audio skew here http://forum.doom9.org/showthread.php?s=&threadid=94020 or some other process? I would love to hear if you have a better way.
The subtitle problem is an interesting one. A possible solution might be that you didn't have the ifo file with your concatenated vob set. I ran into the same problem a while ago and noticed in the Log window of AutoGK during encoding that (I don't remember exactly what the phrase was) sub processing was disabled because of a missing ifo. I stopped the encoding and thought I might need to create a new ifo (since the vobs were concatenated). Instead I decided to try it with the original ifo from the first disk to see if it would work without having to do this. It worked.
If you kept the log file from the first encode look for a line that says something about sub processing being disabled and see if that was what the problem was. If it dosen't look like this is the problem reply and lets see if we can figure it out.
As for adding frames for TTT the post I refered to above has a link to avisynth manual with (as far as I know) a comprehensive listing of avs script commands. In it there is a command DuplicateFrame() which works exactly oppositely as DeleteFrame(). There might be a better option but this could be a good starting point.
MelTraX
6th May 2005, 20:43
It wasn't that hard to find out how many frames were added because I knew where the break point from the first to the second disk was and when I opened the AVS in VirtualDub, I could count the frames.. In other threads some people talked about 8 frames or something like that, but that seems to be the case for the NTSC-version only or I don't know..
The subtitle problem is a bit complicated, I guess.. Because I did several encodes with different subtitlestreams and with or without "only forced" enabled.. The most curious thing was, that they weren't enabled, I had subtitles in the first minutes of the movie only (not through the whole first disk).. So I guess that is also the problem why there were none at all when activating "only forced subtitles" because there are no forced subtitles in the first few minutes..
For TTT, I guess, I will just cut the final AVI at the break point and insert an audio delay to the second half but not this weekend, I guess...
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.