[mythtv-commits] Ticket #11457: Mythweb unable to download video (not recordings) over 64.5mb

MythTV noreply at mythtv.org
Tue Mar 26 09:25:49 UTC 2013


#11457: Mythweb unable to download video (not recordings) over 64.5mb
-------------------------------------+----------------------------
 Reporter:  Thomas C <notchicken@…>  |          Owner:
     Type:  Bug Report - General     |         Status:  new
 Priority:  minor                    |      Milestone:  unknown
Component:  MythTV - General         |        Version:  0.26-fixes
 Severity:  medium                   |     Resolution:
 Keywords:  mythweb video download   |  Ticket locked:  0
-------------------------------------+----------------------------

Comment (by Thomas C <notchicken@…>):

 line 66 of /usr/share/mythtv/mythweb/modules/video/stream.ph is:

 {{{
  readfile("http://$Master_Host:$port/Content/GetVideo?Id=".$vid_id);
 }}}

 file contents:

 {{{
 <?php
 /**
  * Stream a music file
  *
  * @license     GPL
  *
  * @package     MythWeb
  * @subpackage  Music
 /**/

 // Yes, a db connection
     global $db;

 // Pull video ID
     $vid_id = $_GET['Id'];

 // Get filename
     list($fname) = $db->query_row('SELECT filename
                                      FROM videometadata
                                     WHERE intid = ?', $vid_id);

 // Mime type
     switch (substr($fname, strrpos($fname, '.'))) {
         case 'mpg':
         case 'mpeg':
             $mime = 'video/mpeg';
             break;
         case 'mp4':
             $mime = 'video/mp4';
             break;
         case 'ogg':
         case 'ogm':
         case 'ogv':
             $mime = 'video/ogg';
             break;
         case 'qt':
             $mime = 'video/quicktime';
             break;
         case 'webm':
             $mime = 'video/webm';
             break;
         case 'mkv':
             $mime = 'video/x-matroska';
             break;
         case 'wmv':
             $mime = 'video/x-ms-wmv';
             break;
         case 'flv':
             $mime = 'video/x-flv';
             break;
         default:
             $mime = 'applicatoin/octet-stream';
     }
     header('Content-Type: '.$mime);

 // Send the filename
     header('Content-Disposition: filename="'.$fname.'"');

 // Send data via the backend
     $Master_Host = setting('MasterServerIP');
     $port = _or(get_backend_setting('BackendStatusPort', $Master_Host),
                 get_backend_setting('BackendStatusPort'));
     if (stripos($Master_Host,':') !== false) {
         $Master_Host = '['.$Master_Host.']';
     }
     readfile("http://$Master_Host:$port/Content/GetVideo?Id=".$vid_id);

 // Nothing else to do
     exit;
 }}}


 I've tried adding:

 {{{
        case 'm4v':
             $mime = 'video/x-m4v';
 }}}

 to the file but made no difference.

-- 
Ticket URL: <http://code.mythtv.org/trac/ticket/11457#comment:3>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center


More information about the mythtv-commits mailing list