How to Play an AVI on Your Website

Getting video content on a website has always been a challenge, since video files are large and resource heavy. Sites such as YouTube have tried to ease such a task with embedding tools, but most Web designers agree that flash video does not offer the quality or reliability that other video codecs do. Luckily though, HTML5 now supports a video element tag, meaning you can use most video containers, such as .mp4 or .avi.

Things You'll Need

  • Text editor
  • Website
  • Video file
Show More

Instructions

    • 1

      Change the doctype of your index.html file to <!DOCTYPE HTML> to indicate to the browser that you are using HTML5. Save the file, and close it if you are not going to place the video in the index file.

    • 2

      Decide where you wish to place your .avi video file in your website. At this location, type: <video height="" width="" controls></video> . In between the quotation marks, enter the height and width values of your video. This will tell the browser how to render your video file.

    • 3

      Enter your video's location in between the two video tags. Your code should look something like this:

      <video height="620" width="480" controls>
      <source src="FILENAME.avi" type ="video/avi" />
      </video>

      Keep in mind that the dimensions of said video are merely for illustrative purposes and that "FILENAME.avi" would need to be replaced with the name of your video.

    • 4

      Save your index.html (or whatever .html document you are working in) to finalize all changes. The .avi file will now play on your website.

Tips & Warnings

  • At the moment, Safari, Chrome, and Firefox all support this implementation of Web video.

  • HTML5 is not officially the standard of Web development, meaning by employing this method, you will be ahead of the standards curve on the web. This shouldn't be much of an issue, as if a browser cannot recognize your code, it will merely default to HTML4, meaning users will still be able to use your site.

Related Searches:

References

Comments

You May Also Like

  • How to Post an AVI File on a Website

    AVI files are a video file format. You may have a video in the AVI file format that you want to place...

  • How to Install the QuickTime H.264 Codec

    H.264 is a type of MPEG-4 video compression, offering higher quality video in a smaller file size than MPEG-2 (standard DVD video...

  • How to Embed M4V Code

    The M4V video file can be embedded on a website in HTML code by using the <video> tag. This tag, introduced in...

  • How to Embed Audio in HTML

    Embedding audio in a blog or website can provide users with many benefits. You can set the website or blog to automatically...

  • How to Convert AVI to Play on iTunes

    AVI video files will not open in the iTunes media program. These video files will also not play on any video iPod....

  • How to Convert Flip Video to AVI

    Converting Flip video to AVI files is a matter of saving your Flip videos to your hard drive, downloading a free video...

  • How to Play AVI Files on a PPC

    Pocket PCs (PPC) running Microsoft's Windows Mobile operating system come with Windows Media Player Mobile, which is a scaled-down version of Windows...

  • How to Play AVI on Quicktime

    The AVI video file format is heavily used on PCs, but cannot be used on a Macintosh computer. To be able to...

  • How to Play AVI Films

    AVI (Audio Visual Interleave) files are computer video files with a .avi file extension that contain both audio and video data. AVI...

Related Ads

Featured