PDA

View Full Version : Can someone teach me the 2- pass encoding process ?




rash_rp
11 Mar 2002, 11:20 PM
Hi !!!

RASH here. Few days ago I posted a message as so which was the best codec between 3.x 4.x and 5 ? A lot of people told me that DivX 4 and 5 were better than 3.x if the encoding was done using 2-pass. Well...I have never used 2-pass.

Can somebody be generous and tell me how all this 2-pass is done ( DETAIL INFORMATION ). I use XMPEG for encoding. Please tell me how all this is done. I'll be really greatful to anyone who does.

Well....I was just wondering....if DivX5 is giving a good improvement in speed. I am getting a whooping 35 FPS on my P4 1.7 under XMPEG ( 1-pass ) w/ DivX audio.

Enchanter
11 Mar 2002, 11:43 PM
Basically, you do the first pass and make sure that either the .log (DivX4/5) or .stats (DivX3) file is already specified. The process is roughly as long as it takes to encode the whole movie, though it's generally faster than the second pass somehow.

After the first pass has been done, you do the second pass. Make sure that no major settings have been changed (Deinterlace, crop & resize, smoothing, etc.) or else you will have to redo the first pass. Some may think that it's acceptable not to redo the first pass and in a way, it's a bit true. However, it remains a fact that optimum result won't be achieved that way, so keep that in mind. :)

p.s. Have you actually bothered to read the guides instead? There are heaps of them!

UncasMS
12 Mar 2002, 12:14 AM
and btw i object to saying divx5/4 are better than 3!

mpeg4 (ms v2 or divx3) with NANDUB is the most precise and reliable combo you could use for transcoding.

Enchanter
12 Mar 2002, 08:39 AM
I agree very much with you, Uncas. However, the sheer number of people preferring DivX4/5, compared to 3, is so overwhelming here that if I were to object to everyone of them, I would end up sounding like a child. :) Probably they just don't know how to configure Nandub correctly...

UncasMS
12 Mar 2002, 11:03 PM
i know well enough what the quality looks like i get out of using NANDUB + MS V2.

my impression is that ppl tend to use a new codec since they are not capable of handling the original well enough!

if one is not willing to spend some time becoming familiar with decent tools, going for the the next hype that hits the ground is quite normal. :angelgrn:

Enchanter
12 Mar 2002, 11:24 PM
Perhaps a guide should be written for 2-pass encoding that goes like this. Beginners should use DivX4/5 and once they have gotten used to it, move to DivX3 which offers better quality. :) I like the sound of that. :evilaugh:

tcb121
14 Mar 2002, 05:07 AM
I had previously encoded 8 movies with the Divx 3.11 codec using low motion and fast motion codecs, and the results were not near as nice as the 2-pass mode with the Divx 4.12 method. I'll give you the colors come out a littler sharper with the 3.11 codec, but not enough to be concerned with. Plus, the filesize of the 2-pass 4.12 turns out to be smaller then with the 3.11 two pass method. Even Nickys pages show that the 4.12 codec with 2 pass look every bit as good if not better then the 3.11 two pass using highest quality you want.

http://nickyguides.digital-digest.com/DivxBeta.htm

Its all in what you make of it. I'll stick to the 4.12 2-pass and reap the benifit of saving space and getting equal or better quality then the old 3.11 method. I know from encoding my own movies that using Flask or XMPEG with the 4.12 2-pass method that it is possible to make equal or superior quality movies vs the nandub 3.11 two pass method. Keep up the good work guys, and thanks for reading my two cents on this.

UncasMS
14 Mar 2002, 07:53 AM
nickys guides are quite good but way out of date when it comes to 2pass encoding!

i had not spent hours on writing a decent nandub guide if i had been satisfied with an existing one (be it nickys or doom9's- i disagree with both)

i can tell you nandub + ms v2 is much more precise than divx4 or 5.

divx4 and 5 are blurry compared to divx3 or better the original ms v2 and the final output size with ms-v2/divx3 is MUCH better!!!

but all in all i dont give a damn to what those guides try to tell me, i know what my results are.

Enchanter
14 Mar 2002, 08:52 AM
If you want to so chastise 3.11, then you should have done your comparison between 3.11 2-pass and 4.x 2-pass. Everyone knows that 2-pass mode is always more superior than 1-pass. I would of course prefer 4.12 2-pass to 3.11 1-pass when using Flask. However, I have done direct comparisons between Nandub results (3.11) and Virtualdub results (4.12). I always ended up discarding the resulting files of the latter method. It is noticably different as I previously mentioned.

tcb121
15 Mar 2002, 01:10 AM
I agree with you to a point, but I can argue either side. I have made two pass 3.11 with Nandub, but the file sizes to get the quality you must span over two CD's. I can also make a 2-pass with 4.12 at very high quality and span over two CD's, and the results look the same to me as the 3.11 2-pass with Nandub. I think both deliver GREAT quality and the 3.11 codec is a fine codec, and even better in some regards, but its like splitting hairs between the two. I have also done side by side comparisons with 4.12 and 3.11 and both look GREAT! I prefer the 4.12 with Flask because its more hands free. The only difference I see with the 3.11 codec is the colors come out slightly brighter, but thats it. Playback is the same, quality is the same. I'm not trying to down the 3.11 codec, but I don't think its worthy of significant praise over the 4.12. Most people will be more then content with the quality the 2-pass 4.12 with flask yields. I just don't see the grand difference that 3.11 has over 4.12. I would however like to know what it is that I'm missing? What does the 3.11 with 2-pass do to warrent such praise over the 4.12? Are the action scenes cleaner?, is playback smoother?, Is the filesize smaller then the 4.12 at EQUAL quality settings? Or are we just splitting hairs?

UncasMS
15 Mar 2002, 07:43 AM
how close to you get to your desired final output filesize with divx4?

have you compared sharpness in both 2cd rips?

Enchanter
15 Mar 2002, 08:38 AM
As to why I prefer 3.11, it is of course a subjective matter. I have listed all the reasons above. Another reason is because Nandub offers more quality control than 4.x's bare configuration does. There is no beating the gauge settings, high/low-pass and many others.

I had a problem with 4.x once where a scene in an action part could not get enough bits and hence lots of macroblocks on particular areas. It does not matter that both the 3.11 and 4.x results had identical filesize. I could not find any settings with which I can tell the codec to assign more bits to that action scene (Such as the curve compression settings). Now, that's what I meant by quality control.

tcb121
16 Mar 2002, 12:47 AM
I guess for the most part all of my movies have turned out GREAT, and I have had no reason to add more steps to the encoding process using Nandub. Just yesterday I encoded Mission Impossible 2 which has tons of action throughout. ( Car chases, things exploding, lots of high speed shooting etc ) The Movie is 123 minutes long and I wanted to Span it on to two CD's. From my experiance I don't even need to use a bitrate calculator, once you do so many you just kinda get a feel for the bitrate as I'm sure you guys do as well. I encoded it at 1300 and it turned out GREAT. The high speed scenes are awesome and play perfect, so I can't complain. To answer another question, I have looked at sharpness over my 2 CD rips with both methods, and like I have stated before, the only difference I see is that the 3.11 has ever so slightly better color. I'll give you a specific example. In the movie Topgun the pink sweater that Kelly McGillis has on in the bar scene is slightly more pink in the 3.11 rip than the 4.12 rip. However sharpness and playback quality are the same. I guess I'm looking for some specific examples of movies you guys have done and what your experiances have been. Making Divx movies are trial and error sometimes, and I'm sure you guys have played around with different settings and have had better success with some then others. My point that I am trying to make is that 4.12 using flask yields favorable results to any other method out there and that even the mighty 3.11 with Nandub and MS V2 only yield a minor difference in quality. Everyone can have their own oppionion, but these are my findings. What types of movies are you encoding?? Are they PAL vs NTSC or what? All of my movies to date are NTCS progressive, so using my method my be more suited to an american point of view. Maybe Nandub yields a significant difference with a PAL movie or interlaced movies, but I just don't see any real difference with the NTSC progressive ones that I have encoded. Thanks for your replys back. I'll have to look more into Nandub in the future when I have more time to tinker with the settings some more. For now, Flask is an easy way for me to backup my movies and its a solution that delivers GREAT results for me. Keep up the GREAT posts on this fourm, UncasMS and Enchanter, you guys are very helpful from what I have read of your posts, and I know that everyone has learned a great deal from the two of you.

Enchanter
16 Mar 2002, 09:28 AM
Glad for the compliments. Hope that you would one day join us in the Nandub wagon though. :angelgrn:

gerbilhamster
17 Mar 2002, 07:27 PM
I'm also trying to do two pass but I don't know how to create the divx.log to enable me to do a second pass - I'm using DivX5.0 Pro.

Please help.

Enchanter
17 Mar 2002, 07:33 PM
I've not personally done any encodings with DivX5.0, but from the looks of it, it should work in a similar way to DivX4.

Try this guide for DivX4.0. It should get you started:

http://nickyguides.digital-digest.com/DivxBeta.htm

techno
17 Mar 2002, 08:25 PM
You should REALLY stick to DIVX 3.11alpha and do a 2pass. It is simple when using Nandub to do this. Just follow the footsteps of the great UnCasMS and Enchanter

Techno

IztokT
18 Mar 2002, 10:10 PM
I really don't know what setting you guys are using in DivX 4.12 through VirtualDub or DivX 3.11 through NanDub, but I never get as good quality as I saw on some recorded CD movies.

I tried 2-pass encoding with 4.12 and 3.11 DivX default settings, but even on 2CDs I don't get as sharp movie (playing full screan) as movie for 1CD downloaded from internet.

Do you use also any filters (I tried "smart smooth")?
Do you change settings for every movies individualy? This is not an option for me because I don't have time to spend 2 days just to figure out the best settings. There must be some good general settings to satisfied all king of movies.

OR THERE IS ANOTHER PROBLEM.
Maybe the difference comes from the source for encoding. How important is the DVD source? I have only tried to encode movies I have captured with my WinTV capture card with 384x288@25 PAL resolution using Morgan MPEG codec at 90% quality for realtime compression.

Thanks

Enchanter
18 Mar 2002, 11:20 PM
How important is the DVD source?

I would say yes. Very much.

I had one set of series, which were very easily encoded at 640x480. Very crisp-looking image and hardly any macroblocks. Another set is simply a bitch to encode, as even at 512x384, I still get macroblocks. The filesize of each episode from both series were ensured to be as close to each other as possible.

techno
19 Mar 2002, 12:48 AM
Enchanter, I have discovered something last night, to hard to believe but send me a private message. It may help you.

Techno

tcb121
19 Mar 2002, 02:46 AM
Ok, here is my quick and simple guide for High Quality rips using the 2-pass Divx 4.12 codec. Here is the software you will need.

CladDVD - This is used to rip the DVD to the Hard Drive.
Flask 060 Preview Editon - Used to Encode the Movie
Flaskv6_preview1_1 - Needs to be installed in addition to Flask 06
Thunder DVD mism - Also needs to be installed in flask
Radium MP3 Codec - Used for audio compression
Divx 4.12 Codec - Used for Video compression
BS Player - Used to play back divx movies.
Divx 3&4 Bitrate Calculator - Used to help gauge bitrate to use.


First step.

Use CladDVD to rip the DVD to the hard drive. Be sure to rip all of the IFO and VOB files off of the DVD.

Now that you have all of the files you need on the Hard Drive, open up flask and click File --> Open

From the <files of type> choose the thunder ifo option, and then select the cooresponding ifo file for your movie. You will know if you have selected the proper one because of the length that will appear on the next screen that will popup. From here you should see the IFO file, and the language file highlighted in blue. If you would like you can also select subtitles at this point. Next, click on Flask this DVD.
Now another screen will popup and you will have options on the right.

Click on the Audio Player button. The movie "sound" will start playing, listen to make sure it is in the correct language. If you would like you can use the dynamic range compression to raise the volume level of the audio. I usually do this and move it to the middle somewhere to give my audio a boost. Keep everything else the same and select OK.

Now comes the fun part. Click on Configure button.

You will see a Video, Audio, Post processing, Files and General tabs.

On the Video tab, make sure the time base FPS is the same as the detected FPS of the movie. Detected FPS shows up on the main window with the "Audio player button, Configure button etc". For NTSC it is usually 23.976. Now if your from the United States, 99.99% of all DVD movies will be Progressive, so its a safe bet to select "reconstruct progressive images". Some movies will have an "interlaced intro screen, but the actual movie is progressive". The movie Men In Black is one such movie that will detect interlaced at the beginning, but in reality the movie is still progressive. So stick with progressive. Next, pick the IDCT that you will use. I use the MMX, but you can choose anyone that works best for you.

Audio Tab - Just leave it alone. You should see Decode Audio, and same as input.

Post Processing - I'm not going to go into great detail about this, but bacisally this window will allow you to resize and crop your video. I usually size my movies at 512 * 384 if they are 4:3... Anyway, you will figure out what works best for you. There are many guides on how to resize using flask.

Files - Here you will pick the directory and name of the movie you are about to create. C:\divx\movies\topgun.avi

General - just leave all of the defualts and click SAVE.

After clicking Save, click OK and it will take you back to the main screen.

Now hit the "Select Output" button, and make sure AVI is selected.
Next click on "Select Output" agian, and go to the configure output module.

From here you will see the Video and Audio codec buttons. Click on the Video. Choose the 4.12 Divx codec, and click configure.

Here is the easy part.
Under the Variable Bitrate part, choose 2-pass, first pass
Performance/Quality = Slowest
Output Video Bitstream at : If movie is under 100 Mins and you want to fit movie onto one CD, use:
850 = 100 min movie 1 CD
860 = 99 min movie 1 CD
870 = 98 min movie 1 cd
880 = 97 min movie 1 cd

You get the picture here...

Maximum Keyframe interval = leave at 300
Check on the Max CPU Usage = Optional
Default postprocessing level = just leave it alone it doesn't matter
Max Quantizer = 12
Min Quantizer = 2
Rate Control's = leave all set to defaults
Quality based encoding = only used if we were doing 1 pass, so don't worry about it.
For the log file, hit select and go to a directory where you want the movie to be. Then type in a generic name and click save. Example = C:\divx\movies\topgunlog.log
You don't have to give it the .log extension, it will do this on its own.
Keep the frame dropping set to 0% and then click ok.

Now select your audio codec. I use the MP3 at 128 Kbits, and select OK again.

Thats it. Now just OK all the way out to the main screen, and hit the FLASK IT button. In about 4 - 6 hours depending on your processor and length of the movie, you will have a log file and an unplayable AVI file. After this process is finished, exit out and reboot your PC.
After the reboot, open up flask and the same IFO file as before, and make sure all of your configurations are the same as they were when you did the first pass. Then select the Divx 4.12 codec again, and just click on the 2-pass, second pass this time and make sure all the rest of the settings have not changed. Also make sure that under the log, the correct log that you created is selected. Ok out, and set your audio Codec again. Ok the rest of the way out, and hit FLASK IT. This time it will tell you its about to overwrite a file, just say yes. In about 4 - 6 hours your movie will be done and ready to burn on one CD. :) I know this isn't very detialed, but I hope this helps point you in the right direction.

