Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 28th June 2010, 18:12   #481  |  Link
Vincent Vega
Registered User
 
Join Date: Feb 2004
Location: the tiny bubble of Creation
Posts: 189
GradFun2DB x64

the GradFun2DB x64 zip does not come with a readme or link to new forum discussion. does it require GradFunkMirror.avsi like before or not? If it does, can I use the old avsi script? does it need to be modified?

thanks.
Vincent Vega is offline   Reply With Quote
Old 29th June 2010, 08:47   #482  |  Link
jpsdr
Registered User
 
Join Date: Oct 2002
Location: France
Posts: 2,309
Ok, you have the same problems as me. I've made first some little tests with DVD resolution, seemed fine, but when tried 1080i, always crash.
jpsdr is offline   Reply With Quote
Old 29th June 2010, 13:22   #483  |  Link
nixo
Registered User
 
nixo's Avatar
 
Join Date: Dec 2002
Location: EUR
Posts: 159
I got crashes not only with HD but also with DVD resolutions. The encode may have run for an hour or two, but eventually I'd get either a vdub live lock or a crash in MVTools.

Now I just split my avs and run 3 or 4 single-threaded encodes at the same time. So far that's been rock stable, although it does require a good bit of memory.

Last edited by nixo; 29th June 2010 at 13:25.
nixo is offline   Reply With Quote
Old 29th June 2010, 17:27   #484  |  Link
txporter
Registered User
 
Join Date: Nov 2009
Posts: 110
Quote:
Originally Posted by jpsdr View Post
Ok, you have the same problems as me. I've made first some little tests with DVD resolution, seemed fine, but when tried 1080i, always crash.
I see the same thing. 1080i material seems to use too much memory. I was trying to benchmark various TGMC settings with a 1080i clip and found that all script settings would result in memory usage going to 2+ gb and then a crash. Script was simply:
Code:
setmtmode(5,0)
MPEG2Source("video1.d2v")
setmtmode(2)
TempGaussMC_beta2(various settings changes here)
Interestingly, I was able to process 6 - 1hr episodes of 1080i material using the following script (clip used for speed testing was from the first of these 1 hr episodes):
Code:
setmtmode(5,0)
LoadCPlugin("C:\Program Files (x86)\Avisynth 2.5\plugins64\yadif.dll")
MPEG2Source("video.d2v",cpu=3)
setmtmode(2)
lanczosresize(1280, height)
TempGaussMC_beta2(1,1,0,4,0,0,edimode="Yadif",Smode=1,SLmode=1,Sbb=0,SVthin=0.0,pelsearch=1)
srestore(frate=25)
lanczosresize(width, 720)
removegrain(1)
I tried again to do the speed testing by resizing the video [mpeg2source+resize+tgmc (without the srestore call)] and the memory usage still goes 2+ gb and crashes. Is srestore somehow limiting the # of frames placed into memory or something?

update: Also wanted to add that both Avisynth64 or 32 see crashes with 1080i source material. All tests were done with setmtmode, so cannot say that is the cause or not. I have zero issues running setmtmode + TGMC with DVD source material.

update2: Confirmed findings from others that setmtmode is the problem. Eliminating setmtmode calls allows Avisynth32 (non-64bit system atm) to complete 1080i TGMC script with no issues.

Last edited by txporter; 29th June 2010 at 19:51.
txporter is offline   Reply With Quote
Old 30th June 2010, 07:03   #485  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,542
Quote:
Originally Posted by nixo View Post
Now I just split my avs and run 3 or 4 single-threaded encodes at the same time.
How? Could you post your scripts?
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 30th June 2010, 16:08   #486  |  Link
nixo
Registered User
 
nixo's Avatar
 
Join Date: Dec 2002
Location: EUR
Posts: 159
Ehh, it's just a simple trim() and outputting to lossless.
nixo is offline   Reply With Quote
Old 1st July 2010, 22:00   #487  |  Link
kartman_canada
Registered User
 
Join Date: Jan 2008
Posts: 30
I posted the following in the MeGUI x64 thread too... AVS script included:

Code:
LoadPlugin("C:\Program Files\MeGUI_64\tools\dgindex\DGDecode.dll")
DGDecode_mpeg2source("D:\VIDEO_TS\VTS_06_1.d2v", info=3)
LoadPlugin("C:\Program Files\MeGUI_64\tools\avisynth_plugin\ColorMatrix.dll")
ColorMatrix(hints=true, threads=0)
#deinterlace
crop( 4, 54, -4, -58)

