Ticket #8017: mythweb.diff
File mythweb.diff, 2.3 KB (added by , 14 years ago) |
---|
-
mythplugins/mythweb/modules/tv/tmpl/default/detail.php
27 27 28 28 if ($program && $program->filename) { 29 29 $flv_w = setting('WebFLV_w'); 30 $flv_h = intVal($flv_w / $program->getAspect()) + 2 0; // +20px for the playback controls30 $flv_h = intVal($flv_w / $program->getAspect()) + 25; // +25px for the playback controls 31 31 } 32 32 33 33 /* … … 538 538 // this first PNG clip works as a splash image 539 539 { 540 540 url: '<?php echo $program->thumb_url($flv_w,0) ?>', 541 scaling: ' orig'541 scaling: 'fit' 542 542 }, 543 543 // Then we have the video 544 544 { 545 545 url: "<?php echo video_url($program, 'flv'); ?>", 546 duration: <?php echo $program->length ?>,547 546 autoPlay: false, 547 scaling: 'fit', 548 548 // Would be nice to auto-buffer, but we don't want to 549 549 // waste bandwidth and CPU on the remote machine. 550 550 autoBuffering: false -
mythplugins/mythweb/modules/stream/stream_flv.pl
83 83 "Can't do ffmpeg: $!\n${ffmpeg_command}"; 84 84 exit; 85 85 } 86 print header(-type => 'video/x-flv'); 86 87 # Guess the filesize based on duration and bitrate. This allows for progressive download behavior 88 $dur = `ffmpeg -i $filename 2>&1 | grep "Duration" | cut -d ' ' -f 4 | sed s/,//`; 89 @times = split(':',$dur); 90 $length = $times[0]*3600+$times[1]*60+$times[2]; 91 $size = int($length*($vbitrate*1000+$abitrate*1000)/8); 92 93 print header(-type => 'video/x-flv','Content-Length' => $size); 87 94 my $buffer; 88 95 while (read DATA, $buffer, 262144) { 89 96 print $buffer;