创建视频,逐帧,从.net [英] Create Video, Frame by frame, from .Net

查看:115
本文介绍了创建视频,逐帧,从.net的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个.net应用程序,使得使用GDI +和/或XNA图形,我想帧记录直接插入视频(preferably的AVI,在那里我可以包括codeC就像XVID等) 。我试过很多的解决方案,在那里,碰上出现阻塞与所有的人。

I have a .Net application which renders graphics using GDI+ and/or XNA and I want to record the frames directly into a video (preferably an AVI, where I can include a codec like xvid etc). I've tried many of the solutions out there, and run into show stoppers with all of them.

所有FFmpeg的基于库的似乎是专门为转码现有流,与其说是产生从帧一个新的。

All of the FFMPeg based libs seem to be dedicated to transcoding an existing stream, not so much generating a new one from frames.

有一个净LIB称为捻接器上的codePLEX,但是从我可以告诉它是朝着建设一个幻灯片更为适合,因为它需要每一帧,并将其存储在HD。 DirectShow的解决方案的行为方式相同。

There is a .Net lib called Splicer on codeplex, but from what I can tell it is more geared towards building a "slideshow" because it takes each frame and stores it on the HD. The directshow solutions behave the same way.

再有就是AVIFile包装,这几乎正是我需要的。唯一的问题是,当你开始一个新的编码它弹出(和有时在!?)的对话框。该对话框不正常使用的问题,但我也需要这个来作为服务运行,因此强制用户界面显然是一个显示塞。

Then there is the AVIFile wrapper, which is almost exactly what I need. The only problem is that when you start a new encoding it pops up (and sometimes UNDER!?) a dialog box. The dialog isn't a problem for normal use, but I also need this to run as a service, so mandatory UI is obviously a show stopper.

任何人都知道的另一种选择是相对的.Net友好的,还是我刚才问的太多了?

Anyone know of another option that is relatively .Net friendly, or am I just asking too much?

推荐答案

我不知道你使用的AVIFile包装器,但我相信AviFile可能是打电话AVISaveOptions得到一个初始化的AVICOM preSSOPTIONS结构。你可以只初始化AVICOM preSSOPTIONS自己。大多数成员在AVICOM preSSOPTIONS是pretty的方便。 lpParms和cbParms包含二进制codeC的配置数据块(cbParms =块的长度)。你可以得到这个数据调用ICGetState。

I don't know which AVIFile wrapper you're using, but I believe AviFile is probably calling AVISaveOptions to get an initialized AVICOMPRESSOPTIONS struct. You can just initialize AVICOMPRESSOPTIONS yourself. Most members in AVICOMPRESSOPTIONS are pretty easy. lpParms and cbParms contain a block (cbParms = length of block) of binary codec configuration data. You can get this data calling ICGetState.

这应该是一个相当简单的改变你的本地AVIFile和你的包装应该仍然工作。

It should be a fairly simple change to your native AVIFile and your wrapper should still work.

有一个在此<一个href="http://cgs.hpi.uni-potsdam.de/trac/vrs/browser/trunk/src/image/avimaker.cpp?rev=6115&format=txt"相对=nofollow>对于如何初始化AVICOM preSSOPTIONS样品。

这篇关于创建视频,逐帧,从.net的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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