Index: extensions/gsdl-video/trunk/perllib/plugins/MultimediaPlugin.pm
===================================================================
--- extensions/gsdl-video/trunk/perllib/plugins/MultimediaPlugin.pm	(revision 18556)
+++ extensions/gsdl-video/trunk/perllib/plugins/MultimediaPlugin.pm	(revision 18897)
@@ -97,8 +97,12 @@
 	my $result = `ffmpeg -h 2>&1`;
 
-
 	if (!defined $result || $result !~ m/^FFmpeg version/) {
 	    $self->{'ffmpeg_installed'} = 0;
-	    print STDERR $result;
+	    if (defined $result) {
+		print STDERR $result;
+	    }
+	    else {
+		print STDERR "Unable to find ffmpeg\n";
+	    }
 	}
 	else {
Index: extensions/gsdl-video/trunk/perllib/plugins/TimedHTMLPlugin.pm
===================================================================
--- extensions/gsdl-video/trunk/perllib/plugins/TimedHTMLPlugin.pm	(revision 18556)
+++ extensions/gsdl-video/trunk/perllib/plugins/TimedHTMLPlugin.pm	(revision 18897)
@@ -28,11 +28,13 @@
 package TimedHTMLPlugin;
 
-use videoconvert;
+##use videoconvert;
 
 use HTMLPlugin;
+use VideoConverter;
 
 sub BEGIN {
-    @TimedHTMLPlugin::ISA = ('HTMLPlugin');
-}
+    @TimedHTMLPlugin::ISA = ('HTMLPlugin', 'VideoConverter');
+}
+
 
 use strict; # every perl program should have this!
@@ -65,4 +67,5 @@
     if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
    
+    new VideoConverter($pluginlist, $inputargs, $hashArgOptLists);
 
     my $self = (defined $hashArgOptLists) 
@@ -80,4 +83,22 @@
     return bless $self, $class;
 }
+
+sub begin {
+    my $self = shift (@_);
+    my ($pluginfo, $base_dir, $processor, $maxdocs) = @_;
+
+    $self->SUPER::begin(@_);
+    $self->VideoConverter::begin(@_); 
+}
+
+
+sub init {
+    my $self = shift (@_);
+    my ($verbosity, $outhandle, $failhandle) = @_;
+
+    $self->SUPER::init(@_);
+    $self->VideoConverter::init(@_);
+}
+
 
 sub html_to_text
@@ -200,5 +221,5 @@
     my $time_num = scalar(@{$self->{'time_seq'}});
 
-    my $videoconvert = $self->{'videoconvert'};
+####    my $videoconvert = $self->{'videoconvert'};
 
     # excerpt from tim_pos -> time_pos + 2;
@@ -343,13 +364,13 @@
 
 		my ($ae_cmd,$omp3_filename,$omp3_file) 
