AVS Script trouble

This forum is for questions and discussion of all the aspects of handling and cleaning up your footage with Avisynth.
Ciato
Joined: Sat Jan 19, 2002 10:51 pm
Org Profile

AVS Script trouble

Post by Ciato » Fri Nov 10, 2006 7:18 pm

Ok, I'm running into some problems with AVS scripts here.
I have two source AVIs that I'm trying to edit with, when they're in Premiere themselves there is NO video in the preview whatsoever, just blackness.

However, when I swap in the AVS script that points to the same video, the video appears in Premiere, but there's a problem.

The ins and outs of the video are messed up, so I end up with scenes that weren't in the timeline when I was editing with the mjpegs. The ins and outs are altered in premiere when I swap the mjpegs to the AVS scripts.

Aside from messing the timing/footage and stuff up, I also get wonky shit like this happening every so often.

Image

Here are the scripts I'm using. I tried changing the scripts to pretty much bare bones (nothing but the lanczosresize) and I tried swapping AVIsource with Directshowsource, but neither helped.

Code: Select all

LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\deen.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\masktools.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\awarpsharp.dll")
Import("C:\Program Files\AviSynth 2.5\plugins\SharpTools-v0-1.3.avsi")
Import("C:\Program Files\AviSynth 2.5\plugins\fastlinedarken.avsi")
AVIsource("C:\Documents and Settings\Jeff\Desktop\1\Source1.avi")
ConvertToYV12()
Telecide(post=4, order=1, guide=1)
Decimate(quality=3)
lanczosresize (640,480)
deen ("a3d",3,3,5,4)
fastlinedarken()
awarpsharp()
ConvertToRGB32()

Code: Select all

LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\deen.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\masktools.dll") 
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\awarpsharp.dll") 
Import("C:\Program Files\AviSynth 2.5\plugins\SharpTools-v0-1.3.avsi")
Import("C:\Program Files\AviSynth 2.5\plugins\fastlinedarken.avsi")
AVIsource("C:\Documents and Settings\Jeff\Desktop\1\Source2.avi")
ConvertToYV12()
crop (0,60,-0,-60)
lanczosresize (640,480)
deen ("a3d",3,3,5,4)
fastlinedarken()
awarpsharp()
ConvertToRGB32()
Anybody have any insights at all?

Ciato
Joined: Sat Jan 19, 2002 10:51 pm
Org Profile

Re: AVS Script trouble

Post by Ciato » Fri Nov 10, 2006 7:20 pm

Ciato wrote:Ok, I'm running into some problems with AVS scripts here.
I have two source AVIs that I'm trying to edit with, when they're in Premiere themselves there is NO video in the preview whatsoever, just blackness.

However, when I swap in the AVS script that points to the same video, the video appears in Premiere, but there's a problem.

The ins and outs of the video are messed up, so I end up with scenes that weren't in the timeline when I was editing with the mjpegs. The ins and outs are altered within premiere (before exporting) when I swap the mjpegs to the AVS scripts.

Aside from messing the timing/footage and stuff up, I also get wonky shit like this happening every so often.

Image

Here are the scripts I'm using. I tried changing the scripts to pretty much bare bones (nothing but the lanczosresize) and I tried swapping AVIsource with Directshowsource, but neither helped.

Code: Select all

LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\deen.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\masktools.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\awarpsharp.dll")
Import("C:\Program Files\AviSynth 2.5\plugins\SharpTools-v0-1.3.avsi")
Import("C:\Program Files\AviSynth 2.5\plugins\fastlinedarken.avsi")
AVIsource("C:\Documents and Settings\Jeff\Desktop\1\Source1.avi")
ConvertToYV12()
Telecide(post=4, order=1, guide=1)
Decimate(quality=3)
lanczosresize (640,480)
deen ("a3d",3,3,5,4)
fastlinedarken()
awarpsharp()
ConvertToRGB32()

Code: Select all

LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\deen.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\masktools.dll") 
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\awarpsharp.dll") 
Import("C:\Program Files\AviSynth 2.5\plugins\SharpTools-v0-1.3.avsi")
Import("C:\Program Files\AviSynth 2.5\plugins\fastlinedarken.avsi")
AVIsource("C:\Documents and Settings\Jeff\Desktop\1\Source2.avi")
ConvertToYV12()
crop (0,60,-0,-60)
lanczosresize (640,480)
deen ("a3d",3,3,5,4)
fastlinedarken()
awarpsharp()
ConvertToRGB32()
Anybody have any insights at all?

Ciato
Joined: Sat Jan 19, 2002 10:51 pm
Org Profile

Post by Ciato » Fri Nov 10, 2006 7:21 pm

