anyone excited to team up to create an enhanced video plugin for elgg?

i am beginning the process of creating a new version of 'videolist' for elgg and would appreciate assistance from anyone who can assist me.

features i intend to include:

  • on-server videos - integrated in with external videos (using the file plugin).
  • integration of a media player - currently i am using projekktor - though may possibly switch for stability reasons.
  • support for different sizes of video thumbnails from external sites.
  • support for more external sites than the default videolist support scope.
  • support for playlists (projekktor supports its own approach to youtube style playlists and also supports youtube videos directly, so youtube videos can be played inside your own themed media player).
  • many configuration options for the admin.
  • option: video river entries load as images and are replaced by a media player when clicked.

other features can be added too, however, these are my current list.

  • so far i have not succeeded with this approach.

    nginx applies a hierarchy of logic to the location blocks within the config files we create for sites. the hierarchy always uses location blocks that focus on specific types of file extension and ignores other ones that might also apply to the current request. so if i create a location block for a particular path (e.g. /stream/) that does not exist and attempt to use that as a redirection address via something like:

        location /stream/
        {
            root /var/www/data_dev;
            internal;
            add_header "stream" "mp4";
            mp4;
            mp4_buffer_size 4M;
            mp4_max_buffer_size 20M;
            gzip off;
            gzip_static off;        
        }

    then the result is that nginx just jumps to the .php location block in the nginx config and doesn't even use the /stream/ location block at all, because a php file is involved within the initial page handling request.

  • for reference, an nginx coder is assisting me and has pointed me to the idea that the PHP needs to support manually the handling of the byte-ranges header and other aspects for streaming to occur successfully.

    i just found this script which i might look at using: http://licson.net/post/stream-videos-php/

    i'd welcome any comments here

  • If you want to handle ranges in PHP, perhaps using http_send_file http://php.net//manual/pl/function.http-send-file.php would be simplest method. It does require additional lib, but looks like worth giving a shot. I wanted to have a look at it myself, but had more important stuff to do so far, so not sure how reliable it is.

  • hmm.. well, curiosity got me.. ;)
    i installed the dependencies pecl_http and some others that were asked for..
    restarted the services.. 
    now i am unable to access my dev site and there are no error messages or log entries.. just a message in the browser (of a form that i have never seen before):

    Unable to determine IP address from host name

    the hostname is still correctly stored in the /etc/hosts file.. i have no idea what occurred there.. lol

  • ah, the problem was a browser extension in chromium.. nothing to do with this coding issue.

  • does anyone know from memory how izap videos resolved this issue of allowing streaming access to videos held in the elgg filestore?
    i'm finding the task of writing explicit nginx configurations to support elgg authentication and streaming to be deeply unpleasant!

  • Hi 

    From memory izap converts the movie into a suitable format on the file store using fmeg.  

    It then uses a flash file to play the video.  I think the flash file streams the url of the video but it is very difficult to say because you don't have access to the source files for the flash player. You only have access to the compiled flash player.   That's where the magic happened for playing media.

    When I tried to replace the flash player with the video with a HTML5 movie element it just would not play

     

  • oh ok, i could install it here to look.. i just wondered if anyone had all the details.
    i already have an html video element correctly playing videos from the filestore, the problem is that i am unable to stream them (using seek and buffering with byte-range requests - as with youtube etc.).
    i'm not sure i've seen any of the formats streaming correctly from the filestore directly.. but converting the video to a streamable format is a solution i hadn't considered.. i'll look at that now.

  • hmm.. well, for some reason, flash files can be streamed successfully, directly from the filestore.. so that would be one solution.. to convert the file to be played into flash format..
    however, the resulting streaming is not as smooth as the mp4 equivalent.. and this essentially loses all the benefits of html5 video and non-proprietary software.
    maybe i will ask the videojs coders and also the nginx coders for opinions on this.
    i have no idea why flash works and mp4 doesn't...
    from what i can see, there are some calls to an external cdn for the flash player.