PDA

View Full Version : Highly Automated AutoGK


soapBAR
27th February 2008, 20:17
Hi, I've been using AutoGK for about 2 years now, and I was wondering - is there some method for queuing a massive number of files in AutoGK without having to manually add each one to the queue? The output AVIs all have the same settings (audio track 1/same size/same output dir/etc). I'm aware that len0x has said that he won't be making a CLI for AutoGK, I'm also aware of the one or two AutoIt scripts for AutoGK floating around, but to use those I'd have to make a complicated batch script, which would take just as long as queuing them manually. Ideally, if I could open the IFOs directly and it would queue into AutoGK, I could make a batch script for it in about 10 seconds flat. I've been through the forums (and google) and found nothing that could help me, apart from the AutoIt script (but again, making a batch script for that is nightmarish..)

Any suggestions/ideas/past experiences would be greatly appreciated :).

Wicky3D
6th March 2008, 13:27
Simply rename your movies to
Movie_1.mpg
Movie_2.mpg
Movie_3.mpg
etc.

Then AutoGK will search for more videos to encode with the same settings.

lakeuk
7th March 2008, 11:54
I've automated it by using an autoit script that a guy on the sagetv forum produced and a simple perl script I wrote:-


Create following directory structure on your c drive:-
my_vids
my_vids\mpg
my_vids\xvid
Down scripts (mpg2xvid.zip) from the following thread:
http://forums.sagetv.com/forums/showthread.php?t=17188
Take the file 'AutoGKAdd.exe' from the zip and place in my_vids
Install Perl 5.8 or older http://www.activestate.com/store/activeperl/download/
Paste my perl code below into a new file called 'add_to_autogk.pl' and save in 'my_vids'
Move any mpgs you want converted into 'my_vids\mpg\'
Launch 'add_to_autogk.pl' which should generate a batch file and start adding the files to AutoGk
Hit start on AutoGk and that's it you're all setup all you need to do in future is move the files, launch the perl script and then hit start on AutoGk


Assumsions:- AutoGk is installed in the default directory under Program_Files


#!/usr/bin/perl
use strict;

my $filename;
my $size = "80%%"; # comment: for size by percentage use %%
my $scriptdir = "C:\\my_vids\\";
my $indir = "C:\\my_vids\\mpg\\"; # comment: use two \\ for slashes
my $outdir = "C:\\my_vids\\xvid\\";
my $priority = 0;
my(@current_dir_list); # Array to store directory entries

opendir DIR, $indir or warn "Can't open $indir\n";
@current_dir_list = readdir DIR; # Get complete list of "top-level" names
closedir (DIR);

my $nameOfBat = "add_to_autogk.bat";

open(OUTBAT, ">$nameOfBat");
foreach $filename (@current_dir_list)
{
if ($filename =~ /mpg$/i) {print OUTBAT "AutoGKAdd.exe $size \"$indir$filename\" \"$outdir$filename\" $priority\n";}
}
close(OUTBAT);

# Execute created batch file
system("$scriptdir$nameOfBat");