makeAvis vs VFapi discussion

User avatar
taifunbrowser
Joined: Sat Sep 11, 2004 7:39 pm
Location: DDR ARCADES
Contact:
Org Profile

makeAvis vs VFapi discussion

Post by taifunbrowser » Sat Jun 30, 2007 11:10 am

k, after using Vfapi for the past year or so, I tried makeavis today and its 1000000x faster(yes, I'm exited)


...



How come noone warned me before?

oh well, does anyone have any factors to add to my argument for switching most of my footage to makeavis fakes?

Oh, and I'm trying to use makeavis on the commandline... anyone know how? I have a huge directory of matroskas I'm trying to frameserve to vegas (previously in vfapi, but my production is slowing to halt from speed)

User avatar
taifunbrowser
Joined: Sat Sep 11, 2004 7:39 pm
Location: DDR ARCADES
Contact:
Org Profile

asdf

Post by taifunbrowser » Sat Jun 30, 2007 11:19 am

:heh: after researching this topic since last night, after posting the above post, I stumbled upon this:

http://hmd.c58.ru/files/avs2avi-0.3.zip

it works :P just as fast as makeavis, and its obviously command-line able.


brb making a java batch script to test

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

Post by Scintilla » Sat Jun 30, 2007 6:27 pm

Wait, you're talking about DGVFAPI, the one that was supposed to have fixed the big problems of old regular VFAPI?
ImageImage
:pizza: :pizza: Image :pizza: :pizza:

User avatar
Tab.
Joined: Tue May 13, 2003 10:36 pm
Status: SLP
Location: gayville
Org Profile

Post by Tab. » Sat Jun 30, 2007 8:55 pm

I'm profoundly curious -- what's the use for VFAPI nowadays? :| Just about any program you'd be using accepts AVS input (some -- MeGUI and WMNicEnc, to name a few, only support avs input.)

User avatar
WC Annihilus
Joined: Wed Jan 17, 2007 10:49 pm
Org Profile

Post by WC Annihilus » Sat Jun 30, 2007 8:59 pm

I use it to be able to edit with AVS in Vegas to avoid clip-making <shrugs>

User avatar
Zarxrax
Joined: Sun Apr 01, 2001 6:37 pm
Contact:
Org Profile

Post by Zarxrax » Sat Jun 30, 2007 9:50 pm

Tab. wrote:I'm profoundly curious -- what's the use for VFAPI nowadays? :| Just about any program you'd be using accepts AVS input (some -- MeGUI and WMNicEnc, to name a few, only support avs input.)
Almost no editing software supports AVS. Well, actually, I dont know of a SINGLE commercial editing application that supports it :\

User avatar
Tab.
Joined: Tue May 13, 2003 10:36 pm
Status: SLP
Location: gayville
Org Profile

Post by Tab. » Sat Jun 30, 2007 10:04 pm

Zarxrax wrote:Almost no editing software supports AVS. Well, actually, I dont know of a SINGLE commercial editing application that supports it :\
Point. Forgot about that whole... editing thing. I was never too into that stuff anyway :|

User avatar
taifunbrowser
Joined: Sat Sep 11, 2004 7:39 pm
Location: DDR ARCADES
Contact:
Org Profile

Post by taifunbrowser » Sun Jul 01, 2007 7:47 am

Scintilla wrote:Wait, you're talking about DGVFAPI, the one that was supposed to have fixed the big problems of old regular VFAPI?
Hmm ya I guess I was using old regular vfapi :O

Well, nevertheless, I made a batch script in java that converts a directory of mkv, ogm, divx avi, or whatever the hell other formats that vegas isnt liking first to avs and then to avi through avi2avs (NOT the moirin one, see my second post up for a link)

The syntax of the avs2avi I use is just avs2avi.exe <avs> <target>

Code: Select all

import java.io.File;
import java.io.FileWriter;
import java.io.FilenameFilter;
import java.io.IOException;

/**
 * A class that allows you to convert all DirectShow'able videos in a directory to vegas-importable avis.
 * @author Ben Braun
 */
public class batchANYtoAVI {
	public static void main(String[] args){
		String absPath = "C:/Users/Ben Braun/Videos/AMVable Footage/Haruhi";
		File in = new File(absPath);
		if (!in.exists())
			System.out.println("absPath invalid!");
		Prepare(in);
		for (File a : in.listFiles(new FilenameFilter(){
			public boolean accept(File dir, String Filename){
				String[] temp = Filename.split("\\.");
				if (temp.length == 0)
					System.out.println("In trying to test for directshowability, "+Filename+" had no extension." + temp.length);
				String extension = temp[temp.length-1].toLowerCase(); //Note lower case
				if (Filename.toUpperCase().contains("-FAKE"))
					return false;
				if (extension.equals("avi"))
					return true;
				if (extension.equals("mpg"))
					return true;
				if (extension.equals("mkv"))
					return true;
				if (extension.equals("ogm"))
					return true;
				return false;
			}
		})){
			String namewext = a.getName();
			String name = stripExtention(namewext);
			String avsName = name + "-GENERATED.avs";
			String aviName = name + "-FAKE.avi";
			try {
				File dir = new File("C:/Program Files/Avs2Avi");
				File exe = new File(dir.getAbsolutePath()+File.separator+"avs2avi.exe");
				if(!exe.exists())
					System.err.println("Couldn't find avs2avi.exe" + exe.getAbsolutePath());
				String targetAvs = absPath+"/"+avsName;
				makeAvs(targetAvs, absPath+"/"+namewext);
				if (!new File(targetAvs).exists())
					System.err.println("Avs does not exist.");
				String targetAvi = absPath+"/"+aviName;
				File output = new File(targetAvi);
				if (!output.exists()){
					String Command = ""C:/Program Files/AVS2AVI/avs2avi.exe" ""+targetAvs+"" ""+targetAvi+""";
					System.out.println(Command);
					Process p = Runtime.getRuntime().exec(Command);
					Thread.sleep(1000);
				}
			} catch (IOException e){
				e.printStackTrace();
			} catch (InterruptedException e){
				e.printStackTrace();
			}
		}
	}
	public static String stripExtention(String FileNamewExtension){
		char[] name = FileNamewExtension.toCharArray();
		int lastLoc = -1;
		for (int i = 0; i < name.length; i++)
			if (name[i]=='.')
				lastLoc = i;
		if (lastLoc == -1)
			return "";
		else
			return FileNamewExtension.substring(0,lastLoc);
	}
	public static void makeAvs(String avsFile, String srcFile){
		try {
			File target = new File(avsFile);
			target.delete();
			target.createNewFile();
			FileWriter fw = new FileWriter(target);
			fw.append("DirectShowSource(""+srcFile+"", audio=false, fps=29.970, convertfps=true)"+System.getProperty("line.separator"));
			fw.append("Lanczos4Resize(720,480)"+System.getProperty("line.separator"));
			fw.close();
		} catch (IOException e){
			e.printStackTrace();
		}
	}
	public static void Prepare(File directory){
		for (File a : directory.listFiles()){
			String name = a.getName();
			int lastLoc = -1;
			char[] chars = name.toCharArray();
			for (int i = 0; i < chars.length; i++){
				if (i=='.')
					lastLoc = i;
			}
			if (lastLoc == -1)
				continue; //No periods in file, thats ok... I guess...
			name = name.substring(0,lastLoc).replace('.', '_') + name.substring(lastLoc);
			//System.out.println(name);
			a.renameTo(new File(directory.getAbsolutePath()+"/"+name));
		}
	}
}

and this avs2avi is REALLY FAST :D I'm editing like a speed demon~ *happiness*

User avatar
taifunbrowser
Joined: Sat Sep 11, 2004 7:39 pm
Location: DDR ARCADES
Contact:
Org Profile

asdf

Post by taifunbrowser » Sun Jul 01, 2007 7:51 am

if you want to run the above code, just download eclipse, make a new java project, make a new class, and hit ALT+SHIFT+X to run.

My case is that avs2avi is better than makeavis because makeavis sometimes gives me "frame jiggle" on this computer, whereas I havent had this problem (yet) with avs2avi...

and, mainly that avs2avi is commandline usable, so batchscripts like the one I posted are easy.

I.E., someone add avs2avi to the guides :P because it works

OH and it has this cool feature where after installing the plugin, if you right click on any .avs file, it says "Wrap to avi" as a right-click option :D that makes it worthwhile right there (of course, as posted above, batching whole folders of all the eyeshield 21 ever existant in full HD format is much more fun :D)

User avatar
Zarxrax
Joined: Sun Apr 01, 2001 6:37 pm
Contact:
Org Profile

Post by Zarxrax » Sun Jul 01, 2007 10:49 am

Um, avs2avi and makeavis/vfapi are completely different things. Makeavis/vfapi just wrap the avs script inside an avi container. Avs2Avi actually ENCODES the avs into an avi file. Its the same as loading the avs into virtualdub and encoding it.

Locked

Return to “Video & Audio Help”