MCCC CIS 177 - Markup Languages

Multimedia

Work with Video

Overview

A video file is composed of frames, where each frame represents a single image that the video player plays in sequence. The number of frames shown in each unit of time is called the frame rate and is expressed in frames per second (fps). The higher the frame rate, the better the quality and the larger the file. You can reduce the size by reducing the frame rate. Another way of reducing file size is with the use of a codec (compression/decompression).

Common video file formats include: ASF (Microsoft to replaice AVI), AVI, MPEG, QuickTime (Mac), RealVideo.

Add Video to a Web Page

Link a video file

You can link to a video the same way you can to an audio file using the <a> anchor tag:

<a href="URL">Play video (size - format)</a>

Edit raintxt.htm and add the following code in the blockquote:

<a href="mrim.avi">Summit Flyby (187K - AVI)</a><br>
<a href="mrim.mov">Summit Flyby (215K - MOV)</a>

Save the file and test the links in the browser.

Embed a video file

You can also embed a video file into a Web page using the <embed> tag. In older browsers that do not support the <embed> tag, you can have the browser display an image instead:

<embed src="URL width="value" height="value" autostart="value" align="value">
<noembed>
<img src="URL" align="value">
</noembed>

Edit raintxt.htm and add the following code in the blockquote:

<embed src="mrim.avi" width="200" height="200" autostart="false" align="left" hspace="5">
<noembed>
<img src="mrim.jpg" align="left" hspace="5" vspace="1">
</noembed>

Save and test the file in the browser.

Use dynsrc attribute

In IE 3 and above, you can have an image act as a trigger to a video using the dynsrc attribute:

<img dynsrc="URL" src="URL" other attributes>

Edit raintxt.htm and add the following code in the blockquote:

<img dynsrc="mrim.avi" src="mrim.jpg" align="right" hspace"5" vspace="1">

Save and test in the browser.