digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Avisynth Scripting (http://www.digitalfaq.com/archives/avisynth/)
-   -   Avisynth: MA script for a one-movie DVD ? (http://www.digitalfaq.com/archives/avisynth/8294-avisynth-ma-script.html)

Lagoon 02-22-2004 07:16 PM

MA script for a one-movie DVD ?
 
I was wondering if for one-movie DVD the MA script isnt giving worse quality than without any filters at all ? wouldn't it be more blurred ?

Talking about 4000-5000 average bitrate.

What would be the good lines to keep for this kind of bitrate ? remove all blurring filters ?

jorel 02-22-2004 08:10 PM

hy Lagoon!

i was thinking the same this days!
AviSynth 2.5x script,don't?
maybe turn asharp like this:
asharp(2, 4)
and remove
mergechoma and mergeluma (blur)

but wait more opinions and do a test with a little vob,ok?
:)

Lagoon 02-22-2004 08:43 PM

Yeah 2.5x script.

I'm currently doing samples on 1000 frames with various settings :wink:

jorel 02-22-2004 08:47 PM

post each result my friend,
we all want to know!
:wink:

Lagoon 02-22-2004 08:58 PM

asharp seems to amplify a lot the "white line" on edges, I actually like the pictubre better without it, is there any filter to reduce those ? :?

jorel 02-22-2004 09:23 PM

use unfilter(-5,-5) or (-10,-10)
or reduce asharp to(0.5,2) or remove it!
:wink:

incredible 02-23-2004 03:39 AM

Friends, as the new MA now blurs linear and continously you shouldn't use it in a case of ONE Movie DVD-R where you enjoy enough space and high avg bitrates cause MA does manipulate the image. And we do not really to manipulate streams that much if we gain from enough media space.

Just treat the movie using a light filtering (if you got a good mastered DVD as source). A minimal Temporalsoften i.e.

Asharp is very tricky as it very fast (as you did figure out) in case of heavier sharpening results in "glowing" edges.

Just use in this case Unfilter(60,0) so only the horizontal lines will be sharpened what is the most importand cause TVs are Line based.

Something like this:

mpeg2Source("xxxxxxxxxxxxxxx.d2v")
Your resizing here()
Deen("a2d",1,3,5) # Only if spatial filtering is really needed
Temporalsoften(2,3,5,20,2)
Unfilter(60,0)
Addborders(xxxx)

Too much sharpen will look some kind of in-natural on Tv .. that have been also the issue in cases of 352x288(240) encodings where some guys used Labczos AND asharp afterwards = glowing edges.
Next issue is, if you got a std. TVset using i.e. 50hz you will get a horzontal line-flickering effect.

IF I would tweak out the best of a good DVD d2v source, I just would apply some light filtering and maybe some luma tweaking using levels... only if really needed as some DVDs are clipping in their Luma range.

Dialhot 02-23-2004 04:31 AM

Quote:

Originally Posted by incredible
mpeg2Source("xxxxxxxxxxxxxxx.d2v")
Your resizing here()
Deen("a2d",1,3,5) # Only if spatial filtering is really needed
Temporalsoften(2,3,5,20,2)
Unfilter(60,0)
Addborders(xxxx)

That is quite the script I use.
As I do al my targets in anamorphic, and all my source are anaporphic, I don't have even to do any resising. I just crop the black borders and put them back at the end of the process.

The borders (top, bottom) are always the same (you can check that in DVD2AVI:

(0,0) when the movie is fullscreen
(16,16) when it is 1.85
(72,72) when it is 2.35.

And the script is :
Code:

mpeg2Source("xxxxxxxxxxxxxxx.d2v")
Crop(8,0,704,576) # for full screen
#Crop(8,16,704,544) # for 1.85
#Crop(8,72,704,432) # for 2.35

Fluxsmooth()
TemporalCleaner(5,10)
Undot()
DCTFilter(1,1,1,1,1,1,0.5,0)

AddBorders(0,0,0,0) # for fullscreen
# AddBorders(0,16,0,16) # for 1.85
# AddBorders(0,72,0,72) # for 2.35

Letterbox(16,16,16,16) # overscan=2

That's all.

Note: I only did clean sources for the moment; Badly noisy ones can be processed with a spacial like deen, as inc suggested.

incredible 02-23-2004 05:54 AM

Wow, Fluxsmooth at default AND Temporalcleaner(5,10) is IMHO a heavy temporal denoising.

Do you got nice experiences when using fluxsmooth??
I heared that the new version also got some speed improvements.

OT: Very interesting would be for me to find a well and fast YUY2 spatial cleaner (TV Caps) like spatialsoften() which IMHO is too slow but better than Deen(a2d), maybe Convolution3d_YUY2 at spatial settings. Well I check it out.

jorel 02-23-2004 06:29 AM

hey friends,
the "problem" that Lagoon post is :
"wouldn't it be more blurred ?" (using the 2.5x ma script)
then....
:lol:

Dialhot 02-23-2004 07:09 AM

Quote:

Originally Posted by incredible
Do you got nice experiences when using fluxsmooth??

I did all my KDVD with this, I used to do all my KVCD with this before I switch to something closer to my avi->divx V4 script.

And let me tell you that the KDVD samples I distributed saturday were done with this script. And see the comment of kwag :
Quote:

DAMN, Looks good Phil 8O :lol:
So, you see... the results are good, aren't they ? ;-)

Note: I actually use fluxsmooth(7,7) but I thinkthis are the default values. Perhaps I'm wrong. So use (7,7) to be sure.

incredible 02-23-2004 09:02 AM

@ Jorel
His Question was already answered I think :)

@ Phil, yep, 7,7 are Fluxsmooth's defaults

Ahh! You mean your samples you provided by doing the KDVD-Test-compatibility Streams! :wink:

BTW I was not in doubt that your settings come out good, I just asked you about your experiences :wink:

Lagoon 02-23-2004 12:36 PM

Thx for all the examples ill give them a try :wink:

bigggt 02-23-2004 06:24 PM

Hi Phil i want to try this out for KVCD

Code:

mpeg2Source("xxxxxxxxxxxxxxx.d2v")
Crop(8,0,704,576) # for full screen
#Crop(8,16,704,544) # for 1.85
#Crop(8,72,704,432) # for 2.35

Fluxsmooth()
TemporalCleaner(5,10)
Undot()
DCTFilters(1,1,1,1,1,1,0.5,0)

AddBorders(0,0,0,0) # for fullscreen
# AddBorders(0,16,0,16) # for 1.85
# AddBorders(0,72,0,72) # for 2.35

Letterbox(16,16,16,16) # overscan=2

But i obviously have no clue what i'm doing because i get an error abiut the crop line but anyway if i want to use thjose filtyers where would i put my resize line

Thanx

Dialhot 02-23-2004 06:53 PM

Quote:

Originally Posted by bigggt
But i obviously have no clue what i'm doing because i get an error abiut the crop line but anyway if i want to use thjose filtyers where would i put my resize line

Replace the crop line by your resize one (and don't forget to modify the addborders line).

bigggt 02-23-2004 06:59 PM

Thanx Phil

and for stupid people like myself that just copy and paste you might want to change this line

Code:

DCTFilters(1,1,1,1,1,1,0.5,0)
The s was giving me an error

Thanx again Buddy

Dialhot 02-23-2004 07:16 PM

Quote:

Originally Posted by bigggt
and for stupid people like myself that just copy and paste you might want to change this line
Code:

DCTFilters(1,1,1,1,1,1,0.5,0)

Okay :-)

nicksteel 02-24-2004 04:51 AM

Phil........
 
Quote:

I do al my targets in anamorphic, and all my source are anaporphic, I don't have even to do any resising. I just crop the black borders and put them back at the end of the process.

The borders (top, bottom) are always the same (you can check that in DVD2AVI:

(0,0) when the movie is fullscreen
(16,16) when it is 1.85
(72,72) when it is 2.35.

And the script is :
[code]mpeg2Source("xxxxxxxxxxxxxxx.d2v")
Crop(8,0,704,576) # for full screen
#Crop(8,16,704,544) # for 1.85
#Crop(8,72,704,432) # for 2.35

Fluxsmooth()
TemporalCleaner(5,10)
Undot()
DCTFilter(1,1,1,1,1,1,0.5,0)

AddBorders(0,0,0,0) # for fullscreen
# AddBorders(0,16,0,16) # for 1.85
# AddBorders(0,72,0,72) # for 2.35

Letterbox(16,16,16,16) # overscan=2
That's all.
Phil, what values should be used for 1.66:1 widescreen, anamorphic in, anamorphic out?

Dialhot 02-24-2004 05:30 AM

Justr use DVD2AVI to check the size of the black borders. Do you know how to do that ?

nicksteel 02-24-2004 06:21 AM

Quote:

Originally Posted by Dialhot
Justr use DVD2AVI to check the size of the black borders. Do you know how to do that ?

Phil,

No, haven't ever used DVD2AVI for this. How?

Thanks,

NickSteel

incredible 02-24-2004 06:34 AM

Nick you should watch a bit in DVD2AVI to figure out its functions.
There you find an option "crop and resize" or so.
Check the checkbox and move the top/bottom Scrollbars to figure out the boders hights.

bigggt 02-24-2004 05:04 PM

1.66:1 widescreen

How do you get the ratio(which program)

Dialhot 02-25-2004 03:56 AM

I use my eyes and look at the back cover of the DVD :-) and then I check if it is correct by checking border size in DVD2AVI (that is the only important think indeed, the A/R is not important).

If you see borders of 32 pixels insted of 16 or 72 as I report, just change my script according to what you find for your source.

nicksteel 08-31-2004 08:07 AM

Phil, one to one
 
Quote:

Originally Posted by Dialhot
As I do all my targets in anamorphic, and all my source are anaporphic, I don't have even to do any resising. I just crop the black borders and put them back at the end of the process.

The borders (top, bottom) are always the same (you can check that in DVD2AVI:

(0,0) when the movie is fullscreen
(16,16) when it is 1.85
(72,72) when it is 2.35.

And the script is :
Code:

mpeg2Source("xxxxxxxxxxxxxxx.d2v")
Crop(8,0,704,576) # for full screen
#Crop(8,16,704,544) # for 1.85
#Crop(8,72,704,432) # for 2.35

Fluxsmooth()
TemporalCleaner(5,10)
Undot()
DCTFilter(1,1,1,1,1,1,0.5,0)

AddBorders(0,0,0,0) # for fullscreen
# AddBorders(0,16,0,16) # for 1.85
# AddBorders(0,72,0,72) # for 2.35

Letterbox(16,16,16,16) # overscan=2

That's all.

Note: I only did clean sources for the moment; Badly noisy ones can be processed with a spacial like deen, as inc suggested.

Phil, for one dvd to one dvd, both source and target anamorphic:

:?: What would crop/add borders values be for NTSC?

:?: What settings for each do you use for TMPGEnc/Video/Aspect ratio?

:?: What settings for each do you use for TMPGEnc/Advanced/Video source setting/Source aspect ratio?

:?: Are you using TMPGEnc's "DVD (NTSC).mcf" or KWAG's "KDVD-720x480-Full-D1-_NTSC_.mcf".

Thanks as always,

Dialhot 08-31-2004 08:15 AM

Re: Phil, one to one
 
Quote:

Originally Posted by nicksteel
:?: What would crop/add borders values be for NTSC?

Open the vobs in DVD2AVI and control by yourself the values of the borders to use insteed of 0, 16 or 72 that we use in PAL.

Quote:

:?: What settings for each do you use for TMPGEnc/Video/Aspect ratio?
I guess you have to put "16:9" in order to have tmpgenc to generate the "16:9" flags in the mpeg stream. But I'm not sure so do a short sample to control that point !

Quote:

:?: What settings for each do you use for TMPGEnc/Advanced/Video source setting/Source aspect ratio?
Nothing changes here (the source is always an avisynth script and they produce 4:3 frame, anytile), use 4:3 or 4:3 525 lines NTSC

Quote:

:?: Are you using TMPGEnc's "DVD (NTSC).mcf" or KWAG's "KDVD-720x480-Full-D1-_NTSC_.mcf".
I am using CCE ;-). And by the way i NEVER use any template, I had set all my parameters by hand one for once and never change them (fortunally TMPGENC remembers the settings from the previous encoding).

Else of course you must use a KDVD template else you wont have the correct matrix !
How can you ask such question after to much time on the site ? ;-)

