#!/usr/bin/perl -w # # Note: Ensure the DivX codec is installed on the target Windows machine, else # Windows Media Player won't be able to decompress the video rendering it # blank. # $|++; use strict; use constant READSIZE => 1000*1024; # GVI file read blocksize my $buf; my $filename = shift || die "Need name of GVI file to convert"; open(IFILE, "${filename}.gvi") or die "Unable to open video file ${filename}.gvi: $!"; open(OFILE, ">${filename}.avi") or die "Unable to create output file ${filename}.avi: $!"; read IFILE, $buf, 16; print OFILE $buf; seek IFILE, 68, 0; # Skip over Google's header do { read IFILE, $buf, READSIZE; print OFILE $buf; } while (!eof(IFILE)); close OFILE; close IFILE; exit 0;