In order for a video clip to be shown on a webpage, you’ll need to convert it to a FLV flash format, which the file has the .flv extension
As this format can be played across many browsers (which have the FLASH plugins), such as FireFox, IE and Opera etc, without needing an external video player to be installed and it’s well compressed to suit the web bandwidth. But of course, buffering will occur a few times in between if you have slow bandwidth.
Here is the quick tip, if you wanna get your video clips off your camcorder or any digi cams, such as exported from these devices in the .AVI or .MPEG4 formats etc, and you now wanna convert it into the .FLV Flash video, you can then use any FLV Video encoder to do so.
After converting the files, lets take an example, such as you’ve output a file called “MyBirthdayVideo.avi” from your digital camera. After you’ve converted to the .FLV format. Lets say the file is now called “MyBirthdayVideo.flv”, you can then place that file onto your web server. In this example, I assume your web server’s document root is /usr/local/apache/htdocs, and you have a subfolder called “videos” under the root directory. So in order to show the above “MyBirthdayVideo.flv” on a webpage named “video.html”, you can just embed in the following codes:
Adjust the width and height for the default size to show on the page. And also set the parameter “autoStart”, if you wanna have the video auto start. Please note the “file” parameter also can be a absolute URL which starts with “http://”, if you don’t put the videos under the subfolder of the web page’s root directory.
If you just consider on how to manually convert these videos, you can use various ready FLV encoder software to convert the video sources into FLV format. A few that I’ve found are as follows, which you can try out:
1. Riva VX, seems free but asking for donation
2. Ffmpegx, which works on MAC only.
3. Taka Flu Encoder, this is free
4. Or Google for FLV encoder for more.
If you want more intelligent stuff, auto-conversion, you can also program a few PHP pages, for letting users upload a video clip from the digital cameras or camcorders. And one of your PHP pages, shall do the conversion automatically, and subsequently generates the above <objec></objec> tag pairs for doing so.
FFMpeg that could work under Linux shell environment would allow you to do so, by having PHP to call and run it for converting the video source after it’s got uploaded to your web server. I’ll probably include one example later in a PHP tutorial if I’ve got time to build one.