Quantcast Removing Dcts in the Source - digitalFAQ.com Forums [Archives]
  #1  
08-04-2003, 05:35 PM
vmesquita vmesquita is offline
Invalid Email / Banned / Spammer
 
Join Date: May 2003
Posts: 3,726
Thanks: 0
Thanked 0 Times in 0 Posts
Hello everyone,

I am trying to get rid or at least reduce the DCT blocks in my DivX sources. I am doing KDVD conversions. Looks like the only big problem of a good DivX source (2 CDs). I have thought of two ways to solve this:

1-Filter the DCTs and add blockbuster noise. I have tried this approach with the following script:
BlindPP()
MergeChroma(blur(1.5)
MergeLuma(blur(0.05))
Convolution3D(preset="movieLQ")
BlockBuster(method="noise", variance=1, seed=1 )
GripCrop(720, 480, overscan=1, source_anamorphic=false,dest_anamorphic=false)
GripSize(resizer="BicubicResize")
undot()
GripBorders()

I found this script somewhere in this forum. The DCTs got a little less noticiable, but not enough to me.

2-To the second approach I thought is why DCT blocks are placed? Seems to me that this happens because the encoder thinks that the area of the DCT block is dark, so we won't see it anyway. And this is true in the computer monitor, but TV has a lot more brightness and contrast and... The DCTs get very noticeable. This is so true, that when in the morning I open the window and watch my movies, the DCTs block seem to be gone... But at night, specially if the lights are off and just the TV is on, the become visible everywhere. It also depends on the TV, my father's old sanyo 29' non-flat TV shows a LOT less DCTs than my own Sony Wega 29'. So if we could make the dark areas darker, but keeping the bright ones bright, maybe this could be solved, without killing compressibility. But how can I do this, I have no idea... But I really want to try this out, anyone knows how? Or has a better idea to solve this?
I know the information from the area is gone forever, but maybe it could be masked someway...

[]'s
Vmesquita
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Site Staff / Ad Manager
 
Join Date: Dec 2002
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
  #2  
08-05-2003, 08:04 AM
girv girv is offline
Free Member
 
Join Date: Sep 2002
Posts: 108
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to girv
@vmesquita you might like to try this snippet to process divx/xvid sources. Add AVISource and resize lines as required.

Code:
...

Blockbuster(method="noise",detail_min=1,detail_max=8,variance=0.3,seed=5823) 
ATC(1,2,4,0.5,false)
TemporalSoften(2,7,7,3,2)
ASharp(1,3)
Blockbuster(method="noise",detail_min=1,detail_max=10,variance=0.5,seed=5823) 

// resize here

...
Reply With Quote
  #3  
08-05-2003, 09:06 AM
vmesquita vmesquita is offline
Invalid Email / Banned / Spammer
 
Join Date: May 2003
Posts: 3,726
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks, girv!

I'll try that and post the results.

[]'s
Vmesquita
Reply With Quote
  #4  
08-05-2003, 09:17 AM
girv girv is offline
Free Member
 
Join Date: Sep 2002
Posts: 108
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to girv
Depending on your sources, you might get better results with
the following tweaks:

Change ATC to ATC(2,3,4,0.5,false)
...or...
Change ATC to ATC(2,3,5,0.5,false)
...and/or...
Change ASharp to ASharp(2,3)

Also I've found that using Kwag's motion adaptive stuff with
divx sources causes excessive softening of the picture, to my
eyes at least. I avoid it myself but give it a try if you like.
Reply With Quote
  #5  
08-05-2003, 05:46 PM
vmesquita vmesquita is offline
Invalid Email / Banned / Spammer
 
Join Date: May 2003
Posts: 3,726
Thanks: 0
Thanked 0 Times in 0 Posts
I just tested with my worst case scenario (Panic Room, a DivX 3.11 1-CD rip) and it did improve the DCTs. Some were masked by noise, and some became static and stopped dancing, which I consider the most annoyng effet. The movie also got a lot more sharper (seems that DivX encoding tend to soft things).

Seems to me that if I did a good quality 2 CD rip, probably it would get near perfect! I'll test again as soom as possible using a 2 CD rip and post the results. I have to mention that this filter combination is also very fast. Using just BlindPP() CCE gives me the speed of 1.13 realtime, using the script it only drops to 0.92 realtime!

I don't use MA since it takes a loooong time with DivX stuff...

[]'s
Vmesquita
Reply With Quote
  #6  
08-06-2003, 06:10 AM
boeddha boeddha is offline
Free Member
 
Join Date: Mar 2003
Location: Netherlands
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Hello vmesquita,

Can you post the full script you used for that worst case scenario. What resizer did you use and which parameters for atc?

Thanx in advance
Reply With Quote
  #7  
08-06-2003, 10:48 AM
vmesquita vmesquita is offline
Invalid Email / Banned / Spammer
 
Join Date: May 2003
Posts: 3,726
Thanks: 0
Thanked 0 Times in 0 Posts
I used this variation of Girv script:

Blockbuster(method="noise",detail_min=1,detail_max =8,variance=0.3,seed=5823)
ATC(2,3,5,0.5,false)
TemporalSoften(2,7,7,3,2)
ASharp(2,3)
Blockbuster(method="noise",detail_min=1,detail_max =10,variance=0.5,seed=5823)

Of course this won't do miracles but helped a lot!

[]'s
Vmesquita
Reply With Quote
  #8  
08-06-2003, 10:44 PM
J-Wo J-Wo is offline
Free Member
 
Join Date: Nov 2002
Location: Toronto, Canada
Posts: 454
Thanks: 0
Thanked 0 Times in 0 Posts
Wow this sounds great I can't wait to give it a try! So is this all the filtering you guys do? You don't incorporate the MA script in there at all? Will this work at 528x480, because I read that blockbuster is ineffective at that resolution or higher in CQ mode. And finally are you using bicubic resizing? Thanks!
Reply With Quote
  #9  
08-07-2003, 05:11 AM
girv girv is offline
Free Member
 
Join Date: Sep 2002
Posts: 108
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to girv
Quote:
Originally Posted by J-Wo
So is this all the filtering you guys do? You don't incorporate the MA script in there at all?
Yeah, thats all the filters I use for divx sources - IMHO the MA script makes these types of sources too soft.

Quote:
Originally Posted by J-Wo
Will this work at 528x480, because I read that blockbuster is ineffective at that resolution or higher in CQ mode.
I've read that BB noise is filtered out / ignored by TMPGEnc at higher resolutions so you could probably get rid of the second BB line, but the first BB works with the following ATC filter to blend out the "dancing blocks" artefacts you almost always get with divx sources so you should leave that one in. I'm not sure if the second BB line is helpful or not, try it and see.

Quote:
Originally Posted by J-Wo
And finally are you using bicubic resizing?
Yes, I normally use BicubicResize and place it after the filters above for better quality.
Reply With Quote
  #10  
08-07-2003, 09:33 AM
J-Wo J-Wo is offline
Free Member
 
Join Date: Nov 2002
Location: Toronto, Canada
Posts: 454
Thanks: 0
Thanked 0 Times in 0 Posts
Wow Girv your script really does work wonders on my divx files! The sharpness is great and the DCT blocks are significantly reduced. I did a test by removing the second BB line and comparing the two video files in virtualdub but the one with both lines was clearly better at reducing the DCT blocks, even at 528x480! Are there any suggested tweaks to the BB lines to try and filter out more of the blocks? Thanks again!
Reply With Quote
  #11  
08-07-2003, 10:27 AM
girv girv is offline
Free Member
 
Join Date: Sep 2002
Posts: 108
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to girv
Quote:
Originally Posted by J-Wo
I did a test by removing the second BB line and comparing the two video files in virtualdub but the one with both lines was clearly better at reducing the DCT blocks, even at 528x480!
Try actually encoding the test files in TMPGEnc; I think the issue is that at high resolutions the BB noise is removed by TMPGEnc but it will still show up if you look at the files in VDub.

Quote:
Originally Posted by J-Wo
Are there any suggested tweaks to the BB lines to try and filter out more of the blocks?
If there are, let me know ;)