LanczosResize(712,302) # Lanczos (Sharp)
#denoise

I'm not sure where my issue sits... I've been using MuGUI x64 for a while now but I don't recall doing anything but crops. Today, I moved to process a DVD. When I apply the crop, no issues but when I add a "lanczosresize" line to the AVS script, MeGUI crashes.

Might this be because the resize function is pulling an x86 build from the original avisynth install and not an x64 version?

I'm just guessing... is there an update out there or am I missing something else? Maybe an install issue?

Last edited by kartman_canada; 1st July 2010 at 22:04.
kartman_canada is offline   Reply With Quote
Old 1st July 2010, 23:47   #488  |  Link
kemuri-_9
Compiling Encoder
 
kemuri-_9's Avatar
 
Join Date: Jan 2007
Posts: 1,348
Quote:
Originally Posted by kartman_canada View Post
Files\MeGUI_64\tools\dgindex\DGDecode.dll")
DGDecode_mpeg2source("D:\VIDEO_TS\VTS_06_1.d2v", info=3)
LoadPlugin("C:\Program Files\MeGUI_64\tools\avisynth_plugin\ColorMatrix.dll")
ColorMatrix(hints=true, threads=0)
#deinterlace
crop( 4, 54, -4, -58)

LanczosResize(712,302) # Lanczos (Sharp)
#denoise[/CODE]

I'm not sure where my issue sits... I've been using MuGUI x64 for a while now but I don't recall doing anything but crops. Today, I moved to process a DVD. When I apply the crop, no issues but when I add a "lanczosresize" line to the AVS script, MeGUI crashes.
no, it's already been mentioned in this thread that the resize functions violate the windows x86_64 calling convention causing either crashes or other odd issues when they are used.
As they are known to be broken in this fashion, they are to be used at-your-own-risk.

SWScale() in ffms2/ffmpegsource could be an alternate choice,
but it is also at-your-own-risk as ffmpeg is known to also violate the windows x86_64 calling convention,
though I've never had problems with it myself.

(this is the part where everyone chips in their hate over the windows x86_64 calling convention)
__________________
custom x264 builds & patches | F@H | My Specs
kemuri-_9 is offline   Reply With Quote
Old 1st July 2010, 23:51   #489  |  Link
SubJunk
Registered User
 
Join Date: Jun 2010
Posts: 443
I've never had problems resizing with any versions and I do it all the time
SubJunk is offline   Reply With Quote
Old 2nd July 2010, 00:27   #490  |  Link
kemuri-_9
Compiling Encoder
 
kemuri-_9's Avatar
 
Join Date: Jan 2007
Posts: 1,348
Quote:
Originally Posted by SubJunk View Post
I've never had problems resizing with any versions and I do it all the time
doesn't mean it's not a problem.
most people mask the issue to being unnoticeable outside of avisynth by using SetMTMode
__________________
custom x264 builds & patches | F@H | My Specs
kemuri-_9 is offline   Reply With Quote
Old 2nd July 2010, 00:50   #491  |  Link
SubJunk
Registered User
 
Join Date: Jun 2010
Posts: 443
Quote:
Originally Posted by kemuri-_9 View Post
doesn't mean it's not a problem.
most people mask the issue to being unnoticeable outside of avisynth by using SetMTMode
It's true, I do use MT
SubJunk is offline   Reply With Quote
Old 2nd July 2010, 01:33   #492  |  Link
kartman_canada
Registered User
 
Join Date: Jan 2008
Posts: 30
Quote:
Originally Posted by kemuri-_9 View Post
doesn't mean it's not a problem.
most people mask the issue to being unnoticeable outside of avisynth by using SetMTMode
Sorry... I must have searched using a wrong key words. Now that I realize it's an issue seen by others, what are the work around(s)? are the options detailed earlier in the thread too?

1) switch back to x86 from x64?
2) ???
kartman_canada is offline   Reply With Quote
Old 2nd July 2010, 13:51   #493  |  Link
aegisofrime
Registered User
 
Join Date: Apr 2009
Posts: 478
Quote:
Originally Posted by kartman_canada View Post
I posted the following in the MeGUI x64 thread too... AVS script included:

