Large videos for the web

Discussion in 'Web Design and Development' started by memco, Nov 11, 2009.

  1. memco macrumors 6502

    Joined:
    May 1, 2008
    #1
    I'm preparing to launch a small site that will host 9 hour+ long video files. I'm trying to encode them in a way that gets decent performance, but right now it's taking more than 10 minutes for the video to even load. What's the best way to get relatively quick playback even if the videos are extremely long?

    Right now, I think I like a 496 bitrate with a resolution of 480x320 and 12 FPS in an h.264 encoded mp4. On my page though, I have several different settings that you can also check out. You can see what I've got currently at alcondemand.com using "help@alcondemand.com" for the email and "help" for the password. Thanks for any advice.
     
  2. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #2
    My first thought is to stream the video, that way it can start playing before the entire thing is loaded. I don't mess with video so not sure what it takes to set that up.
     
  3. SrWebDeveloper macrumors 68000

    SrWebDeveloper

    Joined:
    Dec 7, 2007
    Location:
    Alexandria, VA, USA
    #3
    There are two general methods to deliver video using HTTP.

    Progressive downloading and streaming (multicast).

    Before discussing compression, note that progressive download allows the user to watch the video while portions are downloaded and cached in the user's temporary Internet files. Streaming does not involve caching and typcially requires software on the server side to handle the connection which is usually multicast UDP and intended for live video feeds.

    Progressive players cannot automatically adjust for the end user's connection speed and the data isn't secure in the sense it does ends up on the client's computer. Streaming players offer faster initial playback and the user can skip to any position and the connection is optimized better.

    I suggest you look into progressive download techniques since you're working with stored videos, although lengthy in time and large in file size. Flash players since version 7 support progressive downloading with numerous user friendly controls and themes.

    In terms of compression, you should focus on the H.264 standard, which means the MPEG-4 format with support for high definition. This is widely supported by Flash players and many popular player Plugins such as Quicktime and others. I lean towards using Flash players for the client side and using third party offline utilities that convert whatever current format directly to H.264 compatible .flv or embedded video in an .swf.

    Resources:

    Flash H.264 HD player (open source, source and demo links)

    Kandalu Mac OS X video compressor (creates H.264 videos, iPhone support also)

    Example - You'd purchase and install Kandualu to compress your current video format using H.264 and use the tools it provides for web site setup, or use a third party player Flash like the link I included above which you can customize for free.

    -jim
     
  4. memco thread starter macrumors 6502

    Joined:
    May 1, 2008
    #4
    Thanks for the advice. I've gotten a copy of FFMPEGX and am using that to create iPhone compatible MP4s that progressively download. By re-compressing using FFMPEGX I'm getting smaller file sizes and the videos are progressively downloaded. My first attempts at MP4 using iMovie/Quicktime Pro resulted in MP4s that had to be completely downloaded before the movie would start playing.

    I'm interested in streaming the videos so that people can seek through the clips as they please (and hopefully for faster loading). Dreamhost, our hosting company offers Quicktime streaming and supposedly supports PHP pseudo-streaming (using xmoov.php). So far, I haven't gotten the PHP pseudo-streaming to work and have not tried the QT streaming setup yet. Are there any benefits to one over the other? Any useful tutorials on setting up pseudo-streaming.
     
  5. SrWebDeveloper macrumors 68000

    SrWebDeveloper

    Joined:
    Dec 7, 2007
    Location:
    Alexandria, VA, USA
    #5
    "Seek through the clips as they please" requires streaming. In progressive downloading they can only skip ahead to what's been cached. As to psuedo-streaming, sorry, Google it unless nobody else responds. Sounds like you should invest in server based streaming software so you not only can control the bandwidth as you have large files, but you want users to be able to seek. Or host the content on a third party site that handles the multicasting for you, and pipes it through to the end user via your site or a link from your site. I do not have any suggestions on that, but something to consider.
     

Share This Page