Boulder 08-31-2004 10:29 AM

With one movie per disc, I'd ditch all the noise reducing filters except maybe UnDot(), though I would replace it with RemoveGrain(mode=2) :wink:

Dialhot 08-31-2004 10:36 AM

Quote:

Originally Posted by Boulder
With one movie per disc, I'd ditch all the noise reducing filters except maybe UnDot(), though I would replace it with RemoveGrain(mode=2) :wink:

For sure this thread is old and I changed my script since then.

Currently : Undot().Deen()
That's all !

(note: still didn't have time to try RemoveGrain nor RemoveDirt :-D)

incredible 08-31-2004 10:39 AM

I do underline boulders statement.
I wouldn't even use Deen in case of rebuilder as one movie is the target to one DVD-R, ok if the source is mega worth a special filtering is inevitable, but most dvds just got a bit noise.
MA and every adaptive sharpener blurrer do get very deep into the source and better compression in case of one DVD 4.3GB is no issue :)


Boulder, did you try to get Removedirt() working with dvdrebuilder???
In that rebuilder Process it doesnt work but an avisynth error comes up something like "Removedirt() doesnt got the prameter mthreshold" the parameter does exist, maybe now in here I quoted wrong as Im at work.
Ill try just a blank removedirt() and see if it works.

BTW: How was your marriage party? :D

