Log in

View Full Version : 5.01 Pro and Cropping


Frave
28th April 2002, 15:25
I'm using the 'old" VFAPI/VirtualDub method and cropping gives weird results e.g. with more cropping to wipe the black out I get lower quality and larger file sizes. Must I really use Gordian Knot and its feature "smart cropping" or can I continue to use my favourite method
and crop with the codec itself instead of VD?

skipper152
29th April 2002, 17:33
You shouldn't have to use Gordian Knot and the smartcrop feature, however, it may make it easier to determine the size/crop to enter in the codec. I use Gordian this way sometimes.

However, some more information might be better, so I can understand a little about how you are doing things; such as which codec are you using (since you want to resize in the codec) divx 5.0, 5.01. What is your input resolution and final output resolution? Bitrate, length of movie, trying to put the movie on 1 cd, 2 cd, etc. What filesize are you aiming for?

Been a while since I used the VFAPI method, so my guess would be, with the given information, that you might be trying a large output resolution, possibly not at a h-mod & w-mod of 16 and not giving enough bitrate?

Don't know if my guesses will help.

skipper

theReal
30th April 2002, 03:01
Gordian Knot uses avisynth for cropping - I have used avisynth as well as VirtualDub for cropping avi on conversion to Divx 5 and never experienced any problems (except when, at the beginning, I did not set my output resolution to H:16 W:16).

Cropping from within the codec was buggy in 5.00, I dunno bout 5.01

Frave
30th April 2002, 11:46
I have never experienced this earlier, after appr encoding 20 films
with VFAPI/VirtualDib 1.4.10 and the 5.01 Pro Codec. In this particular case I encoded "2010: The Year We Made Contact" and made as usual a test file to see what my settings should be for 1 or 2 cds. The resolution looked a bit funny as 16:9 but it definitely should be 4:3. I had to crop (wt VD) Y1=130! and Y2=120! to get the black out. First test file looked real bad e.g. swift actions and changes of camera were blurry. After I changed to Y1=50 and Y2=50
things looked much better and kept improving after no cropping and
then no resizing at all. The other thing while testing that flabbergasted me was the less I cropped or resized the smaller my file size. In all these cases I used 2PassEnc and started with 576X432 but even tried 576X304. The info file reads PAL 720X576
AR4:3 and is 1:50:54 long.

skipper152
30th April 2002, 15:45
OK, I'll take a stab at this one!