Code:
LoadPlugin("C:\Program Files\MeGUI_64\tools\dgindex\DGDecode.dll")
DGDecode_mpeg2source("D:\VIDEO_TS\VTS_06_1.d2v", info=3)
LoadPlugin("C:\Program Files\MeGUI_64\tools\avisynth_plugin\ColorMatrix.dll")
ColorMatrix(hints=true, threads=0)
#deinterlace
crop( 4, 54, -4, -58)

LanczosResize(712,302) # Lanczos (Sharp)
#denoise

I'm not sure where my issue sits... I've been using MuGUI x64 for a while now but I don't recall doing anything but crops. Today, I moved to process a DVD. When I apply the crop, no issues but when I add a "lanczosresize" line to the AVS script, MeGUI crashes.

Might this be because the resize function is pulling an x86 build from the original avisynth install and not an x64 version?

I'm just guessing... is there an update out there or am I missing something else? Maybe an install issue?
Put a SetMTMode(5) before your resize functions. I do this and I don't get a single crash.
aegisofrime is offline   Reply With Quote
Old 3rd July 2010, 00:25   #494  |  Link
kartman_canada
Registered User
 
Join Date: Jan 2008
Posts: 30
Quote:
Originally Posted by aegisofrime View Post
Put a SetMTMode(5) before your resize functions. I do this and I don't get a single crash.
Possible I have something else going on? Added SetMTMode(5) to the AVS script but I'm still getting a crash...

Starting to get a bit muddled... Is this a problem stemming from the fact I'm using Win7 x64 as an OS or can I move to the 32bit MeGUI/Avisynth?

Searched SWSScale from another post... I need to take a step back though as this wasn't clear how to implement as part of an AVS script.

From my script above, can I get FFDSHOW to act as the MPEG2 decoder? Input is a D2V with a VOB source... Maybe I can scale using ffdshow?

thanx for the help. I think I need to try a clean install as I've been messing about now trying different things... not confident I've not messed something up.
kartman_canada is offline   Reply With Quote
Old 3rd July 2010, 01:05   #495  |  Link
kemuri-_9
Compiling Encoder
 
kemuri-_9's Avatar
 
Join Date: Jan 2007
Posts: 1,348
Quote:
Originally Posted by kartman_canada View Post
Searched SWSScale from another post... I need to take a step back though as this wasn't clear how to implement as part of an AVS script.
i doesn't appear to be well documented, so here's a quick shot
SWScale( PClip clip, int width, int height, string "resizer" = "bicubic", string "colorspace" = "" )

available resizers are
"fast_bilinear", "bilinear", "bicubic", "x" (experimental), "point", "area", "bicublin", "gauss", "sinc", "lanczos", and "spline"

available output colorspaces are currently
"yv12", "yuy2", "rgb24", "rgb32", and "" (no change)

