The combination of two webcams transmitted in a single live broadcast - software

I have two webcams, and I want to combine their streams into one live view and display it on the screen.

I can program in C # / Java, could you help me find a framework that will help me achieve this?

Thanks,

+7
source share
3 answers

If you only focus on rendering two videos side by side, I would recommend taking a look at DirectShow.Net and the GMFBridge Toolkit .

A quote from the GMFBridge website about the GMFPlay project included in the package:

GMFBridge: GMFPlay shows how to view multiple clips in one movie

If you want to "combine" both streams (how to draw one on top of the other with some level of transparency), then you can try this code sample (for visualization only, also using DirectShow).

If you really want to create a new video stream and not only visualize it, you can use DirectShow again in combination with a mixing filter, for example Medialooks-Video-Mixer looks promising.

+4
source

You can combine the two cameras, send the stream to the server (e.g. 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, as in this example image .

Let me know if not yet clear.

+1
source

Check out 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

A quote from the GMFBridge website about the sample GMFPlay project included in the package:

GMFBridge: GMFPlay shows how to view multiple clips as a single movie. If you want to "combine" both streams (how to draw one on top of the other with a certain level of transparency), you can try this sample code (for visualization only, also using DirectShow).

If you really want to create a new video stream and not only visualize it, you can use DirectShow again in combination with a mixing filter, for example, Medialooks-Video-Mixer looks promising.

0
source

All Articles