Note that there are some explanatory texts on larger screens.

plurals
  1. POCombine multiple videos into one
    text
    copied!<p>I have three videos:</p> <ul> <li>a lecture that was filmed with a video camera</li> <li>a video of the desktop capture of the computer used in the lecture</li> <li>and the video of the whiteboard</li> </ul> <p>I want to create a final video with those three components taking up a certain region of the screen.</p> <p>Is open-source software that would allow me to do this (mencoder, ffmpeg, virtualdub..)? Which do you recommend?</p> <p>Or is there a C/C++ API that would enable me to create something like that programmatically?</p> <p><b>Edit</b><br>There will be multiple recorded lectures in the future. This means that I need a generic/automated solution. </p> <p>I'm currently checking out if I could write an application with GStreamer to do this job. Any comments on that?</p> <p><b>Solved!</b><br> I succeeded in doing this with GStreamer's videomixer element. I use the gst-launch syntax to create a pipeline and then load it with gst_parse_launch. It's a really productive way to implement complex pipelines.</p> <p>Here's a pipeline that takes two incoming video streams and a logo image, blends them into one stream and the duplicates it so that it simultaneously displayed and saved to disk.</p> <pre><code> desktop. ! queue ! ffmpegcolorspace ! videoscale ! video/x-raw-yuv,width=640,height=480 ! videobox right=-320 ! ffmpegcolorspace ! vmix.sink_0 webcam. ! queue ! ffmpegcolorspace ! videoscale ! video/x-raw-yuv,width=320,height=240 ! vmix.sink_1 logo. ! queue ! jpegdec ! ffmpegcolorspace ! videoscale ! video/x-raw-yuv,width=320,height=240 ! vmix.sink_2 vmix. ! t. t. ! queue ! ffmpegcolorspace ! ffenc_mpeg2video ! filesink location="recording.mpg" t. ! queue ! ffmpegcolorspace ! dshowvideosink videotestsrc name="desktop" videotestsrc name="webcam" multifilesrc name="logo" location="logo.jpg" videomixer name=vmix sink_0::xpos=0 sink_0::ypos=0 sink_0::zorder=0 sink_1::xpos=640 sink_1::ypos=0 sink_1::zorder=1 sink_2::xpos=640 sink_2::ypos=240 sink_2::zorder=2 tee name="t" </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload