I am using FFMPEG from my C# application to build out the video stream from raw unencoded frames. For just one input stream this is fairly straightforward: