Skip to main content


developerWorks  >  Open source  >

Setting up your own on-demand video site with PHP, Part 1: Groundwork

On-demand video isn't just for entertainment -- Build an enterprise-ready on-demand video library with open source tools

developerWorks

Level: Intermediate

Duane O'Brien (d@duaneobrien.com), PHP developer, Freelance
Katie Horn (K4@engineering.phenomenauts.com), Developer, Freelance
Will Robot (willrobot@gmail.com), PHP Developer, Freelance Writer

01 Apr 2008

Register now or sign in using your IBM ID and password.

Setting up your own on-demand video site doesn't have to be complicated. Upload some videos and put them up for people to watch. Easy enough. But if you're going to be doing a lot of videos, you'll need a way to keep them organized. This three-part "Setting up your own on-demand video site with PHP" tutorial series will take you through what you need to know to create video optimized for the Web, as well as creating a PHP application that will keep your videos organized and readily accessible. Part 1 lays the groundwork by assembling and installing the necessary components and gathering and converting the video.

In this tutorial

This series is written with the developer in mind. You should be comfortable working with PHP and Web applications. You don't need to be an expert to go through this series, but not a lot of time will be spent explaining PHP syntax and Web application concepts. If you're unfamiliar with either, but keen to learn, feel free to dive right in. It wouldn't hurt to have some basic understanding of digital video, but we'll explain most of what you need to know.

In Part 1 of a three-part series on creating an on-demand video site with PHP, we begin by looking at the different flavors of digital video and their particular nuances. When creating video for the Web, the overarching issue you need to keep in mind is whether you want your video to be small and easy to download or whether you want it to be the best quality possible. We'll also look at converting your video to the Flash Video (FLV) format and examine some options for streaming. There's not a lot of coding to be done at this stage, but we do have to get the framework installed and set up the database.


Prerequisites

See System requirements below


System requirements

To work with digital video in this series, you'll need to set up a few things. (installation of basic components won't be covered here):

  • Some digital video content — It can be video you've found, shot, or imported from another medium.
  • A Microsoft® Windows® XP box — The examples provided use some software written for Windows XP.
  • FFmpeg is an open source command-line video-conversion utility.
  • Riva FLV Encoder V2.0 for Windows is a video-conversion utility that is no-cost for the first 30 days of use.
  • Wikipedia for FLV-conversion programs for other platforms.
  • Red5 is a Java™-based open source Flash server.
  • JW FLV MEDIA PLAYER V3.15 is a small, embeddable Flash media player.

For the Web application, you'll also need:

  • An HTTP server that supports sessions (and preferably mod_rewrite). This series was written using Apache V1.3 with mod_rewrite enabled.
  • Download the 1.2 beta version of CakePHP.
  • PHP V5.1.4 or greater. Not all the frameworks being examined require this release level of PHP, but all frameworks will use the same PHP installation. This series was written using PHP V5.2.3.
  • A reasonably recent version of MySQL. Several other database options are available and supported, but both this series and the sample application were written using MySQL V5.0.37.


Formats

html, pdf


Share this....

digg Digg this story del.icio.us del.icio.us Slashdot Slashdot it!


Back to top


Document options

Document options requiring JavaScript are not displayed


My developerWorks needs you!

Connect to your technical community


More in this series:
Setting up your own on-demand video site with PHP