Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run Chromium with fake webcam and real micro

I can run the Google Chrome with the fake webcam using this command:

$ google-chrome-stable --use-fake-device-for-media-stream --use-file-for-fake-video-capture=video.mjpeg

This works fine, but I can only use fake audio sources using this configuration. How to run Chromium/Google Chrome with fake video stream and real audio stream?

Also you can use any Python modules you want.

like image 583
Daniil Chizhevskii Avatar asked Nov 15 '22 02:11

Daniil Chizhevskii


1 Answers

With --use-fake-device-for-media-stream it is not possible, Chrome will always use fake audio:

if (base::CommandLine::ForCurrentProcess()->HasSwitch(
        switches::kUseFakeDeviceForMediaStream)) {
  params_.set_format(media::AudioParameters::AUDIO_FAKE);
}

Use a virtual webcam and your real microphone instead. A quick selection from searching:

  • Webcamoid, Windows/macOS/Linux
  • OBS Virtualcam, plugin for OBS Studio, Windows/macOS/Linux
  • Syphon Virtual Webcam, plugin for Isadora, macOS
like image 56
cachius Avatar answered Jan 28 '23 18:01

cachius