digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Video Encoding and Conversion (http://www.digitalfaq.com/archives/encode/)
-   -   DVD2SVCD: Need some help with Dialhot's MA script (http://www.digitalfaq.com/archives/encode/4921-dvd2svcd-dialhots-ma.html)

telemike 08-07-2003 06:54 AM

Need some help with Dialhot's MA script
 
Code:

[AVISYNTH_Adaptative Filter]
0=nf=0
1=GripCrop(^TargetWidth, ^TargetHeight+^BorderTop+^BorderBottom, overscan=^overscan, source_anamorphic=^source_ana, dest_anamorphic=^dest_ana)
2=GripSize(resizer="BiCubicResize")
3=Undot()
4=Asharp(1, 4)
5=STMedianFilter(^S_FilterThreshHold, ^S_EdgeThreshHold, 0, 0 )
6=MergeChroma(blur(^blur_chroma))
7=MergeLuma(blur(^blur_luma))
8=SwitchThreshold = (Width<=352) ? 4 : (Width<=480) ? 3 : 2
9=ScriptClip("nf = round(YDifferenceToNext())"+chr(13)+ "nf >= SwitchThreshold ? unfilter(-(fmin(nf*2,100)),-(fmin(nf*2,100))) : TemporalCleaner(6+nf,13+nf) ")
10=GripBorders()
11=function fmin(int f1, int f2) { return (f1<f2) ? f1 : f2 }
^overscan=1
^source_ana=true
^dest_ana=false
^S_FilterThreshHold=8
^S_EdgeThreshHold=32
^blur_chroma=1.58
^blur_luma=0.1


Where is the newest Gripcrop filter at?

Where do I put the AVS filters at since I don't see any load plugin commands?

Thanks!

Dialhot 08-07-2003 07:13 AM

Re: Need some help with Dialhot's MA script
 
Quote:

Originally Posted by telemike
Code:

[AVISYNTH_Adaptative Filter]
0=nf=0


Note that this script does'nt work as it without patching DVD2SVCD binary or adding a line ConvertoTOYV12 as line 0 (and modifying the # of all the lines that follow). See http://www.kvcd.net/forum/viewtopic....er=asc&start=0

Quote:

Where is the newest Gripcrop filter at?
I use the only version of Gripcrop that exists, but adapted to YV12 colorspace (
http://www.nic.fi/~lhahne/GripFit_YV12.zip)

Quote:

Where do I put the AVS filters at since I don't see any load plugin commands?
Under the directory where you installed avisynth 2.52 on you PC there is a folder "plugin". Put them all there.

jorel 08-07-2003 07:18 AM

hy telemike
:)

only adjust the "resize to" in the frameserver tab of d2s,
the gripcrop will work very fine!

avisynth 252 have the "autoload" function!
if you put all filters within the "plugins" folder of avisynth 25
and all filters there will load automatic then
you don't need to "load plugins commands" :!:

last Phil recomendations:
change
TemporalCleaner(6+nf,13+nf) ")
to
TemporalCleaner(6+nf,11+nf) ")

:wink:

edited:
again (as always)
Phil was faster!
:lol:

telemike 08-07-2003 07:27 AM

How do I patch DVD2SVCD? 8O

telemike 08-07-2003 07:30 AM

Is this correct?


Code:

[AVISYNTH_Adaptative Filter]
0=ConvertoTOYV12()
1=nf=0
2=GripCrop(^TargetWidth, ^TargetHeight+^BorderTop+^BorderBottom, overscan=^overscan, source_anamorphic=^source_ana, dest_anamorphic=^dest_ana)
3=GripSize(resizer="BiCubicResize")
4=Undot()
5=Asharp(1, 4)
6=STMedianFilter(^S_FilterThreshHold, ^S_EdgeThreshHold, 0, 0 )
7=MergeChroma(blur(^blur_chroma))
8=MergeLuma(blur(^blur_luma))
9=SwitchThreshold = (Width<=352) ? 4 : (Width<=480) ? 3 : 2
10=ScriptClip("nf = round(YDifferenceToNext())"+chr(13)+ "nf >= SwitchThreshold ? unfilter(-(fmin(nf*2,100)),-(fmin(nf*2,100))) : TemporalCleaner(6+nf,11+nf) ")
11=GripBorders()
12=function fmin(int f1, int f2) { return (f1<f2) ? f1 : f2 }
^overscan=1
^source_ana=true
^dest_ana=false
^S_FilterThreshHold=8
^S_EdgeThreshHold=32
^blur_chroma=1.58
^blur_luma=0.1


Dialhot 08-07-2003 07:35 AM

Quote:

Originally Posted by telemike
How do I patch DVD2SVCD? 8O

With an hex editor like UltraEdit for instance.
Just have to search the first occurence of "ConvertToYUY2" into DVD2SVCD.exe and change the first character to # (so #onvertToYUY2).

You have to do this because there is no way to avoid DVD2SVCD to add the line "ConvertToYuY2", and we need to be in YV12 colospace for the MA script :-(

Code:

0=ConvertoTOYV12    WRONG
but
Code:

0=ConvertoToYV12()  CORRECT
(that is not the best way, but it's the easiest one).

Note : if you choose to patch the binary, think about making a copy of the original one before any action :idea:

telemike 08-07-2003 07:38 AM

http://www.ultraedit.com/downloads/

I will give this a shot tonight! :D

telemike 08-07-2003 03:07 PM

How about this simpler script? Does it look ok?

Code:

[AVISYNTH_maf_BilinearResize]
0=ConvertoYV12()
1=nf=0
2=BilinearResize(^TargetWidth,^TargetHeight)
3=Undot()
4=Asharp(1, 4)
5=STMedianFilter(^S_FilterThreshHold, ^S_EdgeThreshHold, 0, 0 )
6=MergeChroma(blur(^blur_chroma))
7=MergeLuma(blur(^blur_luma))
8=SwitchThreshold = (Width<=352) ? 4 : (Width<=480) ? 3 : 2
9=ScriptClip("nf = round(YDifferenceToNext())"+chr(13)+ "nf >= SwitchThreshold ? unfilter(-(fmin(nf*2,100)),-(fmin(nf*2,100))) : TemporalCleaner(6+nf,11+nf) ")
10=AddBorders(0,^BorderTop,0,^BorderBottom)
11=function fmin(int f1, int f2) { return (f1<f2) ? f1 : f2 }
^S_FilterThreshHold=8
^S_EdgeThreshHold=32
^blur_chroma=1.58
^blur_luma=0.1


Dialhot 08-07-2003 04:07 PM

Yes it is. But be carreful : as bilinear is less sharpen than bicubic, you should perhaps remove all blur on luma (line 7)

telemike 08-08-2003 06:38 AM

Thanks-

I have been using Bilinear all along. I will go with Bicubic for this script if that's what is reccomended. :)

poolman 08-08-2003 09:32 AM

Code:

0=ConvertoYV12()  notice a T is missing, it should be 0=ConvertToYV12()


Need to check the spelling error also ;) just lettin you know incase you did'nt catch it :)

Dialhot 08-08-2003 09:42 AM

[quote="poolman"]
Code:

0=ConvertoYV12()  notice a T is missing, it should be 0=ConvertToYV12()
:bruce: Eagle eyes ;-)

telemike 08-08-2003 10:04 AM

Doh!

Do I really need the converttoyv12? I tested it without and seems to work....

jorel 08-08-2003 10:21 AM

Quote:

Originally Posted by telemike
Doh!

Do I really need the converttoyv12? I tested it without and seems to work....

:lol:
telemike my friend,you're a joker!
:rotf:

if work.....you don't need!

:wink:

Dialhot 08-08-2003 04:02 PM

Excuse me but it can't work in D2S as it adds a ConvertToYuY2 at the beguinning of the script; You should have a problem on the "Scripclip" command and your image should be splited in two parts verticaly, with the left one in inverted color.

Don't you have this ? Or are you telling that, doing by hand in a text editor, the script works fine without any convert line ? Because for sure ; by hand it works ! The problems comes when D2S generates the script.

telemike 08-09-2003 10:34 AM

Here's my current encode as we speak:

Code:

Import("D:\dvd\Temp\RESAMP~1.AVS")
LoadPlugin("C:\PROGRA~1\DVD2SVCD\AVISYN~1.5PL\Mpeg2dec\MPEG2D~1.DLL")
mpeg2source("D:\dvd\test\DVD2AV~1.D2V")
nf=0
GripCrop(480, 360+60+60, overscan=1, source_anamorphic=true, dest_anamorphic=false)
GripSize(resizer="BiCubicResize")
Undot()
Asharp(1, 4)
STMedianFilter(8, 32, 0, 0 )
MergeChroma(blur(1.58))
MergeLuma(blur(0.1))
SwitchThreshold = (Width<=352) ? 4 : (Width<=480) ? 3 : 2
ScriptClip("nf = round(YDifferenceToNext())"+chr(13)+ "nf >= SwitchThreshold ? unfilter(-(fmin(nf*2,100)),-(fmin(nf*2,100))) : TemporalCleaner(6+nf,11+nf) ")
GripBorders()
function fmin(int f1, int f2) { return (f1<f2) ? f1 : f2 }
ConvertToYUY2()
ResampleAudio(44100)


Quote:

WNASPI32.DLL 4.71.1.0
WNASPI32.DLL 4.71.1.0
--------------------------------------------------------
- 8/9/2003 9:51:24 AM
- DVD to SVCD Conversion
- DVD2SVCD ver. 1.1.3 build 2
--------------------------------------------------------
Initializing
Initializing finished.

--------------------------------------------------------
- 8/9/2003 9:51:28 AM
- DVD2AVI
--------------------------------------------------------
Creating DVD2AVI INI file:
- C:\Program Files\DVD2SVCD\DVD2AVI\DVD2AVI.INI

Variable settings:
iDCT_Algorithm: 32-bit SSE MMX

Executing DVD2AVI.
Executing DVD2AVI. Commandline:
"C:\Program Files\DVD2SVCD\DVD2AVI\DVD2AVI.exe" -CS=2 -YR=1 -EXIT -OF=[D:\dvd\test\DVD2AVI_Project_file] -IF=[D:\dvd\Temp\VTS_01_1.vob,D:\dvd\Temp\VTS_01_2.vob, D:\dvd\Temp\VTS_01_3.vob,D:\dvd\Temp\VTS_01_4.vob, D:\dvd\Temp\VTS_01_5.vob]
Analyzing DVD2AVI Project file
Force Film activated!
Framerate: 23976
DVD2AVI processing done.

--------------------------------------------------------
- 8/9/2003 9:56:22 AM
- Free on drive C: 5230.49 mb
- Free on drive D: 17653.51 mb
- AUDIO Extraction
--------------------------------------------------------
Found AC3 stream id: 0x80
Filename: D:\dvd\Temp\Extracted_audio_1.ac3
Audio1 delay: 0 ms
Audio extraction finished.

--------------------------------------------------------
- 8/9/2003 10:00:45 AM
- Free on drive C: 5230.49 mb
- Free on drive D: 17325.98 mb
- AUDIO conversion
--------------------------------------------------------

Encoding Audio. Filename: D:\dvd\Temp\Extracted_audio_1.ac3
Executing BeSweet. Commandline:
"C:\Program Files\DVD2SVCD\BeSweet\BeSweet.exe" -core( -input "D:\dvd\Temp\Extracted_audio_1.ac3" -output "D:\dvd\Temp\Encoded_audio_1.mp2" -logfile "D:\dvd\Temp\Encoded_audio_1.log" ) -azid( -L -3db -c normal -s surround -g max ) -2lame( -e -b 160 -m s )
Audio conversion of D:\dvd\Temp\Extracted_audio_1.ac3 finished.

Audio conversion finished.

--------------------------------------------------------
- 8/9/2003 10:22:33 AM
- Free on drive C: 5230.51 mb
- Free on drive D: 17208.99 mb
- Converting Pictures
--------------------------------------------------------
Converting: C:\Program Files\DVD2SVCD\DefaultChangeCD.bmp
Converting: C:\Program Files\DVD2SVCD\DefaultLastCD.bmp
Finished converting pictures
--------------------------------------------------------
- 8/9/2003 10:22:44 AM
- Free on drive C: 5230.51 mb
- Free on drive D: 17207.53 mb
- Video Encoding using Cinema Craft
--------------------------------------------------------

Executing Cinema Craft Encoder.
StreamSectors: 1665085576
AudioSectors: 124517596
VideoPAPO: 23864220
ScanOffsetBytes: 176448
SeqAligningBytes: 11214251
DVDBytes: 0
VideoEndHeader: 8
SubtitleSectors: 0
EmptySectors: 238.00
PictureSectors: 600.00
PureMPEGStream: 1505313053.33
Seconds: 6142.80
CalcMPEGStream: 1505313053.33
Frames: 147040
CDSize: 800.00
Number of CDs: 2
Cut point 795.00
Variable Settings:
Frames: 147040
Anti Noise Filter: Off
Passes: 4
Image Quality: 17
VAF file creation: On
Video Encoding Mode: One Pass VBR
Q. Factor: 15
Min. bitrate: 300
Max. bitrate: 1960
Aspect Ratio: 16:9 (borders added, encoded as 4:3)

---AVS Begin---
Import("D:\dvd\Temp\RESAMP~1.AVS")
LoadPlugin("C:\PROGRA~1\DVD2SVCD\AVISYN~1.5PL\Mpeg 2dec\MPEG2D~1.DLL")
mpeg2source("D:\dvd\test\DVD2AV~1.D2V")
nf=0
GripCrop(480, 360+60+60, overscan=1, source_anamorphic=true, dest_anamorphic=false)
GripSize(resizer="BiCubicResize")
Undot()
Asharp(1, 4)
STMedianFilter(8, 32, 0, 0 )
MergeChroma(blur(1.58))
MergeLuma(blur(0.1))
SwitchThreshold = (Width<=352) ? 4 : (Width<=480) ? 3 : 2
ScriptClip("nf = round(YDifferenceToNext())"+chr(13)+ "nf >= SwitchThreshold ? unfilter(-(fmin(nf*2,100)),-(fmin(nf*2,100))) : TemporalCleaner(6+nf,11+nf) ")
GripBorders()
function fmin(int f1, int f2) { return (f1<f2) ? f1 : f2 }
ConvertToYUY2()
ResampleAudio(44100)
----AVS End----

Dialhot 08-09-2003 07:27 PM

You're right, there is no "ConvertToYUY2()" added by D2S in your case; I see two possible reasons :

- you use CCE and I use TMPGenc
- your source is a DVD where i did only avi recently.

The point is that in your case, you don't need any ConvertoToYV12 or patched D2S.


All times are GMT -5. The time now is 12:44 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.