If 2010 is anything like 2001 (don't remember 2010 that well), then the movie is very compressible. 2001 came out to be about 85% when I did it, as it is very slow and very dark movie for the most part.
Now with this, there would be no need to increase the bitrate for a better picture, since the codec is doing the best it can with the given bitrate.
However, by changing the y1 and y2 to a lower value, it gave a larger picture area, so if you you are watching the movie full screen, the picture would not have to be stretched as much to fill the screen and would seem to give you a better picture quality.

Now for the filesize. Since you have lowered the y1 and y2, there is a black border there. The black border does not change from one frame to the next, and if I remember correctly, divx encodes the differences from the keyframe to the next frame until the next keyframe is detected. Hence there would be no differences and nothing to encode.
But you are using the macroblocks for the black area and not the actual movie (not that there is anything really wrong with this, just wasting filesize on pixels that are unimportant). Hence a smaller file.

Since I haven't read what bitrate you are using (maybe I missed it), but you may want to try cropping the movie to get rid of the black borders, but increase the bitrate to get a better picture. This may not work however if the codec is doing the best it can (as with 2001).
If the codec is not doing its best, this will probably give you a larger filesize.

I hope someone will explain to me if I am wrong?

Thanks

theReal
30th April 2002, 17:54
skipper152, as far as I understood Frave he knows very well how and why to crop, but he's having a really weird non-standard problem here.

Maybe the DVD is non-anamorphic 16:9 PAL, which some few DVDs are. But really, I don't have a clue what you could do about it...

Frave
30th April 2002, 17:54
I can see your point in the first paragraph if I correctly understand that cropping will make the picture stretch more and therefore causes lower quality. Your 2nd par. "hence a smaller file" one would expect so but quite the contrary. I varied output bitrates between 780 and 1500 and while on full crop that did not improve the low quality.
Only not using the filter for resizing and cropping did
I've done 2001 as well and you are exactly right, no need to for high
bitrates, while 2010 is even darker (and maybe slower). My biggest question really is when it was all so perfectly clear with 4.11 & 4.12 in terms of resizing and cropping in some cases it is a bit
queer with the 5.01 Pro. So I like to know what are the changes.

skipper152
30th April 2002, 19:05
skipper152, as far as I understood Frave he knows very well how and why to crop, but he's having a really weird non-standard problem here.
I kind of got the impression that Frave knows what he is doing (probably more than me :D) after 20 films, but some folks just do what they read or are told without knowing why they need to do it. I've done about 20-30 films, but I still consider myself a newbie.

Back to the problem (by the way, I have only done NTSC videos).
I see you are using the pro version of divx; could the B-Frames and/or GMC be causing a problem if you are using them? If you aren't, maybe you could give them a try? Probably some stuff you have already done....

OK, I can understand that 2010 is very compressible and throwing more bits at it isn't going to help. I've only used the codec crop/resize in 2 movies now, and I haven't noticed any problems, but maybe there is a problem in the codec functions (I am not that critical).

I was thinking that if you just cut out the borders and left the movie at 720 x XXX, that you could use more bitrate to get the same quality of video (bits/pixel). Since you would not use the resize, just the crop, it might say which is the problem (if there is one). This would just be for a test (say a 10min clip) and see what it looks like.

Just pulling at some straws here....

Frave
30th April 2002, 23:04
TheReal's reply of "Maybe the DVD is non-anamorphic 16:9 PAL, which some few DVDs are" was something I haven't stumbled in yet but could well be the problem with this particular film, as per my first intuition. However, is there a solution and why does the 5.01 react so strangely to this phenomenom, would the 4.12 give the same outcome. Something I owe you to check out and let you know.
Same as Skipper152 advice to skip the resize and just crop to see what is the problem.
All and all something definitely to be continued.

skipper152
1st May 2002, 11:13
Frave, I'm not sure if you tried some of these, but here are some links (since it's been slow at work, I've been doing a lot of reading on the forums).

http://www.everwicked.com/forums/showthread.php?threadid=709&perpage=15&highlight=bicubic%20resizing&pagenumber=2

Seems that on the above one there is no standard for sharp bicubic resizing; just wondering if the divx codec changed the "standard" for the others too. Would be interesting, as I believe you said, to try another method of resizing.

http://forum.doom9.org/showthread.php?s=&threadid=14344&highlight=PAL+AND+deinterlace

http://www.everwicked.com/forums/showthread.php?threadid=796&highlight=deinterlace

Can't say that I fully understand them, but it might help out. Seems some folks are getting PAL Interlaced movies which seem to be quite rare.

Hey, if you have, some good reading material anyway :D

Not that I'll probably ever see this since I don't use PAL, but it would be interesting to see if this was the answer.

Good Luck!

skipper

Frave
2nd May 2002, 10:23
Well, I've done a bit of testing with 5 mins clips and preliminary
cropping seems to be the problem in this case. It doesn't make a hack of a difference wether you crop (and resize) with the codec or the filter in VD, In all cases bad quality. It's 100% a 4:3 (or 16:9 if you want Roy Scheider to look like Orson Welles). Deinterlacing did not make a difference but thanks Skipper152 for your input nor does
low or high output bitrates. I guess it's just simply a matter of
encoding without any resizing and/or cropping. At least that results
in a quality clip at 738 MB excl audio, count your blessings and burn the flaming bastard. I wonder if someone did a stinking job when this was released on DVD in Europe. :angry: