MP4, MOV & MKV Viewer, Video Player with Sound
MP4, MOV & MKV Viewer, Video Player with Sound, a VS Code extension by Zovo
Click an .mp4, .mov, .mkv, .webm or .avi file and it plays in a video player inside VS Code with its sound, which VS Code's own player leaves out for AAC audio.
Free, MIT license. Needs VS Code 1.90.0 or newer. Extension ID zovo.video-preview-with-sound, version 0.2.5.
Version 0.2.5 plays AAC sound in MP4 and MOV with nothing to install, on Windows, Linux and macOS. A built-in decoder ships inside the extension. It also adds a picture-in-picture button (P).
Version 0.2.0 added three things. Videos VS Code can't decode, such as Apple ProRes, MPEG-4 Part 2 and AVI, are converted to H.264 with your ffmpeg and then play. Subtitles from an .srt or .vtt file next to the video show up by themselves. And each video opens where you stopped it last time.


Real output from VS Code 1.142 on macOS. The four new screenshots above and below come from the 0.2.0 VSIX installed in a clean VS Code profile, with test clips made by ffmpeg. scripts/e2e-vscode.mjs opened the 6-second sample from scripts/make-samples.js with this extension, clicked Play, set the loop with the A and B keys and took the window screenshot over the Chrome DevTools protocol. The webview measured the sound level at 0.12 RMS while it played. VS Code's own player gives 0 on the same file.
- You hear the sound, with no setup. VS Code can show H.264 video but has no AAC decoder, and most MP4 and MOV files use AAC. The extension carries its own decoder (Symphonia, compiled to WebAssembly, about 820 KB). It decodes AAC, ALAC, MP3 and PCM sound in a background thread and keeps the result in step with the picture. A 150-second AAC track took 0.2 s on an M-series Mac. For other sound, such as AC-3, E-AC-3, DTS or 5.1 AAC, it uses your ffmpeg or the afconvert that comes with macOS.
- Picture-in-picture. The PiP button (or P) floats the video over your other windows while the sound keeps playing.
- It's built for checking clips frame by frame. Step one frame at a time, play at 0.1× to 4×, loop between two points, and save the exact frame as a full-size PNG. The frame counter matches the frame number that ffmpeg burned into the test video.
- It converts what VS Code can't decode. A ProRes
.mov, an MPEG-4 Part 2.mp4, or an.avi,.wmv,.flv,.mpg,.ogvor.m2tsfile is turned into H.264 with your ffmpeg and plays. A 3-second 1080p ProRes test clip took 0.4 s. The chip shows the progress, and the copy stays in the cache, so the next open is instant. If a video still won't show a picture, the player converts it once by itself instead of leaving a black box. - Subtitles just work.
clip.srt,clip.vtt,clip.en.srtorclip.pt-BR.vttnext toclip.mp4load as you open the video. Press C or use the CC menu to switch tracks, turn them off, or load any other.srtor.vttfile. - It remembers where you stopped. Each video opens at the point you left it, with the same speed, and your volume carries over to the next video. A toast says "Resumed at 1:23", and Home goes back to the start.