Oh god sorry.
This place needs an edit button :(

User avatar
Scintilla
(for EXTREME)
Joined: Mon Mar 31, 2003 8:47 pm
Status: Quo
Location: New Jersey
Contact:
Org Profile

Re: AVS Script trouble

Post by Scintilla » Fri Nov 10, 2006 8:02 pm

Ciato wrote:LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\deen.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\masktools.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\awarpsharp.dll")
Import("C:\Program Files\AviSynth 2.5\plugins\SharpTools-v0-1.3.avsi")
Import("C:\Program Files\AviSynth 2.5\plugins\fastlinedarken.avsi")
None of these lines should be necessary. Any plugin or helper script that's in your AVISynth 2.5 plugins directory will load automatically.
Ciato wrote:Telecide(post=4, order=1, guide=1)
The "guide=1" may be responsible for some of the in and out points not lining up. I could have sworn EADFAG used to discourage using the guide parameter for this very reason...
ImageImage
:pizza: :pizza: Image :pizza: :pizza:

User avatar
Warpwind
Joined: Mon Oct 07, 2002 4:19 am
Location: middle of the desert
Contact:
Org Profile

Post by Warpwind » Fri Nov 10, 2006 8:20 pm

I can't help but notice the error pictured looks similar to this thread

Ciato
Joined: Sat Jan 19, 2002 10:51 pm
Org Profile

Re: AVS Script trouble

Post by Ciato » Fri Nov 10, 2006 9:08 pm

Scintilla wrote:The "guide=1" may be responsible for some of the in and out points not lining up. I could have sworn EADFAG used to discourage using the guide parameter for this very reason...
I was having these problems before I included that into the script.

Code: Select all

AVIsource("C:\Documents and Settings\Jeff\Desktop\1\Source1.avi")
lanczosresize (640,480)

#I tried Directshowsource in another attempt, didn't work.
These were the only things in my script at one point and I still had the same problems.

Ciato
Joined: Sat Jan 19, 2002 10:51 pm
Org Profile

Post by Ciato » Fri Nov 10, 2006 9:16 pm

Again with the double posting, sorry :(

Here's what Read <a href=http://www.a-m-v.org/guides/avtech31/>ErMaC & AbsoluteDestiny's Friendly AMV Guides</a> says on the matter:

"Guide - This tells Telecide what sort of pattern to look for. Use 1 for NTSC Pulldown and 2 for PAL pulldown. 0 is default and does blind pattern matching which is pretty decent too - if the pattern guidance looks like it's getting it wrong, try guide=0"

If something goes wrong after this I suppose I can try changing it to 0, but I'm working on a hunch right now.

If the source AVIs were XviD encoded, do you think it might cause this kind of problem?

The timing is perfect as mjpegs and there is no crazy junk to be seen. I guess I figured that I didn't need to reencode the source AVIs if using AVS scripts made them appear in Premiere (they wouldn't appear as raw AVIs, I'd get a black screen with sound)

I guess that's what you get when you dive into a project on a whim, run into trouble, give up, then wait a full year to read up on the needed material and try to finish it.

User avatar
Warpwind
Joined: Mon Oct 07, 2002 4:19 am
Location: middle of the desert
Contact:
Org Profile

Post by Warpwind » Fri Nov 10, 2006 10:09 pm

Whenever editing with .avs in premiere I always have them as short as possible (just resizing) so that they don't lag out. Maybe that's what you mean by affecting timing.

Xvid encoded .avi files will not work in any editing program however the .avs should make it work fine in premiere. For more details see here http://amvwiki.org/index.php/DivX_Editing

Try using ConvertToRGB24() instead of RGB32 I vaguely recall older versions of premiere not liking RGB32. And premiere needs the footage in RGB anyway.

Also another way of fixing this would be to use virtualdubmod to save the file (or segements of it depending on space) as lossless encoded .avi's. Say with huffyuv or largarith.

Ciato
Joined: Sat Jan 19, 2002 10:51 pm
Org Profile

Post by Ciato » Sat Nov 11, 2006 2:18 am

I'm running Premiere 6.0, not sure if that makes a difference between RGB24 or RGB32

And what I mean by the timing being off is that in some places, it's like the in-out point tool being used. Instead of the clip that I selected being played, it will play a clip of the same length that came 2-3 seconds before/after the clip I selected as it appears in the source footage.

For example, lets assume this sequence of events in the source footage.

Event 1 --> Event 2 --> Event 3

Lets say I take a 10 second clip of event 2 and slap it on the timeline when working with mjpegs.
When I use the scripts (this happens about 10% of the time) instead I will see a 10 second clip of Event 1 or Event 3 (haven't quite figured out whether it goes backwards or forwards)

When my AVS scripts WERE just resizing, I was running into the exact same problem. Though thankfully, the much larger AVS scripts that I posted don't seem to choke Premiere up at all.

Right now I'm going to convert the source footage from XviD to Huffy and keep the scripts the same to see if that works.
I was getting the exact same problems with a simple resize only script as I am with my new resizing/smoothing/sharpening script, so even though using an AVS filter is supposed to make XviD usable in Premiere, it's my best guess.

User avatar
Warpwind
Joined: Mon Oct 07, 2002 4:19 am
Location: middle of the desert
Contact:
Org Profile

Post by Warpwind » Sat Nov 11, 2006 3:34 am

The skipping could be because of the audio track. Particularly if it's vbr rather than cbr. When you open it the video file in virtualdubmod does it mention something like "b-frame decoder lag"? Since you're unlikely to need the audio I'd add KillAudio() to your script. Some details about the whole vbr issue are here
http://www.animemusicvideos.org/guides/ ... audio.html

Also I had the RGB thing around the wrong way. Premiere prefers RGB32.

Anyway if your converting them to huffy/largarith that's probably the best way to go. You can just open the files straight in premiere then without an .avs script. You can then apply all the cleaning filters later to the finished and exported video.

Locked

Return to “AviSynth Help”