digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Video Encoding and Conversion (http://www.digitalfaq.com/archives/encode/)
-   -   Optimal Script V3: here it is... (http://www.digitalfaq.com/archives/encode/5591-optimal-script-v3.html)

Dialhot 09-14-2003 06:07 PM

Optimal Script V3: here it is...
 
Okay. While answering to a lot of threads there (and screwing up a post from vmesquita - I appologize again ;-)), I was working on a new script to use with AVi->KVCD encoding.

There is the script :
Code:

AviSource("movie.avi",false)
BlindPP(cpu=4)
Blockbuster(method="noise",detail_min=1,detail_max=3,variance=0.1,seed=1)
ATC(2,3,5,0.5,false)
GripCrop(HEIGHT, WIDTH, overscan=1, source_anamorphic=false)
GripSize(resizer="LanczosResize")
Undot()
TemporalSoften(2,7,7,3,2)
DCTFilter(1,1,1,1,1,1,0.5,0)
GripBorders()

I tested it with a 480x480 target resolution. You must turn off all postprocessing done by codecs (Divx or Xvid) to use this script. That is important.

Here are the results of benchmark I did :

benchmark 1: Finding CQ with CQMatic for a 1h30 Divx movie

Script V1 : CQ = 74.62
Script V2 : CQ = 71.2
Script V3 : CQ = 74.13

benchmark 2: time and file size of the encoding of one minute from an Xvid movie (CQ=70 for all)

Script V1 : time : 2'47" - file size : 3370
Script V2 : time : 2'39" - file size : 3530
Script V3 : time : 2'46" - file size : 3362

benchmark 3: visual evaluation of the results of the benchmark #2

Script V1 : Some blocks presents but lot of details are killed (berely impossible to see eyes of people in second plan)

Script V2 : Lot of blocks, lot of details. But quality is somehow poor.

Script V3 : Same blocks than V1 but picture a lot more sharpen (close to V2).

I let you play with this.

Dialhot 09-14-2003 08:24 PM

Please note that I've just modified some values in the script. I you took it before this present post, check the new script.
Thanks !

(the new values result in less mosquitoes and a smaller file. In fact I deed a mistake in the previous post on the variance of the noise - 1 insteed of 0.1 !)

vmesquita 09-15-2003 08:50 AM

Dialhot,

Update the Optimal Script post. :D I have been using this combination of filters for a while (the same filters you suggest, just different order and an extra blockbuster, and some different parameters) and they were giving me great results. I guess that with this script you suggested results should be even better! I can't wait to try! :D

[]'s
VMesquita

Dialhot 09-15-2003 10:05 AM

In fact yesterday when I saw you used this combination, I was smiling as you told you should not use it, and I know you were a little wrong. After you post an other thread telling that in fact, that's a good combination : that removed part of the surprise of "my" new script :-).

n fact you're right, all is in the order and values. My goal was to have a visual result on sharpening close to V2 but with file size and block removal of V1. I think I find somethign correct.

But everything ask to be enhanced. So... go to work :-)

incognito 09-15-2003 01:15 PM

Whenever I try to encode at 480x480 with any script I end up with a stretched picture. Im currently working with an avi encoded at 640x256. What can I do to the script to get it to fit my target value of 480x480 without stretching the picture? Also how do I turn off all postprocessing done by codecs?

Dialhot 09-15-2003 03:27 PM

Steched ? Did you think to put "source_anamorphic=false" into the gripcrop line ? Because I do not know a lot of avi that are anamorphic :-)

bigggt 09-15-2003 03:35 PM

Having trouble with Blind PP line

Tmpge error

Quote:

Blind PP need mod 16 width
I just copied and pasted and left as blind pp(cpu=4),don't know if i have to change anything also how do you shut off the divx and xvid post processing

thanx

Dialhot 09-15-2003 03:38 PM

How, didn't know that. My soruce was already with a width mod 16.

In this case, put all filters (blinbPP, blockbuster and ATC) after gripcrop and gripsize. But this solution has to be tested : result can't be predicted.

