Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
11th September 2002, 19:30 | #41 | Link |
XviD fan
Join Date: Jun 2002
Location: France
Posts: 907
|
i wouldn't be surprised at all if this filter is doing exactly what i described...
but it doesn't matter now. can you compare the filesizes ? can you try this filter for the playback of a bad compressed (with ugly blocks in dark scenes) source ? |
11th September 2002, 20:21 | #42 | Link | |
Registered User
Join Date: Jan 2002
Posts: 331
|
Quote:
I am really ecstatic about the results of this test comparing filesize/perceived video quality in dark scenes. Clip used... Opening of Rush Hour (2min 40s): Dark and clean video, should be a good test for viewing any noise produced by the codec in dark scenes. This is the structure of the AVS used: # Plugins LoadPlugin("C:\DOCUME~1\Desktop\DVDENC~1\Avisynth\mpeg2dec.dll") LoadPlugin("C:\DOCUME~1\Desktop\DVDENC~1\Avisynth\decomb.dll") LoadPlugin("C:\DOCUME~1\Desktop\DVDENC~1\Avisynth\ColorYUY2.dll") LoadPlugin("C:\DOCUME~1\Desktop\DVDENC~1\Avisynth\lanczos3.vdf") # # SOURCE mpeg2source("C:\Rush Hour\RushHour.d2v") # # IVTC Telecide(guide=1,post=false) Decimate(cycle=5) # # Filter ColorYUY2(Levels="TV->PC") # # CROPPING crop(5,57,712,367) # # RESIZING Lanczos3Resize(640,272) ------------------------------------------ Test: Used H.263 @ Quant 2 With ColorYUY2 filter - 47.3MB Without ColorYUY2 filter - 40.2MB Analysis: I believe that these are excellent results. Why? Because this is exactly what I wanted this filter to do. By adjusting the levels suited to the PC monitor, the filter demands higher bitrate in dark scenes. I have always believed that the pragmatic solution to blocking in dark scense is to give it more bits. At last, this filter does this. Of course the differences in visual quality is very small at such a low quantization. ------------------------------------------- Test 2: Used H.263 @ Quant 8 With ColorYUY2 filter - 8.94MB Without ColorYUY2 filter - 7.72MB Analysis: Once agains the filter is forcing the codec to give more bits to the dark scenes. The result? Even at quant 8, the ColorYUY2 filter is able to provide a relatively excellent picture in dark scenes. Without the filter, the blocks are prevailent in lots of dark shades. Furthermore, the picture of brighter scenes are not affected either!! This is the best part, it doesn't seem to damage the brighter scenes in favor of the dark ones. ------------------------------------------- Note: Since the respected Iago and I find this filter useful and the fact that it is hard to find, I will attach the filter here for others to experiment or begin using in their encodings. Satisfied and Exuberant, Dali |
|
11th September 2002, 21:39 | #43 | Link |
retired
Join Date: Jun 2002
Location: hollywood
Posts: 1,013
|
@Dali Lama and all,
I'm really glad that (after digging into the issues of lumi-masking and blockiness in dark areas again and again) we've finally reached a (temporary or maybe permanent ) solution regarding this matter, which imho is/was the most annoying problem for all kinds of rips. Though I haven't performed any 2-Pass/full-encode tests yet, the filter really gave the exact desired results in all my constant quantizer tests with the opening scenes of Matrix (up to quant 10 - with both MPEG and h.263 quantization types, and lumi-masking enabled or not). Currently, I've started a two-pass encode of Matrix using MPEG quantization and no lumi-masking. When finished I will report back my opininons and comments on the full rip results. As for compressibility, as far as I can comment based on my short tests, and parallel to Dali Lama's results, the filter seems to decrease compressibility by ~10-15; however, compared to its great job, this is no longer much of a problem I guess. Also, since the filter seems to work without causing any problems with h.263 and lumi masking too, as long as no trouble is encountered with these options, this decrease in compressibility may well be compensated by using these options as well. Here is a sample avisynth script: LoadPlugin("C:\filters\mpeg2dec.dll") LoadPlugin("C:\filters\colorYUY2.dll") LoadPlugin("C:\filters\SimpleResize.dll") mpeg2source("D:\MOVIE\MOVIE.d2v") crop(2,80,718,418) ColorYUY2(Levels="TV->PC") SimpleResize(640,272) BTW, in my tests with SimpleResize, the filter's speed was pretty good too, almost close to the no-filter speed. @Dali Lama, You can also apply the filter after cropping and before resizing to gain some extra speed, no? ciao, iago |
12th September 2002, 08:30 | #45 | Link |
Moderator
Join Date: Oct 2001
Location: Germany
Posts: 4,454
|
I don't want to sound stupid, but which colour scale did you choose when creating the d2v project file in dvd2avi?
Did you choose "TV sclae" and "colorspace: YUV"? Do you notice a difference when using different scales? (e.g., when selecting "PC scale" instead of "TV scale" compressability is ~10-15% worse.... reminds you of something? We back then choose the "TV scale" since it wasn't giving us bad artefacts... or was it vice versa?) *whistle* Regards, Koepi
__________________
Koepi's new media development site |
12th September 2002, 10:47 | #46 | Link |
Xvid Tribalistic Fan
Join Date: Oct 2001
Location: Portugal
Posts: 270
|
Right settings for d2v
I sound stupid...
I have been using pc scale and yuv colorspace . ..this is the correcT right? Glad to see u back Koepi (still #doom9 Efnet is missing u). All the best. Take Care Sharro |
12th September 2002, 12:31 | #47 | Link |
retired
Join Date: Jun 2002
Location: hollywood
Posts: 1,013
|
@Koepi
In dvd2avi I used the same old procedure to create the d2v file: "YUV Colorspace" and "PC Scale". Then I used the above script to encode Matrix (MPEG/MPEG-No Lumi). The result is really good in terms of blocks in dark (or maybe better to say blocks in black or almost-black) areas. I mean, they are all gone, as mentioned before. So the main problem (for me) is solved, though the average quantizer jumped up a bit. But, after reading your post, there comes the question: what happens (in terms of both compressibility and blockiness) when we choose "YUV Colorspace" and "TV Scale" to create the d2v file, which I have never tried so far actually (maybe the basic point I was/we were missing?)? Is that what you mean Koepi? (Sorry if I haven't got it clearly?) I'll do some tests with two different d2v files, both in YUV colorspace, but one "PC Scaled" and the other "TV Scaled", using constant quantizer mode (for example quant4). And I'll see how this affects compressibility and blockiness. Anything you want to suggest for further convincement? thanks, iago |
12th September 2002, 12:33 | #48 | Link |
Registered User
Join Date: Oct 2001
Location: were people always get wet feet
Posts: 328
|
Using the above avisynth script with colorYUV2 filter, how does it decrease encoding speed ?
Still suitable for average user on PIII@667MHz? And if you use Lanczos resize filter in addition? Speed issue? Thx.
__________________
I'm probably misconfused... |
12th September 2002, 12:43 | #50 | Link |
Registered User
Join Date: Oct 2001
Location: were people always get wet feet
Posts: 328
|
@iago
sorry pal, maybe to excited to read carefully before. thank you though so I address this exclusively to dali lama who obviously has worked with lanczos filter excessively : how does it affect speed ?
__________________
I'm probably misconfused... |
12th September 2002, 13:41 | #51 | Link |
Registered User
Join Date: Feb 2002
Location: uk
Posts: 157
|
Hi there.
I do all my computing though my tv (second hand sony trinitron 29 inch) using wireless keyboard and mouse as i like to lie around lazyly on my sofa! So everyone of my avs scripts ends with levels(5,1,255,0,255) I find this little tweak makes very little difference to the overall brightness of the xvid but does help to reduce the effect of the blocks in dark areas. I have always avoided lumi masking as it seemed that MORE bits were needed in dark parts of a film to correct this. This is such a vital topic for xvid, and i will eagerly monitor this thread. Good stuff! |
12th September 2002, 14:21 | #52 | Link | |
retired
Join Date: Jun 2002
Location: hollywood
Posts: 1,013
|
Quote:
Now, back to Koepi's questions on dvd2avi PC or TV scaling matter: After another session of testing, initiated by the doubt that Koepi has managed to let loose onto me (LOL! ), here are the results: Matrix (frames 0-3746) Koepi's 04092002-1 binary - constant quantizer 4 dvd2avi 1.76 - VirtualDub 1.4.10 fast recompress Compressibility: Matrix_Mpeg_Lumi_PCScale(original): 19822 kb Matrix_Mpeg_Lumi_TVScale(original): 19822 kb Matrix_Mpeg_Lumi_PCScale_colorYUY2: 22922 kb Matrix_Mpeg_Lumi_TVScale_colorYUY2: 22922 kb Visuals: No difference between the PC scaled and TV scaled original encodes: Both has the same annoying problem of ugly blocks all around in dark/black areas. No difference between the PC scaled and TV scaled colorYUY2 encodes: Both has pure clean black color in such areas and has excellently eliminated the problem . And some other results that could be useful (if read properly ): Matrix_Mpeg_NoLumi_PCScale_colorYUY2: 23692 kb Matrix_Mpeg_Lumi_PCScale_colorYUY2: 22922 kb Matrix_h.263_Lumi_PCScale_colorYUY2: 22846 kb Final comments: 1) Using PC Scale or TV Scale (YUV Colorspace) in dvd2avi has no influence on file size and quality (with or without colorYUY2). The results are absolutely the same. 2) colorYUY2 filter works with lumi masking and h.263 quantization without any problems, performing the same excellent job. So those who focus on "more" compressibility (which is quite understandable ) in addition to getting rid of ugly blocks in dark/black areas can use colorYUY2 with h.263 and lumi masking safely as well. kindest regards, iago |
|
12th September 2002, 14:31 | #53 | Link |
Moderator
Join Date: Oct 2001
Location: Germany
Posts: 4,454
|
Erm, the secret is not to use const quant... You won't notice a difference in "compressability" there. It's a matter where the YUV-ranges are cut. For TVscale, the scale is only from ~30-200, while pcscale should give all values from 0-255.
Strange that there is no visual difference... Maybe something to do with mpeg2dec.dll not respecting this value? I think those tests were done with dvd2avi 1.74 (or 1.76) and a "non tweaked" mpeg2dec.dll, sorry that I can't remember correctly (or was it even back in vfapi-times?). Regards, Koepi
__________________
Koepi's new media development site |
12th September 2002, 14:58 | #54 | Link |
Deputy
Join Date: Jan 2002
Location: Sthlm, Sweden
Posts: 1,451
|
Since the only difference in the *.d2v-file is YUVRGB_Scale=0 or YUVRGB_Scale=1 (in the beginning of the file) perhaps someone that's familiar with mpeg2dec.dll could verify that the .dll don't respect this value?
|
12th September 2002, 15:35 | #56 | Link |
Registered User
Join Date: Feb 2002
Location: uk
Posts: 157
|
Hi all.
I just tried colorYUY2 and from the preview window in vdub it just seemed to fiddle with the levels, probably something like levels(20,1,250,0,255) which made the whole video too dark for me. I've done lots of messing with levels, tweak and even deliberately oversaturating/increasing contrast on capture settings and my conclusion is you will always get blocky dark areas with low contrast/bright settings - thats why i compromise with levels(5,1,255,0,255) If your aim is maximum compressability then the bits have to be re-distributed from somewhere and lumi masking therefore has its place, but it seems to me that the default behaviour of xvid (and i assume all mpeg4 codecs) involves similar sorts of redistribution. Now i wonder if it would be possible to have an option in xvid that is the opposite of lumi masking - gives more bits to dark scenes/doesn't redistribute as many? Or just take from bright scenes only (mild lumi masking?) - although this could be a problem as i noticed that the 'white outs' in six feet under can look ugly sometimes! This option obviously would be for the 2-3 cd encoders and would probably bump up the quants on 1 cd encodes making things uglier. If this is nonsense i appologise in advance - and tell me where i have gone wrong with my ideas please! |
12th September 2002, 16:16 | #57 | Link |
XviD fan
Join Date: Jun 2002
Location: France
Posts: 907
|
Maybe i'm totally wrong, but i think you could :
- Have a clean black - Reduce Filesize - Keep overall quality in bright scenes all that in the meantime. i don't see why you couldn't.... i'll create a little C avisynth filter for test purpose, just to see if my theory is working. when i would have time EDIT : MPEG2Dec is using TV/PC scale. i saw it when i played with. Last edited by Marc FD; 12th September 2002 at 16:28. |
12th September 2002, 16:23 | #58 | Link | |
Deputy
Join Date: Jan 2002
Location: Sthlm, Sweden
Posts: 1,451
|
Quote:
|
|
12th September 2002, 16:38 | #59 | Link | |
Registered User
Join Date: Oct 2001
Location: Gainesville FL USA
Posts: 2,092
|
Quote:
- Tom |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|