Why VS Code plays your MP4 without sound

You open a clip in the editor and get the picture, a seek bar, and silence. Nothing is misconfigured on your machine — VS Code genuinely cannot decode the audio track.

demo.mp4
A video clip playing in a VS Code editor tab, with a seek bar, volume slider and playback speed control.
AAC — no decoder in the webview audio via ffmpeg
Install from the Marketplace Open VSX Source

The cause is a missing AAC decoder

VS Code draws custom editors inside a webview, which runs on Electron, which builds on the open-source Chromium tree. That tree ships without the AAC decoder. AAC is patent-encumbered, and shipping a decoder means licensing it — Google pays for the codecs in the Chrome binary it distributes, and the open-source build everyone else compiles does not inherit that deal.

Nearly every .mp4 and .mov in circulation pairs H.264 video with AAC audio. The video track decodes fine. The audio track has nowhere to go, so a plain <video> element shows the picture and stays quiet. No error is raised, which is why it reads like something broken at your end.

A 30-second check: open a .webm file in the same editor. WebM carries Vorbis or Opus audio, which the open-source build does include. Sound on WebM and silence on MP4 means you are looking at the codec gap, not a broken install.

What the extension does instead

Video Player (with Audio) is free and MIT-licensed. Rather than wait for a decoder that is not coming, it routes around the gap:

  1. Serves the file from a loopback HTTP server that honours Range requests, so large clips stream instead of loading into memory.
  2. Runs ffmpeg in the background to pull the audio track out as MP3 — a format the webview can decode.
  3. Plays a muted <video> beside a hidden <audio> element and keeps the two in step, correcting drift as it goes so long clips do not slide apart.

What plays, and what needs ffmpeg

FormatAudio
.webmPlays as-is — nothing to install
.mp4 .mov .m4vExtracted with ffmpeg

WebM needing nothing covers Playwright test recordings, which are WebM — a failed test's video plays with sound the moment the extension is installed.

For MP4, MOV and M4V, ffmpeg has to be on your PATH. Without it the video still plays, just silently, and the player says so and hands you the command for your platform:

Install

It becomes the default editor for .mp4, .mov, .m4v and .webm. Opening one from the Explorer is all it takes.