 | 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
20 May 2008 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. Part 2 builds the basic application using CakePHP.
In this tutorial
This series was written with the developer in mind. You should be comfortable working
with PHP and Web applications. You don't need to be an expert, 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. We're going to be doing a lot of coding. We'll use CakePHP to jump-start the
application, and you'll start by baking out the basics of the application. We'll knock
down some of the basic user- and video-management stuff, then jump into the two
big problems to solve: the file upload and using the OpenFLV libraries to play the
videos. If you haven't completed Part 1 yet, go back and do that
before you begin.
Prerequisites
If you don't know anything about writing code, PHP, databases, etc., you will find this
series challenging. You should get up to speed on writing Web applications in
PHP first.
System requirements
To work with digital video in this series, you'll need to set up a few things; the
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. However, if you're adept at editing and converting
video on computers running other operating systems, you certainly may do so.
-
FFmpeg
— An open source command-line video-conversion utility.
-
Riva FLV Encoder V2.0 for
Windows
— A video-conversion utility for Windows that is
no-cost for the first 30 days of use.
- Wikipedia for .flv conversion programs for other platforms.
-
Red5
— A Java™-based open source Flash server.
-
JW FLV Media Player
V3.15
— A small embeddable Flash media player.
For the Web application, you'll also need the following:
- An HTTP server that supports sessions (and preferably
mod_rewrite). This series was
written using Apache V1.3 with mod_rewrite enabled.
- 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 for the
sake of ease, 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
|  | |  |