techno
19 Mar 2002, 02:49 AM
Nice 1! But I still prefere DIVX 3.11alpha.

I would happily use DIVX 4 and 5 IF, and Only IF, the file size was smaller and the quality is better!

But, the guide u have done, greatly appreciated!

:)

Techno

tcb121
19 Mar 2002, 01:17 PM
Thanks Techno. You guys on here are GREAT. I have learned a lot by reading your posts. I used the 3.11 one pass when it first came out and had pretty good results back then. Now with the two pass codecs and the nandub with the 3.11 two pass, quality has been AWESOME! I have tried just about every way to encode. I have used MPG2AVI, Flask, Virtual dub, Nandub two pass, XMPEG...etc.. I'm really impressed with the quality of divx. You guys who know all the settings for the Nandub method are GREAT. I'm more of a "simple works for me" kinda guy. I have been using Flask a lot recently and just found a comfort zone with it. My movies come out pretty good for the most part. I have had a few that I have had to do twice to get right, but not many. Keep up the GREAT work on helping people out on the boards, and I'll try to do my part and help when I can. I'm sure that I'll end up with a question or two along the way as well.

techno
19 Mar 2002, 05:31 PM
Not a problem TCB121, we also learn something new everyday!
:)

Take care

Techno

Let your future DIVX encoding be artifact free!! :D