Audio Player & WAV Player (MP3, FLAC, LUFS)

Audio Player & WAV Player (MP3, FLAC, LUFS), a VS Code extension by Zovo

Audio player and WAV player for VS Code: play WAV, MP3, FLAC, Ogg, Opus and M4A with a waveform, spectrogram, A-B loop and LUFS loudness. Offline.

Install in VS CodeOpen the Marketplace page

Free, MIT license. Needs VS Code 1.90.0 or newer. Extension ID zovo.audio-preview-vscode, version 0.1.3.

Click a WAV, MP3, FLAC, Ogg or Opus file and play it with a waveform, a spectrogram, an A-B loop and its LUFS loudness, right inside VS Code.

A 4 second WAV sine sweep open in Audio Preview. The left channel waveform is a sweep and the right channel is pink noise. The spectrogram shows the sweep rising from 20 Hz to 20 kHz, a loop region from 0:01.22 to 0:03.42 is on, and the Loudness panel reads -8.2 LUFS integrated, -7.3 short-term max, -5.6 momentary max, -6.0 dBFS sample peak and -12.0 dBFS RMS

Real output from VS Code 1.142 on macOS. The file is test/fixtures/sweep-44k-s16.wav, made by scripts/make-samples.sh. scripts/e2e-vscode.mjs opened it in a real VS Code window, pressed Space, [ and ], and saved the window through the debug port. ffmpeg's ebur128 filter measures the same file at -8.2 LUFS.

Quick start

  1. Install Audio Preview & Loudness Meter.
  2. Click any .wav, .mp3, .flac, .ogg, .opus or .m4a file in the Explorer. Press Space to play, then drag across the waveform to loop that part.

If a different audio viewer opens, right-click the file and pick "Open in Audio Preview", or use "Reopen Editor With..." from the editor title menu. "Audio Preview: Get Started" in the Command Palette opens a short tour.

Questions people ask

Is Audio Player & WAV Player (MP3, FLAC, LUFS) free?

Yes. Audio Player & WAV Player (MP3, FLAC, LUFS) is free and MIT licensed.

How do I install Audio Player & WAV Player (MP3, FLAC, LUFS)?

Click "Install in VS Code" above, or search for zovo.audio-preview-vscode in the Extensions view.

What you see

The header line gives the codec, sample rate, channels, bit depth, duration, bitrate and file size. Under it sit the transport controls. Play and pause, speed from 0.25x to 2x with the pitch kept, volume, and the loop buttons.

Each channel gets its own waveform lane, up to 8 channels. The spectrogram below it is drawn from a 2048 point FFT on a log frequency axis, so bass notes and hi-hats are both readable. Click anywhere to seek. Hover to read the time.

A FLAC synth loop with the loop region on. Chords and a kick drum show as stripes in the spectrogram, and the Loudness panel reads -13.5 LUFS

Three panels sit at the bottom. Loudness has the LUFS and dBFS numbers. File lists format details such as the Xing or LAME header of an MP3, the MD5 stored in a FLAC file, the Opus pre-skip and original rate, or the brand of an M4A. Tags lists title, artist, album, date, genre, track, comment, encoder and any custom fields, from ID3v1, ID3v2.2 to 2.4, RIFF INFO, Vorbis comments and iTunes atoms.

An Opus file decoded by the bundled WebAssembly decoder, with its waveform, spectrogram and loudness

Keyboard

KeyAction
SpacePlay or pause
Left, RightJump 5 s (1 s with Shift)
[, ]Set loop start or end at the playhead
LLoop on or off
HomeBack to the start of the loop or file
Double-clickClear the loop

Supported files

ExtensionDecoded byNotes
.wav, .waveThe extension, in chunksPCM 8, 16, 24 and 32-bit, float 32 and 64-bit, A-law, mu-law, WAVE_FORMAT_EXTENSIBLE, RF64
.flacVS Code (Web Audio)Any bit depth
.mp3VS Code (Web Audio)Gapless duration from the LAME header
.ogg, .ogaVS Code (Web Audio)Vorbis. Opus inside .ogg is detected and decoded as Opus
.opusBundled libopus (WebAssembly)Mono, stereo and multichannel mapping
.m4a, .aacYour ffmpeg, if you have itHeader and tags always show, see below

About AAC and M4A

VS Code ships Chromium without an AAC decoder, and we tested this in a real VS Code window. Web Audio and WebCodecs both refuse AAC there. We don't bundle a GPL or LGPL decoder. So for .m4a and .aac files the viewer shows the codec, duration, bitrate and tags, plus a clear message.

If ffmpeg is installed, a Decode with ffmpeg button appears. One click converts the file to a WAV copy in the extension's storage folder, and you get the full player and loudness meter. The copy is deleted after a day. Set audioPreview.ffmpegPath if ffmpeg isn't on your PATH. The setting is machine-wide and is ignored in untrusted workspaces, so a cloned repo can't point it at its own program.

An M4A file. The viewer explains that VS Code has no AAC decoder and still shows the codec, duration, bitrate and tags

Large files

SettingDefaultWhat it does
audioPreview.maxWavMB2048WAV files up to this size get the waveform, spectrogram and loudness. Bigger files still play and show their header
audioPreview.maxDecodedMB600Compressed files are decoded whole. Above this size of decoded samples (about 28 minutes of 44.1 kHz stereo) the file only plays
audioPreview.maxRemoteFileMB512Files in remote or virtual workspaces are read whole
audioPreview.ffmpegPathffmpegYour own ffmpeg for AAC files. Nothing is bundled or downloaded
audioPreview.askForRatingtrueAsk one time for a Marketplace rating, after 5 files and 2 days. Turn it off with false
audioPreview.showSupportLinkstrueShow the small Sponsor and More free viewers links under the player

Privacy and safety

The extension makes no network calls and has no telemetry. The webview runs under a strict Content Security Policy with no remote scripts and no inline scripts. Tag text from the file is always inserted as plain text, never as HTML, so a tag like <b>&amp;</b> shows exactly like that. ffmpeg only runs when you click its button.

Known limits

License

MIT. The bundled Opus decoder is opus-decoder (MIT) built from libopus (BSD-3-Clause). See THIRD-PARTY-NOTICES.md.

Install Audio Player & WAV Player (MP3, FLAC, LUFS)

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.audio-preview-vscode.

Free, MIT license. Needs VS Code 1.90.0 or newer. Extension ID zovo.audio-preview-vscode, version 0.1.3.

Source code and issues are on GitHub.

All our VS Code extensions

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.