将两个视频流保存在一个视频文件c#,Windows 8商店应用程序中 [英] Save two video streams in one video file c#, Windows 8 store application

查看:77
本文介绍了将两个视频流保存在一个视频文件c#,Windows 8商店应用程序中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我正在开发一个Windows商店应用程序,它将能够录制来自两个视频源的视频(例如两个USB摄像头或USB摄像头和嵌入式平板电脑相机)然后将两个视频流保存在一个视频文件中。因此,当保存的视频播放时,它将显示一个大的视频帧(来自摄像机1的视频),并在右上角显示一个较小的视频帧(来自摄像机2的视频)。基本上,我想在另一个上面渲染一个视频。我认为这个过程被称为画中画,但我不是百分百肯定。我能够两个捕获2个视频流(相同的长度,相同的视频质量),但我不知道如何继续。如何进行渲染。我是否将流保存为两个文件然后处理这些文件或者我是否需要直接处理流(合并它们)然后保存到文件?我已经读过你可以通过使用ffmpeg库来做类似的事情。但到目前为止,我还没有设法找到任何c#代码。任何想法?



提前致谢,

Manos

Hi,

I am developing a Windows store application which will be able to record video from two video sources (e.g. two usb cameras or usb camera and embeded tablet camera) and then save the two video streams in one video file. So, when the saved video will play, it will show a large video frame (video from camera 1) and inside that, in the top right corner, a smaller video frame (video from camera 2). Basically, i want to render one video on top of the other. I think the process is called picture in picture, but I am not 100% sure. I am able two capture the 2 video streams (same length, same video quality) but I do not know how to proceed after that. How to do the rendering. Do I save the streams into two files and then process those files or do i need to process the streams directly (merge them) and then save to file? I have read that you can do something like that by using ffmpeg libraries. But so far I have not managed to find any c# code to it. Any ideas?

Thanks in advance,
Manos

推荐答案

也许这可以提供帮助: AviFile Library的简单C#包装器 [ ^ ]



仅适用于AVI文件。
Maybe this can help: A Simple C# Wrapper for the AviFile Library[^]

Works only with AVI files though.


这篇关于将两个视频流保存在一个视频文件c#,Windows 8商店应用程序中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