Plays any video format inside VS Code — including HEVC / H.265 camera feeds
(the reason the built-in viewer shows a black screen) — by transcoding to H.264 on
the fly with ffmpeg.
Why the built-in viewer fails
VS Code's built-in media preview renders video through Electron/Chromium, which has
no H.265/HEVC decoder. This extension probes each file with ffprobe and:
H.264 / VP8 / VP9 / AV1 in mp4/mov/webm → streams the original file natively.
Everything else (HEVC, mkv, avi, ts, mxf, ...) → spawns ffmpeg to transcode
to H.264 + AAC in a fragmented MP4 and streams it straight into the player.
Requirements
ffmpeg and ffprobe in PATH (already present on this server).
For speed, an NVIDIA GPU with h264_nvenc is auto-detected and preferred;
otherwise it falls back to libx264 (CPU).
How to run it
Option A — Development host (quickest)
Open this folder (Video_player_extention) as a VS Code window: