Log in

View Full Version : Some divx hints and other shtuff


fedge
3rd July 2003, 16:29
After playing around with other encoders, im finding that divx is my best choice, for the time being. Xvid is a little itimidating, especially since i read that some releases of the codec will not decode some movies encoded in other releases(thats just too much of a hassle to deal with-ill just wait till the finialized version (standard) comes out).

So here's what ive found through trial and error, hopefully this will be of a help to others who may be struggling to make encoded vids also.

number one.
Use Gordian Knot to do the resizing (and if you no a script writter create the avs file for frame serving in gordian knot also). It does a wysiwyg and is one of the best ways to make a good judge of what the finial size will be like and also I find its fairly accurate at guessing the required bitrate.

as a side note

Bitrate seems to be about 90-99 percent accurate most of the time for the most part in the gordian knots calculator. But one thing to REALLY pay attention to is to make sure you encode your audio trak before you finilz your bitrate for the encoding. This is becuase sometimes the estimations can be different for the audio track than what will really be true,(if a VBR is used especially) those extra 10 mb that the estimation could be off could really be useful to making a little more bitrate flow into the video size(squeeze every last mb out of those cdr's). Ive found though that dark movies, lots of black or near black colors in the movie, can have a little less bitrate than what is required(if psycovisual enhacement is set to maximum) BUT this can have a detrimental effect of low quality scenes that are well lit or fast action(cars moving up the viewpoint or people in the mid-background static or moving) The best thing to do is to decide if you really want a two disk encode or a one disk encode (most movies that are aroun 80-100 min will fit well on one cdrom... anything above 120 usually will need two disks to look decent(minimal artifacts) Blurry material (i.e. old movies from the 30,40's, 50's etc) may be one disc (lower bitrate) without much loss especially if they are black and white. Color is a bad boy it needs lots of bits to feed it (remeber black and white, they acutally are still red green blue but just nuetral tones of those three colors, dont flux as much as color so they tend to take less bitrate to look equally as good as a full color movie) The best way to KNOW how well the movie will look at the settings you choose is to test and test and test. <continued>

fedge
3rd July 2003, 16:53
ok now onto what i find to be a good help.

After I make my avs i open virtua dub(mod version) and then select about 5-10 mins of the movie. I open up notepad, since virtadubs job control will erase the settings usually, cause it unloads what ever movie you just opened to do the jobcontrol function and loading a new movie will erase your settings, and copy the frame or milisecond offsets that were set by selecting the cut of the file. this is important to do so that if your forgetful, or need to calculate somethign else its helpful to refrence from earlier test data. After doing either single or dual passes, both in divx 5 seem to produce an accurate representation of what the finial size will be(more on that later). look at the exact times in milliseconds and open you calcualtor program(nothing fancy here were doing a fraction equaltion here)

this is what to do next

time of movie you encoded (size of movie(mb)you just encod)
------------------------- = ---------------------------------
total time of the movie the value you will find
that you want to encode should closely match the
size estimate in gordian knot

This is a very simple equation and virtau dub uses the exact same thing to estimate the final size of a movie when encoding it (although as anyone know s who has actually sat and watched virta dub go to work for three hours, that the size will be inaccurate)... but that is why you should try to choose a section of the film that is a mix(in relation to the way the whole movie is) of action, still shots, moving camera shots, and darkness, etc

Ive had about 98% accuracy this way, sometimes a second pass will shrink down an oversized file a bit but not always.

(babble babble babble i know i talk too much sometimes almost done for now)

Set two ( heres the important shit to get good quality and color accuracy--for me anyway)

I use virta dub(mod) to encode(wish there were a few options to safe guard from crashs but ill put that in at the end)

I almost always now , apply a levels filter to the incoming video, I set the mid value to about 1.33-1.17 instead of 1.00 this can enhance dark sections of a movie (showing more detail in the final product) and give a little bit more true colors in the daylight scenes. SOMETIMES and believe it or not the encoding is not slowed down noticably by this (WOW!!!!) So it is well worth the ten second effort to test it out.

Now i set up my encode for first pass(i always do two passes, it almost always will improve Q of some part of the movie;s encoding)
I put in the bitrate, adding maybe a little if i think the video could use it or i plan to cut off the credits ( a little means about 10-25 over what gordian knot says, sometimes more depending how the credits looks(words or words and graphics) and how long they are, its all guestimation so i have no hard words on how to do it. The best way to get an idea in your head of how much lets say 5 mb of movie may be if you cut it off is to play with the file size of the mp3 you are putting in.. or convert the frames of the movie you are not going to encod to seconds and subtract from the value so that the new bitrate will show. ( since none of these values are really hard stone set, its really all up to you)

I set it to save the log file and i set motion search to about 20-25%... setting the motion search to that will make less I frames... my computer has a hard time dealling with a lot of iframes in some movies(ive made bad encodes that will jitter like crazy) and less iframes leaves more space for a better encode, the only thing is sometimes you get, what i call, half frame jitters< this is something that is really noticable in flash movies where the redraw of the screen isnt fast enough and a half frame is shown before the next full one is started. its not as annoying as dropped frames though. and may be becuasae of my video card alone (so you can ignore this part or try it to see what happens) Also, sometimes some scenes can be a "little" blurry.. some details are lost. But in some cases this can be GOOD, and make the movie look better.

Then i set up my second pass and save the file to the job que.

and were done.

Now heres my bitch though

fedge
3rd July 2003, 16:59
Why cant i save the log file that is created by divx..

there should and NEEDS To be a feature to save a copy of the log file that is created by divx before going onto the second pass (especially when you want to do unattended encoding)

I know i cant make it not write to the log file, but if you want to do a third pass(which i sometimes do, but rarely) its nice to have the refined data in teh second to make it worthwhile

I have on occations lost the first pass data becuase of a freeze up of the computer or lock or crash.. which really really sucks...

len0x
3rd July 2003, 18:30
I was trying to understand just one thing when reading previous posts - why don't just use a proper comp test (like in Enc or GK) to do all decribed above and not bother with manual vdubmod operations...

p.s. size was never a problem with divx5 (at least oversize)...

p.p.s. I diagree completely that old B&W movies compress well. I was never be able to fit it on juts one CD with acceptable quality...

SeeMoreDigital
3rd July 2003, 23:00
Hi fedge and welcome.

There's no doubt that DivX is good and it's getting better. However there are a few other codecs that are barking at it's heals, with regard to, image quality per MB.

M$ very own WME9 encoders in both it's variants (creating .wmv and .avi files), in my opinion produce better quality, sharper foreground and background, images.

However, the DivX encoder is very quick at encoding (which may be it's weakness), easy to use, and offers a fair bit of flexibility.

fedge
6th July 2003, 01:53
Originally posted by len0x
I was trying to understand just one thing when reading previous posts - why don't just use a proper comp test (like in Enc or GK) to do all decribed above and not bother with manual vdubmod operations...

p.s. size was never a problem with divx5 (at least oversize)...

p.p.s. I diagree completely that old B&W movies compress well. I was never be able to fit it on juts one CD with acceptable quality...

to the first part...

maybe i didnt mention (i did write a lot of info and pry forgot some of it)
I like to SEE what the end will look like and how it will play in comparison to the orginal source. So i can look for problem areas etc and things that a higher bitrate may fix(detail loss)
and GK? that gordian knot.. i do use it as a baseline

sometimes size is not always what is predicted by any calc prog.. a third and fourth pass will sometimes yeild smaller files

And the two black and white films i made were poor dvd quality to begin with. one was about 85 min and had a lot of grain (as part of the artists thought for the movie (the movie "PI") the second was rebecca-1940;s film... and it had a lot of bad copied frames that the loss of quality gave more leniency to the divx codec to shrink the 2hr movie to one cdr.

len0x
10th July 2003, 17:52
Originally posted by fedge
sometimes size is not always what is predicted by any calc prog.. a third and fourth pass will sometimes yeild smaller files


Hm... I do 4 passes encodes now and max undersize I get is 1M for 1400Mb movie... (which is nothing)

Originally posted by fedge

And the two black and white films i made were poor dvd quality to begin with. one was about 85 min and had a lot of grain (as part of the artists thought for the movie (the movie "PI") the second was rebecca-1940;s film... and it had a lot of bad copied frames that the loss of quality gave more leniency to the divx codec to shrink the 2hr movie to one cdr.

Well, that grain and poor quality is a problem - that's why when you compress in on one CD grain becomes heavy artifacts. And that's why 2 CDs are often not enough to deal with that. Heavy filters should be used in this case (If anyone knows particular good settings to restore poor b&w old movies I'd be grateful).