PM me a couple of screenshots or huffy avi's so I can see the type of problems you're left with. Maybe we'll come up with something!
Reply With Quote
  #12  
08-07-2003, 12:46 PM
J-Wo J-Wo is offline
Free Member
 
Join Date: Nov 2002
Location: Toronto, Canada
Posts: 454
Thanks: 0
Thanked 0 Times in 0 Posts
Actually I am encoding in tmpgenc first, then viewing the sample m1v in virtualdub. Comparing screenshots at 2x view mode helps to show any DCT blocks left behind. I seem to remember old 2.0x scripts where DCT blocks were completely eliminated, replaced by grainy "noise" which looked more natural than dancing blocks. Hopefully we can get others in on this little project since it doesn't look like Kwag and the gang are supporting avi's for now!
Reply With Quote
  #13  
08-07-2003, 02:22 PM
vmesquita vmesquita is offline
Invalid Email / Banned / Spammer
 
Join Date: May 2003
Posts: 3,726
Thanks: 0
Thanked 0 Times in 0 Posts
I am really interested in this! But what scripts are you talking about? We can always use 2.0x plugins in 2.5 using LoadPluginEx.dll (not very fast anyway, but works).

[]'s
Vmesquita
Reply With Quote
  #14  
08-08-2003, 05:16 AM
girv girv is offline
Free Member
 
Join Date: Sep 2002
Posts: 108
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to girv
Quote:
Originally Posted by J-Wo
Actually I am encoding in tmpgenc first, then viewing the sample m1v in virtualdub.
Ah right, sorry!

Quote:
Originally Posted by J-Wo
Comparing screenshots at 2x view mode helps to show any DCT blocks left behind.
You could try adding a constrast+brightness increasing filter as well...

Quote:
Originally Posted by J-Wo
I seem to remember old 2.0x scripts where DCT blocks were completely eliminated, replaced by grainy "noise" which looked more natural than dancing blocks.
Try increasing the variance and/or detail_max parameters on the second BB line.

