Index: mythplugins/mythweb/modules/tv/tmpl/default/detail.php
===================================================================
--- mythplugins/mythweb/modules/tv/tmpl/default/detail.php	(revision 23446)
+++ mythplugins/mythweb/modules/tv/tmpl/default/detail.php	(working copy)
@@ -27,7 +27,7 @@
 
     if ($program && $program->filename) {
         $flv_w = setting('WebFLV_w');
-        $flv_h = intVal($flv_w / $program->getAspect()) + 20;  // +20px for the playback controls
+        $flv_h = intVal($flv_w / $program->getAspect()) + 25;  // +25px for the playback controls
     }
 
 /*
@@ -538,13 +538,13 @@
                         // this first PNG clip works as a splash image
                         {
                             url: '<?php echo $program->thumb_url($flv_w,0) ?>',
-                            scaling: 'orig'
+                            scaling: 'fit'
                             },
                         // Then we have the video
                         {
                             url: "<?php echo video_url($program, 'flv'); ?>",
-                            duration: <?php echo $program->length ?>,
                             autoPlay: false,
+                            scaling: 'fit',
                             // Would be nice to auto-buffer, but we don't want to
                             // waste bandwidth and CPU on the remote machine.
                             autoBuffering: false
Index: mythplugins/mythweb/modules/stream/stream_flv.pl
===================================================================
--- mythplugins/mythweb/modules/stream/stream_flv.pl	(revision 23446)
+++ mythplugins/mythweb/modules/stream/stream_flv.pl	(working copy)
@@ -83,7 +83,14 @@
                 "Can't do ffmpeg: $!\n${ffmpeg_command}";
         exit;
     }
-    print header(-type => 'video/x-flv');
+
+# Guess the filesize based on duration and bitrate. This allows for progressive download behavior
+    $dur = `ffmpeg -i $filename 2>&1 | grep "Duration" | cut -d ' ' -f 4 | sed s/,//`;
+    @times = split(':',$dur);
+    $length = $times[0]*3600+$times[1]*60+$times[2];
+    $size = int($length*($vbitrate*1000+$abitrate*1000)/8);
+
+    print header(-type => 'video/x-flv','Content-Length' => $size);
     my $buffer;
     while (read DATA, $buffer, 262144) {
         print $buffer;

