Video & Audio· 7 min read

In-Browser Screen Recording with MediaRecorder & getDisplayMedia

Master browser-native video capture, audio track mixing, VP9 codec containers, and system sound capture without software installs.

By EasyMedia Team Last updated: 2026-08-19.

Browser-native video capture and modern WebRTC media APIs

Capturing high-definition video directly from a desktop workspace, browser window, or isolated tab used to require bloated third-party software executables or invasive browser extensions. Modern WebRTC specifications expose raw media hardware and display pipelines directly through two client-side JavaScript APIs: `navigator.mediaDevices.getDisplayMedia()` for video/system-audio frames and `getUserMedia()` for hardware microphone streams.

Using our Screen Recorder tool, content creators, software engineers, and educators can record pristine desktop footage directly within the browser session. By passing display tracks to an active `MediaRecorder` instance, the browser serializes real-time video frames and audio samples into a standardized WebM or MP4 container.

Understanding how browser security models manage display capture permissions, how WebAudio mixes parallel microphone and system tracks, and how VP8/VP9 video compression operates ensures you capture smooth, glitch-free recordings every time.

See it in action
Screen Recorder — in action
ScreenWindowTab

1. Pick what to capture — screen, a window, or a browser tab.

Screen capture source options and system audio support matrix

When invoking `getDisplayMedia()`, the operating system and browser present a native picker interface. The exact capture capabilities, performance profile, and system audio routing depend heavily on the selected capture source and underlying OS platform:

Capture Source TargetVisual ScopeSystem Audio CaptureBest Used For
Entire ScreenWhole display including OS taskbars, notifications, and secondary windowsSupported (Windows, macOS, ChromeOS, Android)Multi-app workflows, desktop software tutorials, full-screen presentations
Application WindowSingle isolated desktop application (e.g., VS Code, Figma, Slack)Limited or Disabled depending on OS platformProduct demos, code walkthroughs, single-window presentation flows
Browser TabSingle active browser tab with clean boundsFull tab-audio routing across Chrome, Edge, and Linux PipeWireWeb app demos, YouTube video commentary, web-based presentations
System Audio Tip: To capture internal computer sounds alongside your visual recording on Windows or ChromeOS, select 'Entire Screen' or 'Browser Tab' in the browser prompt and ensure the 'Share audio' checkbox is toggled ON.

How to record your screen and microphone in 4 simple steps

Creating a client-side screen recording requires just four straightforward steps:

Configure microphone preferences: Toggle 'Record microphone' ON if you want to record live voiceover narration alongside your screen capture.

Grant media permissions and select target: Click 'Start recording' and choose whether to capture your entire screen, a specific application window, or a browser tab in the native prompt.

Perform your walkthrough or demo: Conduct your presentation normally. You can pause or stop the capture at any moment using the tool's 'Stop & save' button or the browser's floating floating capture banner.

Preview and export locally: Review the live video playback in the browser preview window and download your encoded WebM (or MP4) file directly to your local drive.

Audio stream mixing: Combining system sound with microphone narration

A common technical challenge during browser screen capture is combining two distinct audio input sources—the system output (e.g., audio played from a tab or desktop application) and the user's vocal microphone input—into a unified audio stream.

When 'Record microphone' is enabled, the recording engine requests access to your audio input device via `getUserMedia({ audio: true })`. The resulting microphone `MediaStreamTrack` is passed to a client-side `AudioContext` node network:

Gain Control and Summing: System audio from `getDisplayMedia()` and voice audio from `getUserMedia()` are piped into separate `GainNode` instances, preventing clipping or distortion.

Track Multiplexing: The unified destination node generates a single composite `MediaStreamTrack` that is supplied directly to the `MediaRecorder` constructor alongside the video track.

Synchronization Alignment: Because both streams are multiplexed into the same WebM cluster timestamps, vocal narration remains perfectly synchronized with cursor movements and visual UI transitions.

Container formats, VP8/VP9 video encoding, and hardware acceleration

The file format produced by in-browser recording is governed by the browser engine's native codec capabilities via the `MediaRecorder.isTypeSupported()` API:

Browser / PlatformNative Container FormatPrimary Video CodecRecommended Player / Editor
Google Chrome (Desktop)WebM (`.webm`)VP9 or VP8VLC Media Player, Chrome, Premiere Pro, DaVinci Resolve
Microsoft EdgeWebM (`.webm`)VP9 or VP8VLC Media Player, Edge, Windows Media Player (with WebM extensions)
Mozilla FirefoxWebM (`.webm`)VP8 / VorbisVLC Media Player, Firefox, HandBrake
Apple Safari (macOS / iOS)MP4 (`.mp4`) or WebMH.264 / AAC or VP9QuickTime Player, Safari, Final Cut Pro, iMovie