@ Phil

You should try them out, .... maybe not for every purpose, but in case of a bit noise I do prefer them compared to temporalsoften.
I do all my captures treat with them and the result is just nice!

Boulder 08-31-2004 10:51 AM

Quote:

Originally Posted by incredible
Boulder, did you try to get Removedirt() working with dvdrebuilder???
In that rebuilder Process it doesnt work but an avisynth error comes up something like "Removedirt() doesnt got the prameter mthreshold" the parameter does exist, maybe now in here I quoted wrong as Im at work.
Ill try just a blank removedirt() and see if it works.

I've seen that error too, I sometimes (but not often) get it with QCCE. I've not tried DVD-RB yet, but I think I got rid of the problem by moving RemoveDirt before any cropping, i.e. I feed it with a 720x576 source.

Quote:

BTW: How was your marriage party? :D
We sure had a ball..I had some home-brewed ale which was simply delicious. The day went by very fast, before we even noticed it was already time to leave the place. Now we are just waiting to get to our honeymoon trip to Madeira on the 14th of September 8)

nicksteel 08-31-2004 11:04 AM

Re: Phil, one to one
 
Quote:

Originally Posted by Dialhot
Quote:

Originally Posted by nicksteel
:?: What would crop/add borders values be for NTSC?

Open the vobs in DVD2AVI and control by yourself the values of the borders to use insteed of 0, 16 or 72 that we use in PAL.