-		    = $videoconvert->audio_excerpt_cmd($src_filename,
-						       $hh,$mm,$ss,$excerpt_len);
-		
-		my $ae_options = { @{$videoconvert->{'ffmpeg_monitor'}},
+		    = $self->audio_excerpt_cmd($src_filename,
+					       $hh,$mm,$ss,$excerpt_len);
+		
+		my $ae_options = { @{$self->{'ffmpeg_monitor'}},
 				   'message_prefix' => "Audio Excerpt",
 				   'message' => "Generating audio excerpt: $omp3_file" }; 
 		
 		my ($ae_regenerated,$ae_result,$ae_had_error)
-		    = $videoconvert->run_cached_general_cmd($ae_cmd,$omp3_filename,$ae_options);
+		    = $self->run_cached_general_cmd($ae_cmd,$omp3_filename,$ae_options);
 
 		push(@{$self->{'mp3_excerpts'}}, { 'omp3_file' => $omp3_file, 'omp3_filename' => $omp3_filename} );
@@ -591,5 +612,5 @@
     $self->{'media_base_dir'} = $media_base_dir;
 
-    $self->{'vob_duration_info'} = &videoconvert::vob_durations($media_base_dir,"1",$self->{'outhandle'});
+    $self->{'vob_duration_info'} = &VideoConverter::vob_durations($media_base_dir,"1",$self->{'outhandle'});
 
 ##    $self->hyperlink_timing_info($textref);
@@ -653,5 +674,5 @@
     my ($video_type, $video_width, $video_height, $video_duration, $video_size,
 	$vcodec,$vfps,$atype,$afreq,$achan,$arate) 
-	= &videoconvert::identify($src_filename, $outhandle, $verbosity);
+	= &VideoConverter::identify($src_filename, $outhandle, $verbosity);
 
     if ($vfps eq "unknown") {
@@ -701,7 +722,7 @@
 
     
-    my $videoconvert 
-	= new videoconvert($base_dir,$src_filename,$verbosity,$outhandle,$exp_duration);
-    $self->{'videoconvert'} = $videoconvert;
+###    my $videoconvert 
+###	= new videoconvert($base_dir,$src_filename,$verbosity,$outhandle,$exp_duration);
+###    $self->{'videoconvert'} = $videoconvert;
 
     #---
@@ -718,15 +739,15 @@
     #---
     my ($stream_cmd,$oflash_filename,$oflash_file) 
-	= $videoconvert->stream_cmd($src_filename,
-				    $video_width,$video_height,
-				    $streaming_quality, $streaming_bitrate, $streaming_size,
-				    $streaming_achan, $streaming_arate);
-
-    my $streamable_options = { @{$videoconvert->{'ffmpeg_monitor'}},
+	= $self->stream_cmd($src_filename,
+			    $video_width,$video_height,
+			    $streaming_quality, $streaming_bitrate, $streaming_size,
+			    $streaming_achan, $streaming_arate);
+
+    my $streamable_options = { @{$self->{'ffmpeg_monitor'}},
 			       'message_prefix' => "Stream",
 			       'message' => "Generating streamable video: $oflash_file" }; 
 
     my ($streamable_regenerated,$streamable_result,$streamable_had_error)
-	= $videoconvert->run_cached_general_cmd($stream_cmd,$oflash_filename,$streamable_options);
+	= $self->run_cached_general_cmd($stream_cmd,$oflash_filename,$streamable_options);
 
     $self->{'streamable_regenerated'} = $streamable_regenerated;
@@ -736,12 +757,12 @@
 	# Make video seekable
 	#---
-	my ($streamseekable_cmd,$ostreamseekable_filename) = $videoconvert->streamseekable_cmd($oflash_filename);
+	my ($streamseekable_cmd,$ostreamseekable_filename) = $self->streamseekable_cmd($oflash_filename);
 	
-	my $streamseekable_options = { @{$videoconvert->{'flvtool2_monitor'}},
+	my $streamseekable_options = { @{$self->{'flvtool2_monitor'}},
 				       'message_prefix' => "Stream Seekable",
 				       'message' => "Reprocessing video stream to be seekable by timeline: $oflash_file" }; 
 
 	if ($streamable_regenerated) {
-	    $videoconvert->run_general_cmd($streamseekable_cmd,$streamseekable_options);
+	    $self->run_general_cmd($streamseekable_cmd,$streamseekable_options);
 	}
 
@@ -783,5 +804,5 @@
 
     # open file
-    my $output_dir = $self->{'videoconvert'}->{'cached_dir'};
+    my $output_dir = $self->{'cached_dir'};
     my $cue_filename = &util::filename_cat($output_dir,"on_cue.xml");
 
@@ -867,14 +888,14 @@
     close(CUEOUT);
 
-    my $videoconvert = $self->{'videoconvert'};
+####    my $videoconvert = $self->{'videoconvert'};
     my $oflash_filename = $self->{'oflash_filename'};
     my $oflash_file = $self->{'oflash_file'};
 
-    my ($streamcuepts_cmd,$ostreamcuepts_filename) = $videoconvert->streamcuepts_cmd($oflash_filename);
+    my ($streamcuepts_cmd,$ostreamcuepts_filename) = $self->streamcuepts_cmd($oflash_filename);
 
     my $verbosity = $self->{'verbosity'};
     my $outhandle = $self->{'outhandle'};
 
-    my $streamcuepts_options = { @{$videoconvert->{'flvtool2_monitor'}},
+    my $streamcuepts_options = { @{$self->{'flvtool2_monitor'}},
 				 'message_prefix' => "Stream Cue Points",
 				 'message' => "Reprocessing video stream to add cuepoints on timeline: $oflash_file" }; 
@@ -883,5 +904,5 @@
 
     if ($streamable_regenerated) {
-	$videoconvert->run_general_cmd($streamcuepts_cmd,$streamcuepts_options);
+	$self->run_general_cmd($streamcuepts_cmd,$streamcuepts_options);
     }
 
