Log in

View Full Version : The Lord Of the Rings EE Trilogy in a single file (how to do it the easy way)


MCSmarties
12th October 2005, 03:05
This is my first post giving some info instead of asking it.
Hope I'm writing this correctly!

I wanted to backup my LOTR EE DVDs to one large Xvid - the whole trilogy in one file.
Of course I turned to Doom9.org for help and found that a lot of people are struggling with this.
A lot of good info but it all looked soo complicated and time-consuming!
Since I'm lazy I decided to meddle around by myself and I think I found a MUCH easier way.

Simply put, you encode each DVD separately, then just cut the video stream before or exactly
where the audio streams end and finally join the trimmed movies.

You will need:
- The LOTR EE DVD box (duh!)
- DVDDecrypter
- AutoGK
- VirtualDubMod
- eventually BeSweet (+ BeLight) if you want to end up with a MP3 soundtrack.
- lots and lots of free hard disk space (at least 35GB)

Step one: Rip the DVDs.
Use DVDDecrypter in IFO mode.
Don't worry about extra chapters or cells at the end of the first DVD in each movie. Just rip' em all!

Step two: Encode all the DVDs separately
Use AutoGK. Force the resolution to be the same for all movies (I used fixed with = 720) and encode them all in one pass quality mode
with the same quality factor (I used 100 so I could reencode the joined trilogy with stronger compression later without losing quality).
Add all the subtitles you want (forced only or also others).
Select all the soundtracks you want but do not encode them to MP3! Keep them in AC3 and/or DTS.
Compress credits more, use XVid or DivX doesn't matter - do whatever you want.
You will of course end up with 6 files (2 per movie).

Now as anyone who messed with these movies knows, you cannot simply append the movies because there are a few "transition frames"
without audio after each half-movie, which will screw up your audio synchronization for the second part of the movie.
This is where the lazy attitude comes in!

Step three: Trim the movies
Open the first half of FOTR in VirtualDub.
My method relies on just a single checkbox: the "cut off audio when video stream ends" (found in streams -> interleaving). Keep that box checked!
Write down the length of the audio stream (it will be a little shorter than the video stream).
Go to that time in the file (CTRL+G) and set the end offset there or in the frame before it.
Go back to the beginning of the movie and set the start offset.
Make sure that "Direct stream copy" is checked and copy the trimmed movie to a new location - it takes only a few minutes.
Yes I know, you will lose a tiny fraction of a second of video. That's the price you have to pay!

Repeat with all the other files. You can trim the end credits of the first two movies while you're at it,
just make sure that you cut the movie before the audio stream ends for each file.

Step four: Join the files!
Open the first "trimmed" movie and append all the others. This is the reason you didn't encode the audio streams in MP3 VBR directly!
VirtualDubMod will not join two movies with MP3 VBR but complain that the audio bitrate is different...
Save the resulting huge avi file somewhere. That's it - the audio will be perfectly synchronized throughout the movies!

Step five (optional): Compress the final soundtrack
Open your huge trilogy file in VirtualDubMod.
Demux the audio stream you want to use.
Open that AC3 or DTS file in BeLight and transcode to MP3, Ogg, WMA... whatever you want!
Remux the resulting file with your video, and save the new avi.

Get coffee, popcorn and some friends and prepare for a looooooooong movie night!

I tried this with the 6channel English ACS soundtrack and it worked perfectly. I did NOT try it with DTS but I assume it would work just as well.
Once I had discovered this method, it only took me a couple of hours to rip the movies,
one night to encode them, then another couple of hours to join them.
48 hours after starting this project I was watching the trilogy from one file!

Question: is there any reason why one should not use this simple, fast method instead of the time-consuming vob-editing one?
The only downside I can think of is that you lose some (very few) frames... if that's blasphemy, I think it's worth it!

Hope this will be of some help! Comments welcome.