Quote:
Originally Posted by J-Wo
Hopefully we can get others in on this little project since it doesn't look like Kwag and the gang are supporting avi's for now! :D
I dont think Kwag ever "supported" AVI's, he's just kind enough to not chuck us out of the forums ahen we are talking about it ;)
Reply With Quote
  #15  
08-08-2003, 12:55 PM
J-Wo J-Wo is offline
Free Member
 
Join Date: Nov 2002
Location: Toronto, Canada
Posts: 454
Thanks: 0
Thanked 0 Times in 0 Posts
oh btw girv, what are you setting your min/max bitrate in tmpgenc? I was wondering if I should go back to 300/2500 since this script is not MA.
Reply With Quote
  #16  
08-08-2003, 04:10 PM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
You can do that. I'm currently making a conversion of a 42 min video that I plan to put with 3 of its brother on one CD (that means, 200 Mo only for each, or if you prefer 160 Min on on CD) using VCD res (352*28 and 64/2000 as min/max setting : the CQ is not determinated yet but will be near 77 !

I modified a little the original script btw, and that is the one I use :
Code:
Undot()
Blockbuster(method="noise",detail_min=1,detail_max=8,variance=0.3,seed=5823)
ATC(2,3,5,0.5,false)
TemporalSoften(2,7,7,3,2)
Blockbuster(method="noise",detail_min=1,detail_max=10,variance=0.5,seed=5823)
GripCrop(352, 288+0+0, overscan=1, source_anamorphic=false, dest_anamorphic=false)
GripSize(resizer="LanczosResize")
DCTFilter(1,1,1,1,1,1,0.5,0)
GripBorders()
I added "Undot()" at the beguining because the script didn't have any Spatial filter and we always need one Spatial and one Temporal. And I remove asharp because resizing with Lanczos is sharpen enought.
Reply With Quote
  #17  
08-08-2003, 06:40 PM
J-Wo J-Wo is offline
Free Member
 
Join Date: Nov 2002
Location: Toronto, Canada
Posts: 454
Thanks: 0
Thanked 0 Times in 0 Posts
Cool so would you use this new script for higher res like 528x480? Also do you not find that lancoz resize creates strange artifacts or mosquito noise? Thanks
Reply With Quote
  #18  
08-08-2003, 06:42 PM
vmesquita vmesquita is offline
Invalid Email / Banned / Spammer
 
Join Date: May 2003
Posts: 3,726
Thanks: 0
Thanked 0 Times in 0 Posts
@DialHot
Great! I'll test your modified script agains my worst case scenario (Divx 3.11 1-CD rip of panic room) to see the results!

@J-Wo
I am testing with 720x480, so I guess you can! I don't have artifacts with lanczos unless I am doing a big horizontal resize (like 640x480 to 352x480)

[]'s
Vmesquita
Reply With Quote
  #19  
08-09-2003, 05:28 AM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by J-Wo
Cool so would you use this new script for higher res like 528x480? Also do you not find that lancoz resize creates strange artifacts or mosquito noise? Thanks
In fact I didnt exactly 17 test before finding the script I gave in my previous post. And all test were made without any resizing for time gain, so the sample was 704*400. You can use it at 528*40 without any problem. The econd BB line is perhaps useless for DCT removing but I didn't test without it.

For lanczos : no I don't find this. I always prefer using Lanczos alone rather than asharp+bilinear. I have a sample I use for all my test and Lanczos is the only one than preserve the "2-day beard" of one of the character. All others litteraly shave him
Reply With Quote
  #20  
08-09-2003, 06:21 AM
jorel jorel is offline
Invalid Email / Banned / Spammer
 
Join Date: Aug 2002
Location: Brasil - MG - third stone from the sun
Posts: 5,570
Thanks: 0
Thanked 0 Times in 0 Posts
when i did monsters sa in december with lanczos i got "moving ants".
then was needed to encode again with bicubic,unfilter and
temporalsmoother...i didn't knew asharp in december.
i stop to use lanczos.
i have the 2 encodeds kvcds with and without lanczos and
the second(without lanczos) is really best...
in the legends and edges i got less "moving ants"..seems "staircases".

this was encoded as 320x240 mpeg1...
this could be the reason of this strange artefacts?
if i choose more resize like 480x480 give less problems?
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
Removing Subtitles from video? cpietrio Subtitles 7 08-06-2004 09:33 AM
DVD2SVCD: Removing credits from dvds before encode jorel Video Encoding and Conversion 0 06-12-2004 11:11 AM
VirtualDub: Help removing logos the_tone76 Video Encoding and Conversion 1 03-08-2004 12:46 PM
Removing vocals from music black prince Audio Conversion 2 09-23-2003 09:00 AM
KVCD: Best method for removing blockiness in still/dark areas? Reno Video Encoding and Conversion 1 04-05-2003 07:26 AM

Thread Tools



 
All times are GMT -5. The time now is 04:02 PM  —  vBulletin Jelsoft Enterprises Ltd