Puts an uploaded video on a page, with a play button, a scrub bar and a full-screen control. The player itself is Widget:Video; this template turns a file name into the address the player needs, which is what {{filepath:}} does, and works the MIME type out from the extension.
{{video|Doi2bib-demo-09NvK.mp4}} — 640 px wide, the default.
{{video|Doi2bib-demo-09NvK.mp4|900}} — the width in pixels. |size=900 and |width=900 are the same thing, and a px may be written after the number, as in |size=900px, so that it reads like ordinary image syntax. The height follows the clip's own shape, and a size wider than the column is capped rather than allowed to push the page sideways.
{{video|clip.mp4|loop=1}} — loops, and is muted, because a clip that repeats by itself must not also make a noise.
{{video|clip.webm|autoplay=1}} — starts by itself when the page is shown, and loops, muted: what an animation posted on 𝕐 wants.
{{video|clip.mp4|once=1}}—a one-off: plays once, by itself and muted, when it comes into view, stops on its last frame, and plays again at each click. No controls, the click being the control. For a short animation, like the cromulon on showme.
{{video|clip.mp4|poster=Clip-still.png}} — shows that still until the clip is played, instead of whatever frame the browser decides to show.
{{video|clip.mp4|alt=clip.webm}} — two sources. A browser plays the first one it can decode and ignores the rest, so the file named first is the one everybody capable will get; the second is the fallback. Upload both.
{{video|clip.mp4|align=left}} — the player is centred unless you say otherwise; left and right are the alternatives.
Both play on the desktop. The difference is at the two ends: MP4 (H.264) plays on every browser ever made, WebM (VP9) reaches 97% of them and fails on iPhones and iPads below iOS 17.4 and on Macs below Safari 16. If you upload only one file, that argues for MP4.
Size does not settle it, because it depends on the picture. For a screen recording — flat colours, sharp text, most of the frame unchanging — H.264 was the smaller file of the two, 196 kB against 284 kB at matched quality, measured on the example above. For continuous tone, gradients and photographic texture, VP9 wins comfortably. So: MP4 for screencasts, WebM for animations, and name whichever suits the clip first when you supply both.
The file may be named either way: Doi2bib-demo-09NvK.mp4 or File:Doi2bib-demo-09NvK.mp4 both work, since Template:Video/name strips the prefix. Brackets do not: this is a name, not a link.
Video is not an image as far as MediaWiki is concerned, so [[File:clip.webm|400px]] will not work — there is no TimedMediaHandler on this wiki, and the file page shows a download link and nothing else. This template is the way to play one.
An animated GIF remains a real option, and for a terminal recording it can beat both codecs: the same clip cut straight from the raw capture was 123 kB as a GIF. Then [[File:clip.gif|800px]] is all it takes, with no widget at all. Two rules if you go that way. Encode with dither=none, because dithering a near-black background turns a 130 kB clip into a 60 MB one. And watch $wgMaxAnimatedGifArea: width times height times frame count must stay under 130 million, or MediaWiki quietly serves the first frame as a still.