CWR03
12th October 2005, 06:22
Or rip them all, load them all into DGIndex and generate a single .d2v file, then encode as one video, but why would you want one 9 hour AVI? I can't imagine you can get any real quality unless it's sized to fill a dual-layer DVD-ROM.

MCSmarties
12th October 2005, 14:37
Or rip them all, load them all into DGIndex and generate a single .d2v file
From what I read in the forum, this causes problems with the subtitles?
Plus you would have to first identify and remove the "transition chapters/cells"
Could be that I got it wrong though. LOL
I'm not saying that my method is the best, just that for me it worked like a charm and was very fast to implement.

(...)but why would you want one 9 hour AVI? I can't imagine you can get any real quality unless it's sized to fill a dual-layer DVD-ROM.
I think you can get them all on one dual-layer DVD-ROM with decent quality (using MP3 soundtrack though).

However, in my case I am going to use it in a portable media player (4" screen, resolution 480 x 272) so once I was done with the encoding, I compressed it quite a bit more.
I will be taking a looong plane flight soon ;-)

jsquare
12th October 2005, 16:18
Why didn't you said that you were encoding for an portable device?
Your encoding resolution should match or be lower than that of your player is capable of, or you may run into problems. Also there's a limit to the size of an AVI file(2GB is the max) if using FAT32.
A simple calculation could give you the total size based on the desired quality and resolution.
If your films are 2.35:1@23.976fps then a resolution of 480x272 will be cropped to 480x208(2.31:1) by AutoGK, I would go lower to 448x192(2.33:1) to match as close as possible the original AR.

Now for the numbers so you can have an idea of MB per Minutes at an acceptable B/(P*F) of 0.200:

448x192x23.976x0.2=412,462+96000(Audio at 96K)~508Kbps
508/8x60~3.8MB/Min

So for around 3.8MB per minute you can fit roughly 9hrs of video on 2GB of space.

MCSmarties
12th October 2005, 16:51
jsquare: Thanks a lot for the info, it makes me feel more secure! That's pretty much what I ended up with.

I wrote this method to be more general. Just trying to be a :helpful:

What I really did was encode as above, then REENCODE my huge movie file with AutoGK at a fixed filzeise of 2000MB (to allow for some slack) and forced width of 480 pixels.
I ended up with a resolution of 480x208 as you predicted - yes I know, the aspect ratio didn't fit exactly but I wanted to get exactly the resolution supported by the device.

Of course this means I wasted a lot of time by first encoding to 100% quality at full resolution.
I just figured it might come in handy (such that I have a safe backup if I want to toy with resolutions and compression some more).

Plus I wasn't sure how precise AutoGK quality setting really is. If I had encoded each movie at say 50% and then joined,
would I have obtained exactly the same subjective "quality" for each chunk? (of course the individual file sizes would be different)

Edit: I'm not sure I understand all your calculations. I get the first equation resulting in approx. 508kbps, but

508/8x60~3.8MB/Min
Where does that 8x60 term come from? Should it be "movie length in minutes"?

jsquare
12th October 2005, 19:15
Where does that 8x60 term come from? Should it be "movie length in minutes"?
508Kbps/8(Bits to Bytes) x 60 seconds, to find the MB/Min so you can have a fixed size for AutoGK.
If you want a better control over your encodes then take a look at Gordian Knot, it may seem complicated but it's very powerfully for achieving great looking encodes, and it may help you decide over the dilemma of quality vs size vs resolution.
Which portable player do you own?
I mainly encode for my PocketPC and I get about 7hrs in a 1GB SD card, sacrificing audio down to 32Kbps mono.

MCSmarties
12th October 2005, 21:59
[QUOTE=jsquare]508Kbps/8(Bits to Bytes) x 60 seconds

Duh...! LOL Can't believe I overlooked that. Thanks!

I have used Gordian Knot in the past and still use it from time to time.
But AutoGK is so much more convenient!

Actually, I don't own a portable player *yet* but am absolutely positive I will get one before the end of the year.
I want to wait as long as possible before buying one, in the hope that more models will be released or that the price drops.

