Choose a Smaller Video for a Web Page
Admin ·
Make two copies from the same video when choosing a file for a web player. Compare bytes and image detail at the width your audience sees, then test the format on the devices you support.
Compare two sizes using the four-second video
Choose Load practice video or open the linked four-second MP4. Select 360p Mobile (500 kbps) for Web quality preset, keep WebM and leave Override video bitrate (kbps) blank. Choose Compress for Web. This setting brings the 960 × 540 px source to 640 × 360 px.
Save the file, then export the same source at 480p Standard (1,000 kbps) in the same format. The larger preset produces 852 × 480 px after rounding to even dimensions. Compare Saved file and the codec shown in each result. Play both copies at the intended page width, checking fine detail and the final second.
Open Compress Video for WebDownload the four-second practice MP4WHATWG HTML video element
Serve the chosen container with its media type
Match the file and media type in the HTML source. Serve a WebM as video/webm and an MP4 as video/mp4. If you host both files, list the preferred source first and the fallback second.
Use the actual filenames of the tested outputs, or rename both the file and its path in the player. Check the response headers in your browser's network panel.
<video controls preload="metadata" playsinline>
<source src="clip.webm" type="video/webm">
<source src="clip.mp4" type="video/mp4">
</video>WHATWG HTML video elementWebM Project container guidelinesIANA MP4 video media type
Test the output on the page where people will watch
Open the page in the browsers you support. Start playback, seek near the end and check the file your browser selected. Inspect whether the scene retains readable details at both desktop and phone widths.
If your source includes dialogue, keep audio enabled and check it in the hosted file. For a silent visual, compare the size with audio disabled. Page loading also depends on the surrounding content, playback settings and server.
Common questions
Will the lower setting always be a fixed number of megabytes?
Settings affect dimensions and encode choices. Duration, movement and the selected codec affect the saved size. Use the measured output.
Can I use only one source in the video player?
Use one if it plays on your supported devices. A second format can cover a device or browser that cannot play the first.