RSS Feed

How to Add Video to Website

Adding a video to a website is similar to adding any other file to a website. The fundamental difference is that the embed process is more detailed for a video than it is for an image because there is more being done. The viewer has the option of playing and pausing video while the image is going to appear regardless. Therefore, it is important to take care when adding the video to the website.

Before doing anything, determine if the target audience is going to be using an older browser or a newer browser. HTML tags have changed; therefore, using both the <embed> and <object> tags are important.

Upload the Video to the Site

The first step is to upload the video to the site. If this will be the only video, upload it to the main directory. Therefore, it’ll look like this:

mydomain.com/movie.avihow to add video to website How to Add Video to Website

The problem with this is that it clutters your main directory. Therefore, it doesn’t hurt to create a /video folder where all videos can be stored. It isn’t any more difficult to add a video in this format to a website, but it keeps the server organized, especially when dealing with multiple videos. Some sites upload hundreds of videos, so they even break it down into a format such as /video-date. Uploading a video to the video folder of your site will look like this:

mydomain.com/video/movie.avi

Adding the Video to the Website

Now that the video is officially on the server, the next step is to add the video to the website. This is known as embedding it. To embed the video into the website as a very basic style, use the following code:

<embed src=”http://mydomain.com/video/movie.avi” autostart=”false” />

This creates a video that will pop up on the website and to play, the user will have to hit the play button. However, there are other features that can be added to make it look better. The first are video sizes. Another is the amount of times the video plays. Another is whether or not they can control the volume. The HTML for this would look like:

<embed src=”mydomain.com/video/movie.avi” width=”300″ height=”250″ playcount=”2″ controller=”true” />

This code will display a video in a 300×250 box with a repeat of 2 times and control over the volume. In a new browser, the code would look like:

<object width=”300″ height=”250″>

<param name=”src” value=”name of video” />

<param name=”controller” value=”true” />

<param name=”autoplay” value=”true” />

This code will create a video with 300×250 with a automatic launch of the video and the ability to control the volume.

Embedding Video from YouTube

The easiest way to embed a video is to upload it to YouTube and then embed that uploaded video. It provides a code to copy and paste into the HTML of a specific file on the website. For example, if one wanted a video on the index page, they’d copy and paste the code onto the index.html page. The reason for doing this is because the video is no longer hosted on one’s own server which can greatly reduce the load on the server. It also ensures that the site doesn’t slow down, as YouTube can handle tremendous amounts of traffic due to massive servers being employed; this is far beyond the capacity of an individual server of a particular website.

Respond to “How to Add Video to Website”
  1. marlon says:

    @James Rogers, just give it a shot. For sure you’ll learn a lot of thing from this site. If you have questions, just let us know.

  2. prakash sabade says:

    hi james
    please tell me how to add my document to web site please reply
    prakash

Leave a Reply

Post your comments and questions below, but please follow our commenting guidelines.


Path: Home > Internet > Web Publishing > How to Add Video to Website