AVS Script trouble

This forum is for questions and discussion of all the aspects of handling your footage. If you have questions about capturing/ripping footage, AviSynth, or compression/encoding/converting, look here.

AVS Script trouble

Postby 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: 19 Jan 2002

Re: AVS Script trouble

Postby 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: 19 Jan 2002

Postby Ciato » Fri Nov 10, 2006 7:21 pm

Oh god sorry.
This place needs an edit button :(
Ciato
 
Joined: 19 Jan 2002

Re: AVS Script trouble

Postby 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
Scintilla
(for EXTREME)
 
Joined: 31 Mar 2003
Location: New Jersey
Status: Quo

Postby Warpwind » Fri Nov 10, 2006 8:20 pm

I can't help but notice the error pictured looks similar to this thread
User avatar
Warpwind
 
Joined: 07 Oct 2002
Location: middle of the desert

Re: AVS Script trouble

Postby 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: 19 Jan 2002

Postby Ciato » Fri Nov 10, 2006 9:16 pm

Again with the double posting, sorry :(

Here's what Read ErMaC & AbsoluteDestiny's Friendly AMV Guides 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.
Ciato
 
Joined: 19 Jan 2002

Postby 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.
User avatar
Warpwind
 
Joined: 07 Oct 2002
Location: middle of the desert

Postby 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.
Ciato
 
Joined: 19 Jan 2002

Postby 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.
User avatar
Warpwind
 
Joined: 07 Oct 2002
Location: middle of the desert

Postby Ciato » Sat Nov 11, 2006 12:38 pm

Well, of the two OVAs, one of them already has the audio removed, and I actually need the audio for the other one. However, the audio that I am setting the video to is CBR, I compressed it with BeSweet.

And unfortunately I can't apply one script to the finish product. One of the source AVIs is interlaced, the other is progressive. They are both different resolutions (I want them both to 640x480), and one of them needs cropping while the other doesn't.

So what I did was I opened the scripts in VirtualDubMod and I saved the XviD source AVIs as Huffys, the swapped the two Huffys in replacing the mjpegs and exported. I no longer get that freaky fuzz issue in the picture but the timing is STILL off in some places. Granted the places now are completely different than the places I used to have troubles with...

I guess now I'll try guide=0 and hope that was the problem.
Ciato
 
Joined: 19 Jan 2002

Postby Ciato » Sat Nov 11, 2006 1:27 pm

Ok, I extracted the audio I needed from the OVA with VirtualDubMod, compressed it to CBR with BeSweet and imported it to the project, so I'm adding KillAudio to the script.

Recompressing the source AVIs to Huffys now with the KillAudio in one script and guide=0 (the default) in the other. Hopefully that will fix my in-outpoint problem. If not then I'm out of ideas :(

Thanks for all the help so far guys, I really appreciate it.
Ciato
 
Joined: 19 Jan 2002

Postby Warpwind » Sat Nov 11, 2006 6:13 pm

it's both scripts that have the timing issue right? Not just the deinterlacing one?

If it was just that one it would suggest there is something up with the deinterlacing. Probably with decimate since that removes some of the frames (since telecide has restored the frames and produced too many) to give it a certain fps (user defined).
User avatar
Warpwind
 
Joined: 07 Oct 2002
Location: middle of the desert

Postby Ciato » Sat Nov 11, 2006 7:54 pm

Before I had re-encoded the source AVIs to Huffys I was having the timing issue with both scripts.

Now that they're pointing to Huffys instead of XviDs, only the deinterlacing script is having the timing issues. The problem is half solved :P

The new Huffy with guide=0 should be done later tonight, hopefully that will fix it.

It's actually kind of funny, it's like watching a whole different AMV, and in lots of places it doesn't make sense but holy crap there was one scene which I think was timed better than the timing I did myself. Once we figure out what's going on here I'm gonna go back and touch it up before I release the video.
Ciato
 
Joined: 19 Jan 2002

Postby Ciato » Sat Nov 11, 2006 8:38 pm

Nope, setting guide to 0 didn't fix the problem.
Is there a way to deinterlace the footage without messing up my in-out points?
Ciato
 
Joined: 19 Jan 2002

Next

Return to Footage Help

Who is online

Users browsing this forum: No registered users and 3 guests