vmesquita 09-15-2003 03:49 PM

I guess blindpp() won't work right if you resize the clip, because it uses the DCT blocks of the picture to do post-processing. What I do in this cases is change the avisource line for something like this:

AVISource("mymovie.avi").addborders(0,8,0,0)

Please check the size of your source to see if it is the height or the width that is not divisible by 16, and add 8 pixels in that direction.

This extra 8 pixels of black borders will eventually be removed during gripcrop.

[]'s
VMesquita

Dialhot 09-15-2003 04:32 PM

Quote:

Originally Posted by vmesquita
This extra 8 pixels of black borders will eventually be removed during gripcrop.

Hey, that's right :-D ! That is very smart. Well done ! :-)

bigggt 09-15-2003 04:37 PM

i tried it with a few different avi's and it works fine the avi i'm having trouble with has a framerate of 23.988,could this be the problem.

@ vmesquita

which is height and width in the addborders(0,8,0,0)
:imstupid:

this is what it says in tmpge MPEG-1 356x56 24fps CQ 63.53

Dialhot 09-15-2003 05:55 PM

Quote:

Originally Posted by bigggt
which is height and width in the addborders(0,8,0,0)

AddBorders(clip, int left, int top [, int "right", int "bottom"] [, int "color"])

But be carreful to that :

Letterbox(clip, int top, int bottom, [int left], [int right], int "color")

Quote:

:imstupid:
The best way to change it is to RTFM of avisynth.
It's delivered with avisynth or you can find it on the avisynth.org site.

incognito 09-15-2003 05:56 PM

Quote:

Originally Posted by Dialhot
Steched ? Did you think to put "source_anamorphic=false" into the gripcrop line ? Because I do not know a lot of avi that are anamorphic :-)

I've tried that and the film is still streched. Any other ideas?

Dialhot 09-15-2003 06:00 PM

With or without the source_ana=false, you have the same streching, or does the thing change between the two ?

Can you copy exactly the script use use there ?

Do you have a 4:3 or a 16:9 TV set ?

incognito 09-15-2003 07:59 PM

I have both a 16:9 and 4:3 and the image is the same. Here is my avs:
Code:

AviSource("G:\Ripps\Current\sample2.avi", false)
BlindPP(cpu=4)
Blockbuster(method="noise",detail_min=1,detail_max=3,variance=0.1,seed=1)
ATC(2,3,5,0.5,false)
GripCrop(480, 480, overscan=1, source_anamorphic=false, dest_anamorphic=false)
GripSize(resizer="LanczosResize")
Undot()
TemporalSoften(2,7,7,3,2)
DCTFilter(1,1,1,1,1,1,0.5,0)
GripBorders()

And I've tried other scripts. Ive also gave links pics so you can see for yourself.

SOURCE

STRETCHED

Thanks for any help.

Dialhot 09-15-2003 08:19 PM

Lol. Okay. Excuse me but the picture is not stetched at all.

480*480 is a square. Your TV set is rectangular. The final picture on your TV set will be the equivalent of 640*480 on you PC screen (480*4/3).
So don't worry : everythign is normal there :-)

You can see this in zoomplayer by forcing the A/R to 4:3 for instance.

incognito 09-15-2003 08:23 PM

I never thought to actually burn it and watch it. :lol: It always looked terrible so I tried other things. Thanks. Sometimes the easiest answer is in front of our face.

incognito 09-16-2003 11:57 AM

The script looks fantastic.

Dialhot 09-16-2003 12:48 PM

Okay. So today I change the post "latest optimal script for AVI" and if it's possible, I will reset the poll.

As I go in hollidays tomorrow for 3 weeks, I let you work and/or play with the present script :-).

bigggt 09-16-2003 06:39 PM

@ Dialhot

Quote:

The best way to change it is to RTFM of avisynth
What does RTFM mean

Just Kidding :D ,sometimes its too easy to ask instead of looking on my own

Have a great Holliday


All times are GMT -5. The time now is 10:20 AM  —  vBulletin © Jelsoft Enterprises Ltd

Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.