Quantcast Avisynth: Highest Quality vs Motion Estimate File Size? - digitalFAQ.com Forums [Archives]
  #1  
08-15-2003, 05:04 AM
fabrice fabrice is offline
Free Member
 
Join Date: Mar 2003
Location: Madrid-Spain
Posts: 515
Thanks: 0
Thanked 0 Times in 0 Posts
Hi,

Playing with Tmpgenc, I discovered that using the MA script, Highest Quality parameter gives me a 5% smaller file than Motion Estimate (and a 200% larger encoding time )!

I have to watch 2 samples on mi TV to see if there are equals, but 5% is a lot...

Could someone confirm that?

Thanks,
Fabrice
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-15-2003, 05:15 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
hy fabrice.

i can confirm if you post the exact scripts used,then
i copy each and do 2 samples tests to compare.

can you post the (exact) scripts please?

Reply With Quote
  #3  
08-15-2003, 05:21 AM
fabrice fabrice is offline
Free Member
 
Join Date: Mar 2003
Location: Madrid-Spain
Posts: 515
Thanks: 0
Thanked 0 Times in 0 Posts
Hi Jorel,

Of course (It's the Optimal one):
Code:
LoadPlugin("D:\tools\AviSynth2\AviSynth 2.5\plugins\MPEG2Dec3.dll")
LoadPlugin("D:\tools\AviSynth2\AviSynth 2.5\plugins\UnFilter.dll")
LoadPlugin("D:\tools\AviSynth2\AviSynth 2.5\plugins\stmedianfilter.dll")#
LoadPlugin("D:\tools\AviSynth2\AviSynth 2.5\plugins\asharp.dll")#
LoadPlugin("D:\tools\AviSynth2\AviSynth 2.5\plugins\undot.dll")#
LoadPlugin("D:\tools\AviSynth2\AviSynth 2.5\plugins\gripfit_yv12.dll")
LoadPlugin("D:\tools\AviSynth2\AviSynth 2.5\plugins\temporalcleaner.dll")
## 
#### 

## Defined Variables and Constants ## 
# 
MaxTreshold = 1.50 
nf =  0 # Current frame. 
# 
#### 

## Main section and static filters ### 
# 
MPEG2Source("D:\dvd\spiderman.d2v")
# 
undot() 
Limiter() 
asharp(1, 4) 
GripCrop(352, 576, overscan=2)
GripSize(resizer="BicubicResize") 

STMedianFilter(8, 32, 0, 0 ) 
MergeChroma(blur(MaxTreshold)) 
MergeLuma(blur(0.2)) 
# 
# 

## Dynamic Linear Adaptive Filtering and Scene Change Detection ## 
# 
# ( Portions from AviSynth's manual ) - This will apply temporalsoften to 
# very static scenes, and apply variable blur on moving scenes. 
# We also assign a variable - and this is why a line break is inserted: 

SwitchThreshold = (Width<=352) ? 4 : (Width<=480) ? 3 : 2 
ScriptClip("nf = YDifferenceToNext()"+chr(13)+ "nf >= SwitchThreshold ? \ 
unfilter( -(fmin(round(nf)*2, 100)), -(fmin(round(nf)*2, 100)) ) : \ 
TemporalSoften( fmin( round(2/nf), 6), round(1/nf) , round(3/nf) , 1, 1) ")

# 
# 
# 

GripBorders()
#Limiter() 
#ConvertToRGB24()
# 
# 
## Functions ### 

function fmin(float f1, float f2) { 
  return (f1<f2) ? f1 : f2 
}
I'm in the PAL World, but I think this is the same thing for NTSC.

CU

Edited: I'm using Tmpgenc 2.520.
Reply With Quote
  #4  
08-15-2003, 06:03 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
fabrice,
results changing to 352x480(ntsc) with (trim)
2001 frames , 1 minute and 7 seconds source
and using using CQ70 to encode:

motion estimate search (fast):
1 minute,59 seconds to encode,
6,10mb size ( 6,250kb)

high quality (very slow) :
2 minutes,39 seconds to encode,
6,04mb size ( 6,196kb)

visual differences:
can't see anything in my short sample,just the same!

Reply With Quote
  #5  
08-15-2003, 08:21 AM
Edlund Edlund is offline
Free Member
 
Join Date: Jul 2003
Location: Pazardjik, Bulgaria
Posts: 147
Thanks: 0
Thanked 0 Times in 0 Posts
So it's true, I think I will be using high quality for larger files
Reply With Quote
  #6  
08-15-2003, 08:28 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
Quote:
Originally Posted by Edlund
So it's true, I think I will be using high quality for larger files
remember that my sample is too small,
better is test with big sizes to compare cos
we have tons of posts showing better results with ME!
nothing is better than tests!

Reply With Quote
  #7  
08-15-2003, 11:30 AM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by fabrice
Highest Quality parameter gives me a 5% smaller file than Motion Estimate (and a 200% larger encoding time )!
And more visible artifacts around objects, using "High Quality". That's why we changed to "Motion Estimate"

-kwag
Reply With Quote
  #8  
08-15-2003, 11:35 AM
fabrice fabrice is offline
Free Member
 
Join Date: Mar 2003
Location: Madrid-Spain
Posts: 515
Thanks: 0
Thanked 0 Times in 0 Posts
Hi,

I got a shot comparing Motion Estimation y Highest:

In my opinion, Highest in this case is better (on the right), because of less artifacts and less blocks.
The CQ is 63, and the diference is 4% less for Highest.

CU
Reply With Quote
  #9  
08-15-2003, 12:02 PM
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
maybe is my monitor or the size of the pictures...
i can't see blocks and artifacts.



but with the "nose in the screen"....
in the right picture i see better matizes...like,
the green part on the bottom,the color of her lips and face,
the skin of the guy in the back, the "light blue" througt the window.


more opinions are welcome!
Reply With Quote
  #10  
08-18-2003, 07:48 AM
Holomatrix Holomatrix is offline
Free Member
 
Join Date: Aug 2002
Posts: 130
Thanks: 0
Thanked 0 Times in 0 Posts
Colors look a bit more vibrant and crisper with the image on the right.
Reply With Quote
  #11  
08-18-2003, 08:10 AM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
Just one thing : Highest quality "just" take more time than High Quality. The results are quite the same

Time diff between High and Motion Estimare is only 20-30%.
Reply With Quote
  #12  
08-18-2003, 08:29 AM
nicksteel nicksteel is offline
Free Member
 
Join Date: Nov 2002
Posts: 863
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by kwag
Quote:
Originally Posted by fabrice
Highest Quality parameter gives me a 5% smaller file than Motion Estimate (and a 200% larger encoding time )!
And more visible artifacts around objects, using "High Quality". That's why we changed to "Motion Estimate"

-kwag
Does this mean I should use "Motion Estimate" rather than "High Quality" for KDVD full with non-MA optimum template?
Reply With Quote
  #13  
08-18-2003, 08:49 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 nicksteel
Does this mean I should use "Motion Estimate" rather than "High Quality" for KDVD full with non-MA optimum template?
No, that's only for MA script that ME is usefull
Reply With Quote
  #14  
08-18-2003, 08:55 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 fabrice
Code:
function fmin(float f1, float f2) { 
  return (f1<f2) ? f1 : f2 
}
It's strange that you do have an error there : normaly this function now ask for int parameters, and not float.

You should put :
Code:
function fmin(int f1, int f2) { 
  return (f1<f2) ? f1 : f2 
}
Things will be faster this way.
Reply With Quote
  #15  
08-18-2003, 03:03 PM
fabrice fabrice is offline
Free Member
 
Join Date: Mar 2003
Location: Madrid-Spain
Posts: 515
Thanks: 0
Thanked 0 Times in 0 Posts
Hi,

@Dialhot: you're right about the script. It was an old version of the MA script. Best with int! Thanks!

I was looking at this parameters, because in that movie, the Marie Jane face seem to have strange artifact on the right side, and it 's very noticeable when she moves the head (with Motion estimate). With High, it's still noticeable, but with Highest, it's almost perfect:


I'm just encoding the whole movie with Highest (with a CQ 65,18. Before was 63,61). 6h instead of 4h, but worth it, I think. I was just recording my firsts DVDRip, and I was already changing the template to put Highest...

Fabrice
Reply With Quote
  #16  
08-18-2003, 05:18 PM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Hi Fabrice,

In order to proplerly see the effect as to why Motion Estimate is better that High Quality or Highest, we can't compare still frames
I've picked a very appropiate scene, where there's horizontal, vertical, and circular motion. Here is where you can really appreciate the "far less" mosquito effect, when using "Motion Estimate"
Look carefully at around the moving space craft.
http://www.kvcd.net/red-hq.m2v ( High Quality)
http://www.kvcd.net/red-hhq.m2v ( Highest Quality )
http://www.kvcd.net/red-me.m2v ( Motion Estimate )

The difference is obvious, and this was a direct encode from a .d2v. No filters used

Edit: These are NTSC encodes Maybe there's a difference in PAL

-kwag
Reply With Quote
  #17  
08-19-2003, 12:09 AM
fabrice fabrice is offline
Free Member
 
Join Date: Mar 2003
Location: Madrid-Spain
Posts: 515
Thanks: 0
Thanked 0 Times in 0 Posts
Hi kwag,

I agree with you that there is no sense to compare still frames, with the MA script, but this scene is quite still, and you can notice the defect on the TV: it last 3 seconds... and in this scene, it's better Highest.

I think it's quite unfair to compare this Motion Search Precisions without filters, as MA script is changing quite a lot this kind of things (more blurring when movement).
And I see that your samples are mpeg2. Couldn't this produce different results?

I'll cut this part in the 3 samples, and post them.

Fabrice
Reply With Quote
  #18  
08-19-2003, 12:36 AM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by fabrice
Hi kwag,

I agree with you that there is no sense to compare still frames, with the MA script, but this scene is quite still, and you can notice the defect on the TV: it last 3 seconds... and in this scene, it's better Highest.

I think it's quite unfair to compare this Motion Search Precisions without filters, as MA script is changing quite a lot this kind of things (more blurring when movement).
And I see that your samples are mpeg2. Couldn't this produce different results?

I'll cut this part in the 3 samples, and post them.

Fabrice
Hi fabrice,

Yes, I agree that in some scenes, there is a slight advantage using "High Quality". But after doing many comparisons, the overall quality/speed ratio with "Motion Estimate" is just greater than the time spent encoding with "High Quality". I believe there's some extensive test data done by SansGrip, related to "High Quality" vs. "Highest Quality", where the conclusion was that "Highest Quality" was just useless, as there is really no visual quality gained. It's way deep in this thread: http://www.kvcd.net/forum/viewtopic.php?t=2073
So we were actually using "Normal" quality before the MA script, because there was not that much difference to "High Quality". Just a little better with "High Quality". But then, specially on fast movind scenes, where you can see an image in front moving fast over a still background, there is where you really see the "Motion Estimate" shine above all other search methods. On "High Quality" and "Highest Quality", you'll see a "Streak" image left behind, where it's barely visible when using "Motion Estimate". I believe there are some screenshots to prove that in some thread where we were discussing the MA script, where it clearly shows the benefit. That's why we changed from "High Quality" to Motion Estimation, and there were many tests to confirm that. The screenshots you provided, I believe from "Spiderman" , it's a sceenshot inside the bus. There's not much "Cross Motion" there, like on a fast panning front image with a still background scene with small details. If you can make a small test with that type of scene, I'm sure you'll see what we're talking about
Also, it applies to MPEG-1 and MPEG-2. It's the same result.

Edit: Here's the thread. In my first post here: http://www.kvcd.net/forum/viewtopic....=asc&start=416 there are two MPEG-1 samples which show the "Gibbs" effect, clearly more visible with "High Quality" than "Motion Estimate". Specially noticeable on far away small objects.

-kwag
Reply With Quote
  #19  
08-19-2003, 09:55 AM
fabrice fabrice is offline
Free Member
 
Join Date: Mar 2003
Location: Madrid-Spain
Posts: 515
Thanks: 0
Thanked 0 Times in 0 Posts
Hi Kwag,

Quote:
I believe there's some extensive test data done by SansGrip, related to "High Quality" vs. "Highest Quality", where the conclusion was that "Highest Quality" was just useless, as there is really no visual quality gained. It's way deep in this thread: http://www.kvcd.net/forum/viewtopic.php?t=2073
If I knew it had been already seen, I won't have postit . I was so mad about getting rid of this defect (I tried encodig at 528x576, 352x576 and 352x288, and still here!), that when I found the solution, and the file was smaller, I just post it.
See that it's the famous post about CQ vs CQ_VBR... have to read it again.
Quote:
The screenshots you provided, I believe from "Spiderman" , it's a sceenshot inside the bus. There's not much "Cross Motion" there, like on a fast panning front image with a still background scene with small details. If you can make a small test with that type of scene, I'm sure you'll see what we're talking about
Yep: from Spiderman. I think I can easily find a scene with Cross Motion. Have to look at that.
Quote:
Edit: Here's the thread. In my first post here: http://www.kvcd.net/forum/viewtopic....=asc&start=416 there are two MPEG-1 samples which show the "Gibbs" effect, clearly more visible with "High Quality" than "Motion Estimate". Specially noticeable on far away small objects.
Ok: now I see what you mean. I'll look for this kind of scene in that movie.

Thanks for all that 'pointers'. Just 2 hours reading, and others 2 hours doing test!

Just one more thing: since I'm reading this forum, I can't see TV anymore, as I see all defects on satellite channel, and traditional TV: garbage...

Fabrice.
Reply With Quote
  #20  
08-19-2003, 01:10 PM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by fabrice

Just one more thing: since I'm reading this forum, I can't see TV anymore, as I see all defects on satellite channel, and traditional TV: garbage...

Fabrice.
That makes two of us

-kwag
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
Avisynth: Quality problems on a high motion film? adiinbar Avisynth Scripting 8 08-02-2004 02:05 PM
Highest Possible KSVCD Quality? Viper_Viper Video Encoding and Conversion 3 03-03-2004 07:02 PM
Avisynth: File Size Predition vs Actual file size? Rig R. Mortis Avisynth Scripting 2 10-12-2002 06:04 PM
Encoding: Highest quality in motion search precision? Nico Video Encoding and Conversion 4 09-26-2002 09:22 PM
TMPGEnc: Motion Search Precision - Highest Qual or Motion Est Search MoovyGuy Video Encoding and Conversion 1 08-28-2002 11:00 PM

Thread Tools



 
All times are GMT -5. The time now is 03:36 PM  —  vBulletin © Jelsoft Enterprises Ltd