Quote:

:?: What settings for each do you use for TMPGEnc/Video/Aspect ratio?
I guess you have to put "16:9" in order to have tmpgenc to generate the "16:9" flags in the mpeg stream. But I'm not sure so do a short sample to control that point !

Quote:

:?: What settings for each do you use for TMPGEnc/Advanced/Video source setting/Source aspect ratio?
Nothing changes here (the source is always an avisynth script and they produce 4:3 frame, anytile), use 4:3 or 4:3 525 lines NTSC

Quote:

:?: Are you using TMPGEnc's "DVD (NTSC).mcf" or KWAG's "KDVD-720x480-Full-D1-_NTSC_.mcf".
I am using CCE ;-). And by the way i NEVER use any template, I had set all my parameters by hand one for once and never change them (fortunally TMPGENC remembers the settings from the previous encoding).

Else of course you must use a KDVD template else you wont have the correct matrix !
How can you ask such question after to much time on the site ? ;-)

I thought KDVD should be used, but another post from SansGrip mentioned not using the notch matrix for high bitrate encodes. Just making sure.

:D Thanks, Phil

incredible 08-31-2004 11:05 AM

Quote:

Originally Posted by Boulder
I've seen that error too, I sometimes (but not often) get it with QCCE. I've not tried DVD-RB yet, but I think I got rid of the problem by moving RemoveDirt before any cropping, i.e. I feed it with a 720x576 source.

