Skip to Content
Fingerprint ProtectionFile-Backed Capture Device Identity

File-Backed Capture Device Identity

Keep profile-backed camera and microphone names and identifiers when capture uses Chromium’s fake-device backend and a file fixture.


Prerequisites

  • BotBrowser installed. See Installation Guide.
  • A profile file (.enc for production).
  • A video fixture in Y4M (.y4m, I420) or MJPEG (.mjpeg) format if you drive capture from a file.

Overview

Sites that request a camera or microphone can read more than the frames. They also read the track label, device and group identifiers, and the enumerated device list. Chromium’s file capture backend normally exposes its fixture path or a generic fake-device name instead of the identity carried by the profile.

BotBrowser aligns the supported naming and identifier layer with the profile’s target platform. The page still receives the frames from the fixture.

Frame content, frame rate, resolution, and the track’s actual settings come from the fixture and Chromium’s capture path. They are not replaced by profile-valued capabilities.


Quick Start

chromium-browser \ --bot-profile="path/to/profile.enc" \ --user-data-dir="$(mktemp -d)" \ --use-fake-device-for-media-stream \ --use-fake-ui-for-media-stream \ --use-file-for-fake-video-capture="path/to/fixture.y4m"

With these flags, getUserMedia({ video: true }) receives the frames from the fixture while the reported camera identity follows the profile.


Configuration

The three capture flags

FlagEffectIdentity gate
--use-fake-device-for-media-streamReplaces the capture device set with Chromium’s fake/file backend. Physical devices are not enumerated in that process.Yes. This is the enablement boundary for profile-backed naming and identifiers.
--use-file-for-fake-video-capture=<file>Selects the fixture file the fake backend plays. It only picks a parser inside the fake backend.No. On its own it does not replace real devices.
--use-fake-ui-for-media-streamSkips the permission prompt.No. It does not affect device descriptors.

Use --use-fake-device-for-media-stream as the single gate. Adding --use-file-for-fake-video-capture without it will not rename devices, and it will not replace the capture set.

Supported formats

FormatStatusNotes
Y4M (.y4m)SupportedI420 pixel format.
MJPEG (.mjpeg)SupportedParsed at a fixed frame rate.
MP4 and other containersNot supportedThe capture path only selects a parser from the file extension. Convert to Y4M or MJPEG first.

What follows the profile

When the fake device backend is active, the profile target platform drives the reported identity:

  • MediaStreamTrack.label for camera and microphone tracks.
  • deviceId and groupId reported by the track and by enumeration.
  • enumerateDevices() entries for audio and video inputs.
  • The roster entries added for supported camera and microphone kinds.

The track’s actual settings and capabilities still come from the fixture and Chromium’s capture path.

Keeping real devices intact

If you launch without --use-fake-device-for-media-stream, the capture set stays native: real hardware labels, identifiers, and capabilities pass through unchanged. This is the correct configuration when you need genuine device access rather than a fixture.

Combining with device enumeration control

--bot-media-devices decides which device list enumerateDevices() reports, and --use-fake-device-for-media-stream decides whether capture is file-backed. They are independent:

# File-backed capture, profile-defined device identity chromium-browser \ --bot-profile="path/to/profile.enc" \ --bot-media-devices=profile \ --use-fake-device-for-media-stream \ --use-file-for-fake-video-capture="path/to/fixture.y4m"

See Media Devices Privacy for the enumeration side.


Common Scenarios

Repeatable camera sessions without real hardware

Servers rarely have a camera. Supply a fixture and keep the profile’s device identity:

chromium-browser \ --bot-profile="path/to/profile.enc" \ --use-fake-device-for-media-stream \ --use-file-for-fake-video-capture="path/to/fixture.mjpeg"

Microphone identity alongside file-backed video

Audio input naming follows the same profile when the fake device backend is active. Launch with the fake device flag and request audio in the page as usual. This mode aligns identity; it does not synthesize audio or validate a WAV waveform.

Mobile profile targets

Mobile profile targets use their platform naming policy instead of the host machine’s device names.


Troubleshooting / FAQ

ProblemSolution
Device still shows a file path or generic nameConfirm --use-fake-device-for-media-stream is present. Without it the capture set stays native.
Video does not play at allCheck the file extension. Only .y4m and .mjpeg are accepted; other containers return no usable descriptor.
Need to change the video mid-sessionNot supported. The source is bound at startup; restart the browser with a different fixture.
Need genuinely real camera and microphoneDrop the fake device flag. Real hardware then passes through unchanged.
Device names differ from the expected platformVerify the profile’s target platform and that the fake device flag is the only capture gate in use.

Next Steps


Related documentation: CLI Flags | Profile Configuration


Legal Disclaimer & Terms of Use • Responsible Use Guidelines. BotBrowser is for authorized fingerprint protection and privacy research only.


Related BotBrowser blog: Media Devices Virtual Camera Privacy

Updated