- It opens MKV and WebM, which VS Code can't open at all. This needs ffmpeg on every system. The video stream is copied into MP4 without re-encoding (0.1 s for our samples) and plays with sound. MKV files with VP8, MPEG-4 Part 2 or MPEG-2 video are converted to H.264 instead.
Quick start
- Install Video Preview with Sound. MP4, MOV and M4V files with AAC sound play with no other install. For MKV, WebM, AVI and AC-3 sound, add ffmpeg:
winget install ffmpegon Windows,sudo apt install ffmpegon Linux,brew install ffmpegon macOS. - Click a video in the Explorer and press Space.
If VS Code asks which editor to use for .mp4, pick "Video Preview with Sound" (VS Code has its own simple preview too). Run "Video Preview: Get Started" from the Command Palette for a short tour.
Questions people ask
Is MP4, MOV & MKV Viewer, Video Player with Sound free?
Yes. MP4, MOV & MKV Viewer, Video Player with Sound is free and MIT licensed.
How do I install MP4, MOV & MKV Viewer, Video Player with Sound?
Click "Install in VS Code" above, or search for zovo.video-preview-with-sound in the Extensions view.
Why VS Code mutes your videos
VS Code's built-in Chromium ships with the H.264 video decoder but without AAC. We tested this on VS Code 1.142 (Electron 43, Chrome 150) before writing any player code. canPlayType and WebCodecs both say AAC is supported, but decoding fails, and the audio element reports 0 decoded bytes. MP3, FLAC and WAV sound do play. VS Code 1.142 also has no Matroska demuxer: an .mkv or .webm in its video element fails with "FFmpegDemuxer: open context failed", even with VP9 and Opus inside. So the extension reads the codec from the file header and picks one of these paths.
| The file has | What happens | Helper |
|---|---|---|
| H.264, HEVC or VP9 video with MP3 or FLAC sound | VS Code plays it directly | none |
| AAC (mono or stereo), ALAC, PCM or MP3 sound in MP4, M4V or MOV | the sound is decoded and plays next to the muted video | none (built-in decoder), or ffmpeg or afconvert if found |
| AC-3, E-AC-3, DTS, Opus or 5.1 AAC sound in MP4, M4V or MOV | the sound is decoded to FLAC and plays next to the muted video | afconvert (macOS) or ffmpeg |
| MKV or WebM | video copied into MP4, sound converted to FLAC, one file. VP8, Theora, MPEG-4 Part 2 or MPEG-2 video is converted to H.264 | ffmpeg |
| no audio track | plays, and the chip says "No audio track" | none |
ProRes, MPEG-4 Part 2, DNxHD or other video VS Code can't decode, and .avi, .wmv, .flv, .mpg, .mpeg, .ogv, .m2ts | converted to H.264 (libx264, or VideoToolbox or Media Foundation if your ffmpeg has no libx264), sound to FLAC | ffmpeg |
The decoded sound (FLAC from ffmpeg or afconvert, WAV from the built-in decoder) goes into the extension's own storage folder and is reused next time, so a file is only decoded once. The cache keeps the newest 2 GB by default. "Video Preview: Clear Sound Cache" empties it.

Controls
| Key | Action |
|---|---|
| Space or K, or click the picture | Play or pause |
, and . | One frame back or forward |
| Left and Right | 5 s back or forward (with Shift, 1 s) |
[ and ] | Slower or faster, 0.1× to 4× |
| A, then B | Set the loop start and end. The loop turns on and shows on the seek bar |
| L | Loop on or off |
| M | Mute |
| S | Save the current frame as a PNG at the video's full size |
| I | Show or hide the metadata |
| C | Subtitles on or off |
| Home | Back to the start |
The metadata panel shows container brands, duration, codec, frame size, frame rate, frame count, bitrates, sample rate, channels and language, read by mp4box.js from the file header. "Copy info" puts it on the clipboard as plain text. Frame PNGs get a name like clip-00m12s345-f370.png, so you can tell later where they came from.


Settings
| Setting | Default | What it does |
|---|---|---|
videoPreview.soundHelper | auto | auto uses ffmpeg if it's found, else afconvert on macOS, else the built-in decoder. ffmpeg, afconvert, builtin or off force one choice |
videoPreview.ffmpegPath | empty | Full path to ffmpeg. Empty means search PATH, /opt/homebrew/bin and /usr/local/bin |
videoPreview.decodeSoundAutomatically | true | Off means the helper waits for a click on "Turn on sound" |
videoPreview.maxDecodeSizeMB | 4096 | Bigger files still play, without sound, and the chip says why |
videoPreview.cacheSizeMB | 2048 | Disk space for decoded sound and remuxed files |
videoPreview.helperTimeoutSeconds | 900 | The helper is stopped after this long |
videoPreview.convertUnsupportedVideo | true | Convert video VS Code can't decode to H.264 with ffmpeg by itself. Off means a Convert button |
videoPreview.subtitles.autoLoad | true | Load .srt and .vtt files with the same name as the video |
videoPreview.rememberPosition | true | Open each video where you stopped it, and keep the volume |
videoPreview.autoplay | false | Start playing as soon as a video opens |
videoPreview.askForRating | true | Ask for a Marketplace rating after 3 files opened without an error on 2 different days. "Later" asks one more time after 7 days, "No thanks" never again. It never asks after an error. Turn it off with false. |
videoPreview.showSupportLinks | true | Show the small Sponsor and More free viewers links under the player controls |
Privacy and safety
The extension makes no network calls and has no telemetry. The webview runs under a strict Content Security Policy with no inline or remote scripts, and file names and metadata are only ever set as text. Nothing in a video file is run. The helper is started with an argument list and no shell, ffmpeg reads the input through file: so a crafted file name can't act as an option or protocol, and closing the tab stops it. In an untrusted workspace no helper starts until you click "Turn on sound". The built-in decoder still gives AAC sound there, because it starts no program: it is WebAssembly with no file or network access of its own, run in a worker thread that reads the one file in pieces. ffmpeg isn't bundled, so no GPL or LGPL code ships with this extension. The built-in decoder is Symphonia (MPL-2.0). Its source is in wasm/ in the repository.
Known limits
- Big files stream from disk and the picture starts at once, but the sound has to be decoded first. For a 1-hour AAC track that took 5.7 s with ffmpeg and 17.8 s with afconvert on an M-series Mac. The video plays muted until the chip says "Sound: on".
- FLAC is large. That 1-hour track became about 370 MB in the cache, so the 2 GB default holds roughly five hours of sound. The built-in decoder writes WAV, which is about twice that (11.5 MB a minute at 48 kHz stereo), so the cache holds about 3 hours of it.
- The built-in decoder plays HE-AAC from its AAC-LC core, at half the sample rate, so it lacks the top octave. Install ffmpeg for full HE-AAC, 5.1 AAC, AC-3 and DTS.
- Picture-in-picture closes when you switch to another editor tab, because VS Code unloads hidden players.
- The separate sound track is nudged when it drifts more than 0.02 s from the picture and moved back when it drifts more than 0.25 s. MKV and WebM stay tighter, because they play as one remuxed file.
- MKV and WebM with VP8, Theora, MPEG-4 Part 2 or MPEG-2 video can't play as a copy, so they are converted to H.264. On a long file that takes a while, like any conversion.
- Without ffmpeg, MKV and WebM don't open. The player says "Install ffmpeg to open this file" and offers Settings and Open in default app.
- HEVC needs hardware decoding, which macOS has. AV1 depends on your GPU.
- Remote and virtual workspaces play the video, but the helper only runs on local files.
- Converting needs your own ffmpeg; macOS afconvert can't convert video. Without ffmpeg the player says so and offers "Settings" and "Open in default app". Real footage converts slower than our test clip, and a long ProRes file can take minutes. The converted copy counts toward
videoPreview.cacheSizeMB, andmaxDecodeSizeMBandhelperTimeoutSecondsapply to it too. - Without libx264, ffmpeg falls back to VideoToolbox on macOS or Media Foundation on Windows at a fixed 8 Mb/s. On Linux use an ffmpeg with libx264.

.tsand.mtsfiles are never claimed, because those names are TypeScript files.- Subtitles come only from
.srtand.vttfiles, as plain text at the bottom of the picture: no styling or positions, at most 5 MB and 20,000 cues per file and 20 files per video. Subtitles inside the video file are not read. - Positions are kept on this computer for the 200 most recent videos. There is no resume in the first or last 5 seconds.
License
MIT. mp4box.js is BSD-3-Clause, see THIRD-PARTY-NOTICES.md.
Install MP4, MOV & MKV Viewer, Video Player with Sound
Click the button to open VS Code and install it, or press Ctrl+P (Cmd+P on macOS) in VS Code and run ext install zovo.video-preview-with-sound.
Free, MIT license. Needs VS Code 1.90.0 or newer. Extension ID zovo.video-preview-with-sound, version 0.2.5.
Source code and issues are on GitHub.
Support this work
If this extension saves you time, you can support the work on GitHub Sponsors. Monthly tiers start at $5, and one-time tiers start at $15. Sponsorship is optional, and the tool works the same without it.