BOTH do base in their prediction method on SelectrangeEvery() ... maybe theres a memorypointer conflict or so??!
Quote:

Now we are just waiting to get to our honeymoon trip to Madeira on the 14th of September 8)
Cool! Enjoy it! 8)

Dialhot 08-31-2004 11:20 AM

Quote:

Originally Posted by incredible
I do underline boulders statement.
I wouldn't even use Deen in case of rebuilder as one movie is the target to one DVD-R, ok if the source is mega worth a special filtering is inevitable, but most dvds just got a bit noise.

I still don't understand why you all consider Deen as a denoiser. Deen is a ST filter ! And 1 movie or not that is not the matter. Filters are tied to the sourcen not to the target. ALL SOURCES need to be temporaly filtered.

Temporal noise is introduced by rouding in the MPEG2 decoding. So unless you use a 128 bits CPU, you have it :-)

Do a 1-to-1 comparison if you want to be convinced.

incredible 08-31-2004 11:32 AM

Quote:

Originally Posted by Dialhot
I still don't understand why you all consider Deen as a denoiser. Deen is a ST filter !

Ok, a Spatio/Temporal denoiser ...
as its based on 2d and 3d convolutions:
http://ziquash.chez.tiscali.fr/
Quote:

Originally Posted by MarcFDs Site
Deen
(a set of denoisers)
Deen is a set of assembly-optimised denoisers,
like various 3d and 2d convolutions.
requires a iSSE capable cpu.

Quote:

Temporal noise is introduced by rouding in the MPEG2 decoding. So unless you use a 128 bits CPU, you have it :-)
8O ? Do you mean rounding errors? during the RLE routine while decompressing?

Dialhot 08-31-2004 11:38 AM

Quote:

Originally Posted by incredible
Ok, a Spatio/Temporal denoiser ...

I wanted to say that in your mind Deen seems to be a spatial only filter, that it is not.

Quote:

8O ? Do you mean rounding errors? during the RLE routine while decompressing?
Yes it is.
(btw the error is probably introduced during encoding, not decoding... but the result is the same : all sources need a temporal filtering)

Boulder 08-31-2004 11:54 AM

Quote:

Originally Posted by incredible
Quote:

Originally Posted by Boulder
I've seen that error too, I sometimes (but not often) get it with QCCE. I've not tried DVD-RB yet, but I think I got rid of the problem by moving RemoveDirt before any cropping, i.e. I feed it with a 720x576 source.

BOTH do base in their prediction method on SelectrangeEvery() ... maybe theres a memorypointer conflict or so??!

I'll post a bug report in the RemoveDirt thread at D9 the next time I see the problem. I'm sure kassandro will be interested in fixing it if it just can be reproduced easily.

incredible 08-31-2004 12:23 PM

