Index: /gs2-extensions/video-and-audio/trunk/src/perllib/plugins/MultimediaPlugin.pm
===================================================================
--- /gs2-extensions/video-and-audio/trunk/src/perllib/plugins/MultimediaPlugin.pm	(revision 23291)
+++ /gs2-extensions/video-and-audio/trunk/src/perllib/plugins/MultimediaPlugin.pm	(revision 23292)
@@ -68,5 +68,6 @@
 	'list' => [{'name' => "disabled", 'desc' => "Do not create any video file optimised for streaming over the Internet."},
 		       {'name' => "flv", 'desc' => "Uses the FLV format for streaming media. Better to target old computers."},
-		       {'name' => "mp4", 'desc' => "Uses the MP4 container with H264 and AAC codecs. Better quality at very low bitrates but more ressources intensive."}],
+		       {'name' => "mp4", 'desc' => "Uses the MP4 container with H264 and AAC codecs. Better quality at very low bitrates but more ressources intensive."},
+			   {'name' => "direct", 'desc' => "Uses the original video file for direct streaming. The video player should be compatible with the format used!"}],
 	'deft' => "disabled",
 	'reqd' => "no" }];
Index: /gs2-extensions/video-and-audio/trunk/src/perllib/plugins/VideoConverter.pm
===================================================================
--- /gs2-extensions/video-and-audio/trunk/src/perllib/plugins/VideoConverter.pm	(revision 23291)
+++ /gs2-extensions/video-and-audio/trunk/src/perllib/plugins/VideoConverter.pm	(revision 23292)
@@ -1168,4 +1168,67 @@
 }
 
+sub enable_direct_streaming
+{
+    my $self = shift (@_);
+    my ($doc_obj,$originalfilename,$filename,$file,
+	$video_width,$video_height) = @_;
+
+    my $section = $doc_obj->get_top_section();
+    
+    my $ifilename = $originalfilename || $filename;
+	#my $ifile = $self->gsdlhome_independent($ifilename);
+	my $ifile = $file;
+
+	print STDERR "Using the original video file for direct streaming: $ifile\n";
+
+	my $streamable_url = $ifile;
+	my $streamable_url_safe = $self->url_safe($streamable_url);
+	
+	my $outhandle = $self->{'outhandle'};
+
+	my ($vtype, $width, $height, $duration, $durationDisplay, $vsize,
+		$vcodec,$vrate,$fps,$atype,$afreq,$achan,$arate,$metadata_table) = identifyMI($ifilename,$outhandle,0);
+	#Add the most common metadata extracted by MediaInfo from the streamable video file
+	$doc_obj->add_utf8_metadata ($section, "tv.HQStreamingVideoFormat", $vtype);
+	$doc_obj->add_utf8_metadata ($section, "tv.HQStreamingVideoFileSize", $vsize);
+	$doc_obj->add_utf8_metadata ($section, "tv.HQStreamingWidth", $width);
+	$doc_obj->add_utf8_metadata ($section, "tv.HQStreamingHeight", $height);
+	$doc_obj->add_utf8_metadata ($section, "tv.HQStreamingDuration", $durationDisplay);
+	$doc_obj->add_utf8_metadata ($section, "tv.HQStreamingFPS", $fps);
+	$doc_obj->add_utf8_metadata ($section, "tv.HQStreamingVideoCodec", $vcodec);
+	$doc_obj->add_utf8_metadata ($section, "tv.HQStreamingVideoBitrate", $vrate);
+	$doc_obj->add_utf8_metadata ($section, "tv.HQStreamingAudioCodec", $atype);
+	$doc_obj->add_utf8_metadata ($section, "tv.HQStreamingAudioBitrate", $arate);
+	#$doc_obj->add_utf8_metadata ($section, "tv.HQStreamingFileBitrate", $vrate + $arate);
+	
+	my $get_max_metadata = $self->{'getMaximumMetadata'};
+	if ($get_max_metadata eq "true"){
+		foreach my $metaname(keys %$metadata_table)
+		{
+			my $metaval = $metadata_table->{$metaname};
+			$doc_obj->add_utf8_metadata ($section, $metaname, $metaval);
+		}
+	}
+	
+	#add the metadata for the resulting file that should be open inside the flash video player
+	$doc_obj->add_utf8_metadata ($section, "streamablevideo", $streamable_url_safe);
+	$doc_obj->associate_file($ifilename,$ifile,"application/octet-stream",$section);
+
+    my $flashwidth = $video_width;
+    my $flashheight = $video_height + 22;
+
+    if ($self->{'extract_keyframes'}) {
+	$flashheight += 100;
+    }
+
+    $doc_obj->add_metadata ($section, "flashwidth",    $flashwidth);
+    $doc_obj->add_metadata ($section, "flashheight",   $flashheight);
+     
+    $self->{'oflash_file'} = $ifile;
+    $self->{'oflash_filename'} = $ifilename;
+
+}
+
+
 sub enable_h264_streaming
 {
