What's the best way to embed and play MP4 videos directly in HTML without external platforms?

Hey everyone! I need some help with creating a custom video player for our internal website. We have several MP4 files that need to be played directly on our company intranet pages. Instead of using external video hosting services, I want to build something simple but functional that can handle basic video playback.

I’m looking for a straightforward HTML solution that can:

  • Play MP4 files smoothly
  • Show basic controls like play/pause
  • Work well across different browsers

Does anyone have experience with this? A simple code example would be really helpful. Thanks!

the basic video tag works great, but add playsinline for mobile - otherwise ios forces fullscreen mode which is terrible on company networks. also watch your file sizes. anything over 50mb will timeout on slow connections.

Yes, HTML5 <video> is your best option for embedding MP4s. You can use the following code snippet: <video controls width="800" height="600"><source src="your-video.mp4" type="video/mp4">Your browser does not support the video tag.</video>. Ensure your MP4s are encoded with the H.264 codec for compatibility across all browsers. Additionally, using preload='metadata' can help reduce bandwidth usage on your intranet. It’s also wise to test different file sizes to ensure smooth playback, particularly on older browsers.

I’ve dealt with this for three years at my company. The HTML5 video tag is just the start - your server config matters way more than people think. Enable HTTP range requests so users can jump around the video without downloading the whole thing first. Throw in a poster attribute for a thumbnail while it loads. Looks way more professional.

Here’s what bit me: don’t just use MP4. Yeah, it works great, but keep a WebM backup for weird browser issues. The controls attribute gives you basic browser controls, but you can hide them later and build custom ones with JavaScript if needed.

Been there with company video deployments. HTML5 works but gets messy when you’re dealing with multiple videos across departments.

After dozens of internal video projects, I learned manual HTML coding is a nightmare. Every time someone wants to add a video or change player settings, you’re back editing code.

I switched to Latenode to automate the whole thing. Set up a workflow that reads your MP4 list from a spreadsheet or database, then generates the HTML with proper video tags, fallbacks, and handles file validation automatically.

Best part? When new videos hit your server folder, Latenode detects them and updates your web pages. No more manual editing when marketing dumps new training videos.

You can build logic that picks different video qualities based on connection speed or device. Way cleaner than hardcoding everything.

Had the same issues building our training portal last year. HTML5 video works fine for basic stuff, but performance tanks on internal networks when you’ve got tons of users hitting it at once. Everyone’s missing the compression piece though. Your encoding bitrate matters way more than people think, even with H.264. We stick to 2-3 Mbps for 1080p - keeps things smooth during busy times without the constant buffering. Throw in muted autoplay if you want videos starting automatically. Browsers won’t autoplay with sound anymore, so you need the muted part. And keep your MP4 resolutions consistent across everything - makes the player look cleaner and load more predictably. Don’t skip the fallback text either. Corporate firewalls still block video codecs sometimes, so write something useful for when IT gets those support tickets.