ATutor

Learning Management Tools







Pages:1 2 3 4 5 6 7 8 9 10 11 12 13 14 15


Playing big video files


  • 2007-01-08 13:51:41

    Playing big video files

    Hello,

    I wanted to play a big FLV file (33Mb). I tested to play this file in two systems: a local host server (running on my PC) and a distance server (running on a real Web server). The configuration of the two systems is more or less similar. However, the big video file can be viewed by Flash player only in the local system, not the distance one. I also tested a small FLV file (600Kb), and this file can be viewed by both systems.

    Please help. Thanks.
    Vu Minh Chieu

  • 2007-01-09 14:26:42

    Re: Playing big video files

    Hi Greg,

    In the distance Web server, I created a simple HTML file embedding the big FLV file and it worked well.

    Could you please tell me how ATutor functions when a file (FLV or JPG or any type) is loaded to the Web browser? Maybe I can find something from this information. I doubt that there would be a problem when ATutor loads a big file from the directory named "AT_CONTENT_DIR".

    Many thanks,
    Vu Minh Chieu

  • 2007-01-09 17:27:37

    Re: Playing big video files

    It should be no different than playing these files from other Web pages.

    This often involves using the flash/movie authoring tool to generating the HTML to embed the movie into an ATutor content page, then uploading the associated movie files into the course content directory with the file manager, then adjusting the links to point to those files in the associated content pages (not necessarily in that order).

    You may need to adjust the maximum upload values in the system's php.ini file, and adjust the maximun individual and total file sizes in Admin>Courses>Properties. The default values for these are are otherwise usually set to a small size.

  • 2007-01-09 23:52:19

    Re: Playing big video files

    I think this subject is interesting. Let me show and analyze a solution:

    - Suppose that my ATutor site is www.example.com/ATutor and I created the course content folder "course_content" inside the ATutor folder, meaning anyone can access to this folder from www.example.com/ATutor/course_content
    - I created a SWF file (myvideo.swf) in which a big FLV file is embedded. Both files are stored in www.example.com/ATutor/course_content/1
    - In ATutor, I used its authoring tool to create a content in which I wanted to insert the SWF file. At this point, there were two possibilities: (1) I used a relative link to the SWF file, that is "myvideo.swf", (2) I used an absolute link to the SWF file, that is "www.example.com/ATutor/course_content/1/myvideo.swf".
    - Both previous solutions worked well with small FLV files. However, only the second solution worked well with big FLV files (33Mb). Why?
    - I understand that the second solution is not perfect regarding security issue because anyone can access the video without an ATutor account.

    Please explain why the first solution did not work in that case and how to overcome this problem. If the problem is in the php.ini file, please show me exactly where. I do not think that the maximum upload option is a cause, because when I tested with the local host server in which this option was set to 16MB, it worked. I also modified the course size to 1GB and the max file size to 100Mb but it did not work.

    Thank you for continuing this discussion.
    Vu Minh Chieu

  • 2007-01-10 08:48:42

    Re: Playing big video files

    The ATutor file size settings will not override the php.ini settings.

    Use the search tool to find info on max_file_size. This issue has been covered many times.

  • 2007-01-10 15:16:43

    Re: Playing big video files

    I am sorry, I could not find anything with max_file_size. I do not think it would be a cause, because I tested the same ATutor code package on a local host server and it worked. I do not know how ATutor let the Web browser know the location of a file in the course content folder, because when I examined the source code of the HTML file, for example www.example.com/ATutor/content.php?cid=2, I did not see the absolute path to the video file.

    Chieu

  • 2007-01-10 17:28:58

    Re: Playing big video files

    Sorry, That should have been "upload_max_filesize"

    See this thread.
    http://www.atutor.ca/view/7/119/1.html

  • 2007-01-10 22:34:08

    Re: Playing big video files

    I do not have problem with uploading big files to ATutor. Because the distance Web server does not enable Zlib, I slightly modified the installation of ATutor so as to make ATutor function without Zlib enabled. Then, I directly copied the files from my PC to the course content folder handled by ATutor site. My question is that why ATutor worked well with big video files on a local host server but did not work on a distance Web server. Here are PHP infos of the two systems:
    Local host: see attached file "local_PHP_info.htm"
    Distance Web server: see attached file "distance_PHP_info.htm"

    I have a SWF file (2Kb) and a FLV file (33Mb) embedded in the SWF file.

    Vu Minh Chieu

  • 2007-01-11 10:40:21

    Re: Playing big video files

    You have memory limit enabled. You could disable it or increase it from 8mb to 80mb in your php.ini

    However, since you are using Apache 2 the best solution would be to enable x-Sendfile and use that.
    http://celebnamer.celebworld.ws/stuff/mod_xsendfile/

    Once the module is installed you can add 'x-sendfile' to the config table with the value 1. You might have to download ATutor 1.5.3.3 pl1 and copy the get.php file in place of yours to make use of that feature.

    Using x-sendfile will make Apache handle the request rather than PHP, which will be much faster.

    Enabling this Apache module should only be done if you are confidant in your server's security settings since it allows access to any file on the server regardless of location.

  • 2007-01-26 14:12:44

    Re: Playing big video files

    I've tried disabling the memory limit completely, and upping max_execution_time to 6 minutes, and I can't get the "big video" to work, only the small one worked.

    Looking at the transfer logs, here's what I see when I access the small video:

    141.213.234.109 - - [26/Jan/2007:12:48:03 -0500] "GET /themat/content.php?cid=5 HTTP/1.1" 200 14217 "http://grip.umich.edu/themat/content.php?cid=3" "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1"
    141.213.234.109 - - [26/Jan/2007:12:48:03 -0500] "GET /themat/get.php/small_video.swf HTTP/1.1" 200 90447 "http://grip.umich.edu/themat/content.php?cid=5" "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1"
    141.213.234.109 - - [26/Jan/2007:12:48:04 -0500] "GET /themat/get.php/ESP18mod/animation_3scenes.flv HTTP/1.1" 200 1714690 "-" "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1"

    Here's what I see when I access the large video:


    141.213.234.109 - - [26/Jan/2007:12:47:30 -0500] "GET /themat/content.php?cid=4 HTTP/1.1" 200 14437 "http://grip.umich.edu/themat/content.php?cid=3" "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1"
    141.213.234.109 - - [26/Jan/2007:12:47:31 -0500] "GET /themat/get.php/experimal_template.swf HTTP/1.1" 200 90528 "http://grip.umich.edu/themat/content.php?cid=4" "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1"
    141.213.234.109 - - [26/Jan/2007:12:47:31 -0500] "GET /themat/get.php/esp18mod.flv HTTP/1.1" 404 - "-" "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1"


    In the call to /get.php/, in the case of the small video, it includes the path to that contains the file ("ESP18mod"):

    GET /themat/get.php/ESP18mod/animation_3scenes.flv

    But in the case of the large video, it doesn't..

    GET /themat/get.php/esp18mod.flv

    Both animation_3scenes.flv and esp18mod.flv are located in

    /afs/umich.edu/group/acadaff/grip/resource/themat/1/ESP18mod.

    I checked several times and the path to the esp18mod.flv is correct.

    PLEASE CHECK get.php and tell me if you could find something.

    Vu Minh Chieu

  • 2007-01-26 15:25:30

    Re: Playing big video files

    Try adding the following line to include/lib/mime.inc.php

    [php]

    $mime['flv'] = array('video/x-flv', 'flv');

    [/php]

    I'm not sure it will make a difference, but its worth a try.

  • 2007-01-26 15:41:10

    Re: Playing big video files

    Or add the following line to the apache httpd.conf file or a .htaccess file placed in the root directory of ATutor.

    [php]

    AddType video/x-flv .flv

    [/php]

  • 2007-01-26 16:00:43

    Re: Playing big video files

    I tried the first suggestion but it did not work. I do not have admin rights so I could not try the second one now. Please remember that ATutor works well with small FLV files. And when locally installed, it also works well with big FLV files.

  • 2007-01-26 17:05:21

    Re: Playing big video files

    The admin of my ATutor have just sent me the following suggestion, please give feedback on that.

    "Are you in touch with the developers?

    Could you ask why they chose to do this in get.php @ line 119?

    echo @file_get_contents($real);

    rather than

    readfile($real);


    file_get_contents() reads the file into a string, which they are then echoing.
    readfile() reads a file and and outputs it to the output buffer directly (w/no need for echo()). It avoids the memory limit problem, because it's outputting the file as it's read as opposed to reading it into a string all at once, and then printing that string to the output buffer.

    At the very least, they should get rid @ at the beginning of @file_get_contents, because the @ tells the php interpreter to suppress all error messages associated with that call (which as made debugging this more difficult).

    I can get it working by upping the memory limit (I'm not sure why that didn't work for me earlier), but I'd like to see what they think about the file_get_contents() / readfile() change I'm proposing."

  • 2007-01-29 10:25:20

    Re: Playing big video files

    This issue has been added to our bug tracker and will be fixed in the next version.

    For now you can safely replace the file_get_contents() with the readfile() alternative.

  • 2007-01-29 11:05:51

    Re: Playing big video files

    Many thanks. Now it works very well.