We Value Your Privacy

We and our partners use technology such as cookies on our site to personalise content and ads, provide social media features, and analyse our traffic. Click below to consent to the use of this technology across the web. You can change your mind and change your consent choices at anytime by returning to this site.

Update Consent
Loading ...

How to embed .m4v in html

Updated April 17, 2017

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 minimise any cross-browser compatibility concerns.

Loading ...
  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.

  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:

  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.

  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).

Loading ...

About the Author

Robert Allen has been writing professionally since 2007. He has written for marketing firms, the University of Colorado's online learning department and the STP automotive blog. He holds a bachelor's degree in anthropology from the University of Colorado at Boulder.

Loading ...