I am considering the following players, by preference:
1. Digital Cube V43 (my favorite - IF it becomes available in the "Western" world before Christmas
2. Cowon A2
3. Archos AV500 (now that DISH networks launched it rebranded as "PocketDISH" I wonder if I could get it cheaper than as a Archos unit)

So either way, I know it will be a screen with 480x272 resolution!
Hence I am preparing now by converting my DVD collection to XVid, target size approx. 4 - 5 MB per minute and fixed width of 480).

CWR03
12th October 2005, 22:13
I still don't understand why you'd even want or need them all in a single .avi. I hope you're using chapters, otherwise can you imagine what it'll be like having to stop and restart the media later and scan forward to find where you were?

m1ckran
12th October 2005, 23:34
Some time ago I successfully merged both parts of an EE LOTR film using a different method.

Step 1
Use DvdDecrypter to rip both parts of the film to their own disk folder.

Step 2
Use DvdShrink, with NO compression, to clip the end-credits from the first part and to clip the beginning from the second part, so that the film flows smoothly. With DvdShrink, I selected the stereo soundtrack and the main English subtitle stream. LOTR still picks up the Elvish subs from the main stream!

Step 3
Cut and paste part one's vobs to another folder and rename them, in sequence, to VTS_01_001, VTS_01_002, etc. Do the same with part two's vobs but rename them in sequence following those of part one.

Step 4
Run VobEdit and select VTS_01_001, then choose "join clips" from the menu. Make a cup of tea while VobEdit merges the vobs into a single vobset.

Step 5
Create IFO files using IfoEdit.

At that time, I used DvdShrink to compress to a DVD9 with no visual, soundtrack or subtitle problems. I would probably use something else nowadays.

You might prefer to demux everything to elemental streams and I can't be sure whether the a demuxer might find hidden problems with the component streams.

Might be interesting to try this out, if noone else already has.

m1ckran

jsquare
13th October 2005, 00:25
I am considering the following players, by preference:
1. Digital Cube V43 (my favorite - IF it becomes available in the "Western" world before Christmas
2. Cowon A2
3. Archos AV500 (now that DISH networks launched it rebranded as "PocketDISH" I wonder if I could get it cheaper than as a Archos unit)


Before you consider those Hard Drive based media players see if you can try one of the "7-"12 DVD/Divx players coming out since they'll probably have a better support for higher resolution/bitrates files, that way you don't have to encode twice(Home/Portable) and they're are also cheaper.
I have a friend that purchased the Archos AV500 with the same plans as yours and I encoded a couple of movies with AGK but the player refused to play them or will freeze in the middle of the movie, I tried both Xvid/Divx w/o luck. He returned the unit within a week since the lack of support from these companies is their biggest drawback aside for the big price tag of more than $400.

MCSmarties
13th October 2005, 14:53
I have a friend that purchased the Archos AV500 with the same plans as yours and I encoded a couple of movies with AGK but the player refused to play them or will freeze in the middle of the movie, I tried both Xvid/Divx w/o luck.
This is scary stuff, dude! Can you elaborate a bit more on what caused the problem?
In particular, do you recall what were exactly the encoding parameters used? Maybe QPel or GMC were switched on?

I know that the AV500 has much tighter codec requirements than the others, that's why it's on the bottom of my list.

I actually just emailed Archos with a codec question. I wonder what they'll answer...

jsquare
13th October 2005, 16:06
This is scary stuff, dude! Can you elaborate a bit more on what caused the problem?
In particular, do you recall what were exactly the encoding parameters used? Maybe QPel or GMC were switched on?

I know that the AV500 has much tighter codec requirements than the others, that's why it's on the bottom of my list.

I actually just emailed Archos with a codec question. I wonder what they'll answer...
No QPel or GMC, I think that it had to do more with the use of B-Frames just like the RCA Lyra that I also tested last christmas.
That's why I recomend if possible to try them first and see if they're compatible with your encodes.