@ Phil

You should know me about knowing deen a2d c3d etc :)

Related to temporal needed-anyway handling:
I hope I do understand you well but a well setted BlindPP, also using the quant!!!=x parameter does almost handle those "during encoding happening"-dct-artifacts. Yep, these artifacts arent only spatial as IBP is a sequence which results in temporal changing pixel 8x8 contents.
But "IF" the PP engine at mpeg2source() from MarcFDs Mpeg2dec3 does handle the source right, its also capable to recognise the used encoding-Quantizer on a sequence, ... but I dont trust it ;-) (BTW: the standalone vers. BlindPP isnt able to do that.)
Anyway when using a detailed deblocking in mpeg2source like using a setup "xxxxox" (just a value) and determined moderate_h, moderate_v Settings, this can avoid an extra temporal filtering. And les Temp-Artifacts will result ;-)

Again I hope I did understand you well but related to 128bit CPU and mpeg encoding ....

The DCT routine ITSELF is theoretically lossless! BUT as you only can allocade integer numbers to the DCT 8x8 Block Architecture and also by the DC Prec.8/9/10 bit those rounding errors are inevitable ;-) No matter which CPU is used.

@ Boulder

I already had an exchange with Kassandro. But I hadnt time to reply with the EXACT Quote of that error as I hadnt time to do rebuilder jobs the last 2 days (5 captured movies had to be treaten/encoded that time :lol: )

Dialhot 08-31-2004 12:35 PM

Quote:

Originally Posted by incredible
Anyway when using a detailed deblocking in mpeg2source like using a setup "xxxxox" (just a value) and determined moderate_h, moderate_v Settings, this can avoid an extra temporal filtering. And les Temp-Artifacts will result ;-)

I really don't understand this "fight" to try to have something "temporal-like' with a non temporal filter just to avoid to use a real temporal one :-)

Quote:

Again I hope I did understand you well but related to 128bit CPU and mpeg encoding ....
You do.

Quote:

The DCT routine ITSELF is theoretically lossless! BUT as you only can allocade integer numbers to the DCT 8x8 Block Architecture and also by the DC Prec.8/9/10 bit those rounding errors are inevitable ;-) No matter which CPU is used.
The 128bits sentence was a joke. For sure you will always have an error whatever the CPU.

incredible 08-31-2004 03:03 PM

Quote:

Originally Posted by Dialhot
I really don't understand this "fight" to try to have something "temporal-like' with a non temporal filter just to avoid to use a real temporal one :-)

Keeping your way of jokes and also your smiley in positive mind ...

no "fight", just a "discussion" with maybe new experiences and results from you and me.
As it always was the spirit in our past discussions and real tests. ;-)

nicksteel 09-01-2004 11:09 AM

one dvd to one dvd - Phil's Script
 
Code:

mpeg2Source("xxxxxxxxxxxxxxx.d2v")
Crop(8,0,704,576) # for full screen
#Crop(8,16,704,544) # for 1.85
#Crop(8,72,704,432) # for 2.35

Fluxsmooth()
TemporalCleaner(5,10)
Undot()
DCTFilter(1,1,1,1,1,1,0.5,0)

AddBorders(0,0,0,0) # for fullscreen
# AddBorders(0,16,0,16) # for 1.85
# AddBorders(0,72,0,72) # for 2.35

Letterbox(16,16,16,16) # overscan=2

In DVD2AVI for NTSC Widescreen, I get

Left 0
Right 8
Top 58
Bottom 62
Width 712
Height 360

What should the Crop and AddBorders lines look like?

Dialhot 09-01-2004 11:12 AM

I already told you to read the manual !

http://www.avisynth.org/Crop
http://www.avisynth.org/AddBorders

Don't you think that using A LITTLE of your time to read it will prevent everyone here to spent some of their to answer to such "simple" questions ?

(note : your values are strange : DVD2AVI should cut on values divisible by 16 or 32).


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

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