简体   繁体   English

使用/作为网络摄像头视频捕获和记录桌面屏幕

[英]Capture and Record Desktop Screen with/as Webcam Video

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.我想使用 FFMPEG 库操作通过网络摄像头捕获的桌面屏幕。 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.到目前为止我尝试过的我尝试了一些假/虚拟网络摄像头软件(manycam、sparkocam 等),但我认为它们不能满足我的真正需求。

PS I posted the same question in another community but didn't get any response. PS我在另一个社区发布了同样的问题,但没有得到任何回应。

Please guide me if there is any way to achieve this?请指导我是否有任何方法可以实现这一目标? Thanks谢谢

Solution to this problem would be to capture desktop directly by using ffmpeg.解决此问题的方法是使用 ffmpeg 直接捕获桌面。 Follow the link Capture Desktop using ffmpeg按照链接使用 ffmpeg 捕获桌面

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.我发现了这个: https : //streamshark.io/blog/using-obs-as-a-virtual-webcam-on-windows-and-macos/有了这个软件,你可以创建一个虚拟摄像头,可以利用你的一部分屏幕作为假网络摄像头输出。 Exactly what I need and what I think the OP is talking about.正是我需要的以及我认为 OP 正在谈论的内容。 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)"... (例如,为什么我需要这个?:我没有智能手机,而是一个虚拟机 android。我想安装某些应用程序的 Windows 桌面应用程序版本。为此,我需要“将手机(虚拟机)放在一个电脑屏幕(主操作系统)”...

On this forum see this post on capturing the desktop: Capture Windows screen with ffmpeg在此论坛上,请参阅有关捕获桌面的帖子:使用 ffmpeg 捕获 Windows 屏幕

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.上面提到的捕获桌面的链接显示了如何使用 dshow。 So the desktop and the webcam are both input streams for your output mp4.因此,桌面和网络摄像头都是您输出 mp4 的输入流。 I suggest to add your webcam as input:我建议添加您的网络摄像头作为输入:

-f dshow
-i <webcam>

Next, eg use the overlay filter to put both the desktop and the webcam on one view.接下来,例如使用覆盖过滤器将桌面和网络摄像头放在一个视图中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM