Log in

View Full Version : Video Clips HTML embeded



new_web
06-24-2006, 09:03 AM
Hello

Which is the best wasy to play small video clips from 30sec to about 2min?

I was thinking of playing them within a html page, a fix size.

Which is the best format avi or mpeg.

Where can I get either Javascripts or php scripts to play video clips.

Is streaming video better method?

djr33
06-24-2006, 08:14 PM
streaming video is annoying... it's a LOT more complex to set up (likely not worth your time) and is almost always only used to stop people from being able to get around the video.... you can get around it anyway.... so... not worth it.

I'd recommend .mov... QuickTime is a mac-based product but almost all windows users have QT as well, and I believe linux supports it just fine too.
AVI *can* be ok, but not with a good codec (compressor/decompressor... they keep your filesize down and quality up). The only codecs that will play on macs as well are the old ones; the new ones, like divx, etc, need to be added to the system for any system aside from windows, and a good deal of the time to windows as well.
QuickTime comes standard with a couple good codecs that should do well.
As for embedding them movie in a page, that's not always a good idea. It'll run your bandwidth down because it'll keep loading for everyone. If you just have a link and say "right click, save as", then they'll save the file to their computer, and can watch when the want, basically making it so that there is only one download per visitor, instead of a bunch.
Also, it might half load, or something, causing frustration from the visitor. Then they have to refresh the entire page... which would feel more annoying than just restarting a download (which is less likely to have problems anyway.)

And.. if you DO want to include it in a page, you just need to use embed/object tags.
For quicktime, something like this would work.... I found it when I needed one... can't promise it's the best, but it has worked for me, or at least worked a while ago... it might be outdated with new versions of QT if the plugin it points to is still the old one... should be fine, though... but either way, it will give you an idea of what to use:
<html>
<OBJECT CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" WIDTH="Wpx" HEIGHT="H+16px" CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0">
<PARAM NAME="controller" VALUE="TRUE">
<PARAM NAME="type" VALUE="video/quicktime">
<PARAM NAME="autoplay" VALUE="true">
<PARAM NAME="target" VALUE="myself">
<PARAM NAME="src" VALUE="URL">
<PARAM NAME="pluginspage" VALUE="http://www.apple.com/quicktime/download/indext.html">
<type="video/quicktime" BGCOLOR="#000000" BORDER="0" PLUGINSPAGE="http://www.apple.com/quicktime/download/indext.html"></EMBED></OBJECT></td>
</html>Insert width.
Insert height, but note that you'll need to add 16 so there is room for the playbar under your video (if your video is 240 high... make it 256...).
Insert the URL of the .mov file.
You might want to change other things too, but those are the only ones required.

Note that there are similar codes for other formats.



As for "javascript or php".... note that php is a serverside language and has nothing to do with video. The only thing it could do would be to output video, but that would put you right back at having a video file, and not knowing wha to do with it.
And note that javascript, which client side, and a lot closer to what you want, isn't needed.
All you need are the <object> & <embed> tags.


Also... you need to remember that video is the most intense thing in terms of space/bandwidth. You are only talking about 30sec-2min, so you're probably ok, but remember that it can add up fast, especially if you have a lot of visitors.


I mostly do video editing, etc, and web design is actually just part of that for me (setting up my website, etc), so feel free to ask more questions.... I'll probably know the answers.

new_web
06-26-2006, 07:27 AM
Thanks four reply. I've got enough information to experiment. Videos clips I'm thinking of uploading are from vidoe camera in mpeg format. I'll do a search for conversion programs from mpeg to mov.

djr33
06-26-2006, 07:33 AM
mpeg is fine.

It's usually fairly low quality, but if that is the original, then it's probably ok, unless they are too big.

mpg is nice because it is cross platform... works in windows media player, real player and quicktime.

Just isn't the best for quality vs. size.

mclark2112
07-16-2006, 12:05 AM
I have a question. Anyone know how to make a video page with an embedded plaer and a series of links to the right that can launch different videos in that player?

Like this:

431