将两个网络摄像头流合并为一个实时流 - 以编程方式

发布于 2024-12-07 15:06:50 字数 104 浏览 0 评论 0 原文

我有两个网络摄像头,我想将它们的流合并为一个实时流预览并将其显示到屏幕上。

我擅长 C#/Java 编程,您能帮我找到一个可以帮助我实现这一目标的框架吗?

谢谢,

I have two web cameras and I want to merge their streams into a single live streaming preview and display it to the screen.

I am skilled in C#/Java programming, could you please help me to find a framework that helps me to achieve this ?

Thanks,

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

宣告ˉ结束 2024-12-14 15:06:50

如果您的目的只是并排显示两个视频,我建议您查看 DirectShow.NetGMFBridge 工具包

引用 GMFBridge 网站关于包中包含的示例项目 GMFPlay 的内容:

GMFBridge:GMFPlay 展示如何将多个剪辑作为单个影片查看

如果您想“合并”两个流(就像以某种透明度级别将一个流绘制在另一个流之上),那么您可以尝试 此代码项目示例(仅用于可视化,也使用 DirectShow)。

如果您确实想要生成新的视频流而不仅仅是可视化,您可以再次将 DirectShow 与混合过滤器结合使用,Medialooks-Video-Mixer 例如看起来很有希望。

If you are aiming only at visualizing the two videos side by side, I would recommend taking a look at DirectShow.Net and GMFBridge toolkit.

Quote from GMFBridge site about the sample project GMFPlay included in the package:

GMFBridge: GMFPlay shows how to view multiple clips as a single movie

If you want to "merge" both streams (as drawing one on top of the other with some transparency level), then you could try this codeproject sample (for visualization only, also using DirectShow).

If you actually want to produce a new video stream and not only visualize, you could again use DirectShow combined with a mixing filter, Medialooks-Video-Mixer for example looks promissing.

猛虎独行 2024-12-14 15:06:50

您可以组合两个摄像头,将流发送到服务器(如 SRS)并使用 ffplay 实时显示。

 .\ffmpeg.exe -f dshow -i video="LRCP  USB2.0" -i .\right.avi -filter_complex "nullsrc=size=1280x1440 [base];[0:v] setpts=PTS-STARTPTS,scale=1280x720 [upper];[1:v] setpts=PTS-STARTPTS,scale=1280x720 [lower];[base][upper] overlay=shortest=1 [temp1];[temp1][lower] overlay=shortest=1:y=720" -c:v libx264 -preset:v ultrafast -tune:v zerolatency -f flv rtmp://192.168.1.136:1935/live/stream

您可以实时观看组合视频,如图像示例所示。

如果仍然不清楚,请告诉我。

You can combine two cameras, send the stream to a server (like SRS) and use ffplay to display this in real-time.

 .\ffmpeg.exe -f dshow -i video="LRCP  USB2.0" -i .\right.avi -filter_complex "nullsrc=size=1280x1440 [base];[0:v] setpts=PTS-STARTPTS,scale=1280x720 [upper];[1:v] setpts=PTS-STARTPTS,scale=1280x720 [lower];[base][upper] overlay=shortest=1 [temp1];[temp1][lower] overlay=shortest=1:y=720" -c:v libx264 -preset:v ultrafast -tune:v zerolatency -f flv rtmp://192.168.1.136:1935/live/stream

You can watch the combined video in real-time like in this image example.

Let me know if still not clear.

扮仙女 2024-12-14 15:06:50

查看此链接:
https://codedump.io/share/fbX1tYFjPhdw/1/merging-two-web-cameras-streaming-into-a-single-live-streaming---以编程方式

http://www.codeproject.com/KB/directx/DirectShowVMR9.aspx

引用自 GMFBridge 站点有关包中包含的示例项目 GMFPlay 的内容:

GMFBridge:GMFPlay 展示如何查看多个剪辑作为一部电影
如果您想“合并”两个流(就像以某种透明度级别将一个流绘制在另一个流之上),那么您可以尝试此 codeproject 示例(仅用于可视化,也使用 DirectShow)。

如果您确实想要生成新的视频流而不仅仅是可视化,您可以再次使用 DirectShow 与混合过滤器相结合,例如 Medialooks-Video-Mixer 看起来很有前途。

Checkout this link:
https://codedump.io/share/fbX1tYFjPhdw/1/merging-two-web-cameras-streaming-into-a-single-live-streaming---programmatically

http://www.codeproject.com/KB/directx/DirectShowVMR9.aspx

Quote from GMFBridge site about the sample project GMFPlay included in the package:

GMFBridge: GMFPlay shows how to view multiple clips as a single movie
If you want to "merge" both streams (as drawing one on top of the other with some transparency level), then you could try this codeproject sample (for visualization only, also using DirectShow).

If you actually want to produce a new video stream and not only visualize, you could again use DirectShow combined with a mixing filter, Medialooks-Video-Mixer for example looks promising.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文