(NOTE: it's a generally bad idea to use swscale to vertically resize interlaced material - this means within ffdshow too)
__________________
custom x264 builds & patches | F@H | My Specs
kemuri-_9 is offline   Reply With Quote
Old 3rd July 2010, 03:37   #496  |  Link
kartman_canada
Registered User
 
Join Date: Jan 2008
Posts: 30
Quote:
Originally Posted by kemuri-_9 View Post
i doesn't appear to be well documented, so here's a quick shot
SWScale( PClip clip, int width, int height, string "resizer" = "bicubic", string "colorspace" = "" )

available resizers are
"fast_bilinear", "bilinear", "bicubic", "x" (experimental), "point", "area", "bicublin", "gauss", "sinc", "lanczos", and "spline"

available output colorspaces are currently
"yv12", "yuy2", "rgb24", "rgb32", and "" (no change)

(NOTE: it's a generally bad idea to use swscale to vertically resize interlaced material - this means within ffdshow too)
What DLL do I have to load or package needs installing before I can call SWScale() in an AVS script?
kartman_canada is offline   Reply With Quote
Old 3rd July 2010, 03:55   #497  |  Link
kemuri-_9
Compiling Encoder
 
kemuri-_9's Avatar
 
Join Date: Jan 2007
Posts: 1,348
Quote:
Originally Posted by kartman_canada View Post
What DLL do I have to load or package needs installing before I can call SWScale() in an AVS script?
it's included with ffmpegsource/ffms2.dll
the 64bit version of it is on the front page of this thread, though it neglects to mention that you load it with LoadCPlugin.
it's been a while since i've built or worked on the plugin, so let me know if you find issues.
__________________
custom x264 builds & patches | F@H | My Specs
kemuri-_9 is offline   Reply With Quote
Old 3rd July 2010, 05:01   #498  |  Link
kartman_canada
Registered User
 
Join Date: Jan 2008
Posts: 30
Quote:
Originally Posted by kemuri-_9 View Post
i doesn't appear to be well documented, so here's a quick shot
SWScale( PClip clip, int width, int height, string "resizer" = "bicubic", string "colorspace" = "" )

available resizers are
"fast_bilinear", "bilinear", "bicubic", "x" (experimental), "point", "area", "bicublin", "gauss", "sinc", "lanczos", and "spline"

available output colorspaces are currently
"yv12", "yuy2", "rgb24", "rgb32", and "" (no change)

(NOTE: it's a generally bad idea to use swscale to vertically resize interlaced material - this means within ffdshow too)
My material is progressive so i should be OK. ffms2.dll loaded. AVS script line:

SWScale (712,302,"lanczos","")

I'm sure this is formatted incorrectly... can you correct? I seem to get a couple of good frames if I preview the script and play... then a crash.

Decided to go for an encode anyways... Using MeGUI, when I add the job, I get a complaint that the clip is I420 and not YV12. I changed the above line to SWScale (712,302,"lanczos","yv12")... still complaining. Allowed MeGUI to append ConvertToYV12()... still complaining.

Grrrrr....

Code:
LoadPlugin("C:\Program Files\MeGUI_64\tools\dgindex\DGDecode.dll")
DGDecode_mpeg2source("D:\VIDEO_TS\VTS_06_1.d2v", info=3)
LoadPlugin("C:\Program Files\MeGUI_64\tools\avisynth_plugin\ColorMatrix.dll")
ColorMatrix(hints=true, threads=0)
crop( 4, 54, -4, -58)
LoadCPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins64/ffms2.dll")
SWScale(712,302,"lanczos","yv12")

Last edited by kartman_canada; 3rd July 2010 at 05:20.
kartman_canada is offline   Reply With Quote
Old 3rd July 2010, 14:21   #499  |  Link
kemuri-_9
Compiling Encoder
 
kemuri-_9's Avatar
 
Join Date: Jan 2007
Posts: 1,348
Quote:
Originally Posted by kartman_canada View Post
My material is progressive so i should be OK. ffms2.dll loaded. AVS script line:
SWScale (712,302,"lanczos","")

I'm sure this is formatted incorrectly... can you correct? I seem to get a couple of good frames if I preview the script and play... then a crash.
No, It looks fine enough.
I am not able to replicate a crash in x264 r1659 nor vdub 1.9.6 though.

Quote:
Decided to go for an encode anyways... Using MeGUI, when I add the job, I get a complaint that the clip is I420 and not YV12. I changed the above line to SWScale (712,302,"lanczos","yv12")... still complaining. Allowed MeGUI to append ConvertToYV12()... still complaining.
Grrrrr....
Ah, I was unaware of MeGUI being this braindead (I never use it, since it has a history of irritating me to no ends with its consistent stupidities):
SWScale() does flag the video as being I420 instead of YV12 when outputting YV12 video.
(SWScale does not formally support YV12 itself, but due to the below reasoning this is not particularly an issue in most cases)

the difference between I420 and YV12 is simply
I420 is Y-U-V. YV12 is Y-V-U
- the chroma planes are simply swapped in memory
but the way avisynth handles acquiring the plane pointers, the above difference is generally unnoticeable.
for this same reason, ConvertToYV12() is a NOOP (No operation) when the video is I420 (in avs 2.5.x that is, in 2.6.0 looks like there might be a bug in this situation)

But it appears MeGUI is not capable of handling this properly either way, so I dare say to file a bug report to MeGUI.
It appears that you will not be able to use SWScale if you plan to use MeGUI due to the above, unless it fixes itself sometime rather soon
__________________
custom x264 builds & patches | F@H | My Specs
kemuri-_9 is offline   Reply With Quote
Old 3rd July 2010, 16:46   #500  |  Link
elguaxo
Registered User
 
elguaxo's Avatar
 
Join Date: Jun 2006
Posts: 260
Quote:
Originally Posted by kemuri-_9 View Post
I dare say to file a bug report to MeGUI.
I reported it 2 years ago and it seems the bug is still there.
http://forum.doom9.org/showthread.ph...03#post1157503

edit: back then I was using AviSynth 2.5.6 or 2.5.7

Last edited by elguaxo; 3rd July 2010 at 16:48.
elguaxo is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 20:17.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.