17

on many websites etc. it asks permission to use your camera, which points to your defualt camera in windows. I was wondering if there was a way to setup that default camera to show your actual windows screen, instead of the picture from the webcam.

So for example if you were allow access to your camera on a website, it would show your screeen, or a region thereof, instead of your webcam picture.

Is this posssible? windows 10

  • 3
    This seems to be an xy problem. If you don't want to show your camera picture, why would you want to share your screen? – Máté Juhász Aug 19 at 7:09
  • 10
    @MátéJuhász its not at all an xy problem... I don't want to show my camera picture; instead, I want to show what's on my screen. Digital image instead of physical, real life image. I don't seee any contradiction? – bluejayke Aug 19 at 9:46
  • 14
    @bluejayke The reason they think it's an xy problem is because you're asking us about your solution to your problem rather than the problem itself. In other words, why do you want your camera to show what's on your screen? It's possible that another solution that you haven't thought of makes more sense. – MiniRagnarok Aug 19 at 17:00
  • Well, point the camera towards the screen (or use a suitably convex mirror in front of the top-bezel of the lid to point to the camera and horizontally flip the feed. ;) – Vaibhav Garg Aug 20 at 3:40
  • @VaibhavGarg Two mirrors. – wizzwizz4 Aug 20 at 16:34
26

Making the browser itself pretend there's a "desktop" camera would be technically possible, but since it would only work with that single browser, it doesn't look like anyone has done this yet. (At least I couldn't find any work for Chrome or Firefox – even though they have 'screen sharing' as a WebRTC feature, nobody seems to have linked it to webcam API yet.)

However, there are products which install a custom device driver that creates a virtual "webcam" device, which is then usable by any program. Your web browser will think you have two webcams; you still need to approve camera requests, and it's still up to you to choose the "preferred" camera.

I googled "virtual camera device" and found several products which can stream the desktop, for example Webcamoid (appears to be multi-platform and open-source), VCam (commercial), OBS VirtualCam (a plugin for OBS).

(For Linux there are two 'generic' drivers, akvcam or the older v4l2loopback, but they still need a program that would provide the actual video data. For Windows and macOS each product most likely uses its own custom drivers.)

  • 9
    "but they still need a program that would provide the actual video data" -- ffmpeg can be used to provide the desktop as a video feed: ffmpeg -f x11grab -video_size "$(xrandr | grep -Po '(?<=primary )\d+x\d+')" -i "$DISPLAY" -c:v ffvhuff -f matroska - | mpv - – JoL Aug 19 at 15:37
  • @JoL Note that the command in the comment above is for Linux only. It won't work on Windows, which this question is about. – Andrew Savinykh Aug 19 at 19:37
  • @AndrewSavinykh Yep, but the part I quoted was about Linux. – JoL Aug 19 at 19:41
1

This is not possible, since access to the camera means camera only, as the browser's security and permissions model is pretty tight nowadays.

That is, unless your camera software does screen-sharing (but I haven't yet encountered such software).

If you would like to do screen-streaming, your best tool is VLC.
See this answer of mine for instructions.

  • 7
    Surely there are programs which create a virtual camera device? Linux has akvcam and v4l2loopback. – grawity Aug 19 at 7:19
  • 1
    @grawity: Yes, but they have to be installed as programs, not via a website in the browser. Add-ons have more liberty, but they will still need to use unpatched vulnerabilities to escape the browser's sandbox. – harrymc Aug 19 at 8:26
  • 3
    Can't see where OP asked for it to be done through the website itself... – grawity Aug 19 at 9:06
  • 1
    @harrymc indeed the question didn't ask for it to be done through the website, the question is a windows 10 question; what software can I install, on my windows 10, to create a "virtual camera"? – bluejayke Aug 19 at 9:47
  • 1
    I'm a bit lost. Do you mean you are looking for screen-sharing through the browser? This is not connected to the camera and Chrome can do that (Chrome Remote Desktop). Or programs like Team Viewer. – harrymc Aug 19 at 9:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.