0

Webcam lets others view either still pictures or motion video of a user or other object in front of it. I want to configure Webcam in a way that it start capturing desktop screen instead of what is in front of it.

I want to manipulate desktop screen captured through Webcam using FFMPEG library. Such as:

ffmpeg -f dshow -i video="Integrated Webcam" -f mp4 cam_stream.mp4

I want to use this same application to capture my Desktop Screen that will be possible just in that case when Webcam will be able to capture my Desktop Screen instead. So above command will start recording what Webcam will be capturing that I want it to capture my desktop screen.

Note: I know other ways to capture, record or stream desktop screen but I want to achieve it through Webcam.

What I tried so far: I tried some Fake/Virtual Webcam software (manycam, sparkocam etc.) but I don't think they fulfil what I exactly want.

P.S. I posted the same question in another community but didn't get any response.

Please guide me if there is any way to achieve this? Thanks

Community
  • 1
  • 1
Bilal Ahmed Yaseen
  • 2,506
  • 2
  • 23
  • 48
  • You can't use the webcam to record the desktop, unless you point the webcam at the desktop. It sounds like what you are interested in is actually capturing video of your desktop and for that you don't need a webcam (again, unless your plan is to point the camera at the monitor but that's not going to produce very good results). – Mike Dinescu Oct 01 '15 at 06:10
  • Actually I have an application which records what is being captured by Webcam. So, I want to use that application for screen capturing. And this will be possible if I somehow manage to configure webcam to capture my desktop screen instead of what it captures normally. – Bilal Ahmed Yaseen Oct 01 '15 at 06:13
  • If your capture supports direct-show that you might be able to create a direct show filter that exposes itself as a video input device and just have that stream the desktop.. – Mike Dinescu Oct 01 '15 at 06:16
  • Yes exactly. I am looking for some way that I may pass Desktop Capture stream to Webcam. I can capture desktop screen and also webcam stream and I want webcam to take desktop capture stream as input. – Bilal Ahmed Yaseen Oct 01 '15 at 06:19
  • You can't use a real webcam as an output device so the only solution is to use a virtual one. In Linux this is easy to do with `ffmpeg` and `v4l2loopback` and for Windows there seems to be a lot of standalone software. Maybe you can explain why they don't achieve what you want? – aergistal Oct 01 '15 at 07:55
  • I have two issues with them: 1. They run as an independent program while I want to achieve this programatically. 2. When I select Webcam Recording they turn on my laptop's webcam but when I select capture my screen as web cam they don't turn on my laptop's webcam which means that they are not capturing my desktop screen through webcam while there is some separate individual program running behind. – Bilal Ahmed Yaseen Oct 01 '15 at 19:41

3 Answers3

0

Solution to this problem would be to capture desktop directly by using ffmpeg. Follow the link Capture Desktop using ffmpeg

Himanshu Chandra
  • 197
  • 4
  • 14
0

Ive been searching all day for a similar thing. Ive found this: https://streamshark.io/blog/using-obs-as-a-virtual-webcam-on-windows-and-macos/ With this software you can create a virtual cam that can utilize a portion of your screen as a fake webcam output. Exactly what I need and what I think the OP is talking about. So for future ref, bumped.

(Why do I need this for instance?: I dont have a smartphone, but a virtualbox android. I want to install the windows desktop app versions of certain apps. For which I need to "hold the phone (virtualbox) in front of a computer screen (main os)"...

sjors
  • 1
0

On this forum see this post on capturing the desktop: Capture Windows screen with ffmpeg

If I understand well, you also want to add views from your webcam. The above mentioned link on capturing the desktop shows how to use dshow. So the desktop and the webcam are both input streams for your output mp4. I suggest to add your webcam as input:

-f dshow
-i <webcam>

Next, e.g. use the overlay filter to put both the desktop and the webcam on one view.

Victor
  • 11
  • 3