Chromium-based engines default to encoding VP9 within a WebM container. VP9 offers exceptional perceptual quality at low bitrates, making it ideal for high-resolution 1080p and 4K screen captures without exhausting CPU resources during live recording.

Avoiding recording failure modes, memory leaks, and dropped frames

Because media encoding runs in real time inside the browser's JavaScript execution thread, long or high-resolution screen recordings can encounter performance bottlenecks:

System Memory Limits: `MediaRecorder` buffers recorded video chunks directly in RAM (`Blob` arrays) until the recording is finalized. Capturing 4K footage at 60 FPS for multiple hours can consume several gigabytes of browser RAM, leading to tab crashes. For multi-hour streams, native desktop applications like OBS Studio are recommended.

Hardware Acceleration Bottlenecks: If GPU acceleration is disabled in browser settings, software-based VP9 frame encoding can overload the CPU, causing dropped frames or choppy video output.

OS Permission Restrictions: On macOS, ensure your browser is granted display recording access under 'System Settings → Privacy & Security → Screen & System Audio Recording'. On Linux environments using Wayland, verify that PipeWire and `xdg-desktop-portal` are active.

Accidental Tab Closure: Closing or refreshing the recorder tab while a capture is in progress clears the buffered in-memory blob data permanently.

Integrating screen capture into media editing and tutorial pipelines

In-browser screen recordings often serve as the raw input for broader media production and asset distribution workflows:

Converting walkthroughs to animated graphics: Transform short UI recordings or product feature loops into lightweight web animations with Video to GIF.

Stripping voiceovers and audio tracks: Extract raw MP3 or WAV audio tracks from screen captures using Extract Audio.

Removing background noise or sound: Strip audio entirely from screencasts or software demos using Mute Video.

Speeding up software walkthroughs: Accelerate slow desktop presentations or long coding sequences with Change Video Speed.

Frequently asked questions

Q: Where is my screen recording stored during and after capture?

A: All video frames and audio tracks are encoded locally and buffered directly inside your browser's temporary memory. No video or audio data is ever uploaded to external servers. Once you click download, the WebM or MP4 file is written directly to your local storage.


Q: Can I record system and application audio alongside my screen?

A: Yes. When Chrome or Edge prompts you to select a screen share source, check the 'Share audio' box. System audio capture works when sharing 'Entire Screen' or 'Browser Tab' on Windows, ChromeOS, and Android, as well as tab audio on Linux.


Q: Can I record my microphone commentary at the same time?

A: Yes. Enable the 'Record microphone' toggle before clicking 'Start recording' and grant the browser microphone permissions. The recorder mixes your mic audio track into the recorded stream in real time.


Q: Why does the recorder output a WebM file instead of MP4?

A: Chromium and Firefox natively encode browser video recordings using the open-source VP9/VP8 codecs inside a WebM container. Safari on macOS and iOS produces MP4 containers using H.264. WebM files play natively in all modern web browsers and media players like VLC.


Q: Is there a limit on how long I can record my screen?

A: There is no artificial time limit imposed by the tool. However, because video chunks are stored in browser RAM prior to saving, extremely long captures (over 1–2 hours at 1080p/4K) can exhaust system memory. For extended recordings, native tools like OBS are preferred.


Q: Why did I get a 'Permission Denied' error when starting a recording?

A: Permission errors occur if you cancel the browser's screen-share prompt, if browser settings block media capture, or if your operating system requires explicit permission (such as macOS Screen Recording permissions or Linux Wayland/PipeWire portals).

Record your screen and microphone directly in your browser

Capture application windows, desktop displays, or browser tabs with live microphone narration using our client-side Screen Recorder tool.

Explore complementary video and audio processing utilities across our suite:

Convert short screen captures into lightweight web graphics with Video to GIF.

Extract microphone narration or background audio using Extract Audio.

Strip unwanted audio tracks cleanly with Mute Video.

Adjust playback tempo and timelapse speeds using Change Video Speed.

Need help using this tool?

Read our complete Screen Recorder tutorial for step-by-step guidance.

Ready to try the tool?

No accounts. No uploads. No limits. Start now.