How to Embed .M4V in HTML

Video stored in .m4v format can be embedded in websites to share them with your friends.

M4V is a file format, similar to .mp4 with the addition of optional DRM support, developed by Apple to store video information; as such, it can be embedded in a Web page for viewing on any computer that has Apple's QuickTime plug-in installed. To embed a .m4v file, include a reference to it in HTML "" and "" tags; by using both, you can minimize any cross-browser compatibility concerns.

Step 1

Open the file containing your Web page's source code — this is a plain-text file probably ending in the extension ".html" or ".php." Use a simple text editor such as Nano, TextEdit or Notepad to perform your editing.

Step 2

Scroll down to the location in the document where you want to embed the .m4v file. Copy and paste the following code directly into this location, making no changes:

Step 3

Use the "Find" function of your text editor to locate the two parts of the code containing the string "example.m4v." Leave the quotes, but replace everything inside them with the location of your movie; for example, if the file was "movie.m4v" located in the "movies" subdirectory of your website, you would write "movies/movie.m4v" — both relative addresses and absolute addresses (beginning with "http://") are acceptable.

Step 4

Find and replace the two instances in the code where width="320" height="256" is written. Replace the "width" value with the actual width, in pixels, of the movie file, and replace the "height" value with the height of the movie plus 16 pixels (to account for the height of the video control bar).