AVI Writer OpenCV访问冲突 [英] AVI Writer OpenCV access violation

查看:65
本文介绍了AVI Writer OpenCV访问冲突的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

CvVideoWriter *writeravi = cvCreateVideoWriter("C:\\outavi.avi",CV_FOURCC('D','I','V','X'),fps,cvSize(frameW,frameH),isColor);

for(int stepframe=0;stepframe<numFrames;stepframe++)
{
	cvGrabFrame(captureavi);          
	imgavi=cvRetrieveFrame(captureavi);
	int t= cvWriteFrame(writeravi,imgavi);  
	cvShowImage("image",imgavi);
	cvWaitKey(20);
}



它给了我违反aceess的习惯,(even writeravi = 0x003ecd18)

如果我输入"0"或"-1"而不是CV_FOURCC("D","I","V","X")可以,但是)代表未压缩输出& -1给出了Dialg框来选择压缩类型,Intel indeo video 4.5可以从中使用压缩类型.

但是在我的应用程序中,我不能使用)或-1 7我要压缩输出.

[edit]删除了SHOUTING,添加了代码块,将我的内容作为纯文本..."选项已禁用-OriginalGriff [/edit]



It gives me aceess violation,(even writeravi=0x003ecd18 )

if i put "0" or "-1" instead of CV_FOURCC(''D'',''I'',''V'',''X'') it works but ) stands for uncompress output & -1 gives dialg box to select compression type , from which Intel indeo video 4.5 works for me.


But in my applicationh i cant use ) or -1 7 i want compresss output.

[edit]SHOUTING removed, Code block added, "Treat my content as plain text..." option disabled - OriginalGriff[/edit]

推荐答案

您在以下位置指定DIVX您的代码不起作用.出现对话框时,选择不是DIVX的Intel indeo视频.我认为未安装DIVX,因此无法正常工作.请查看链接以查看FOURCC编解码器列表并更改编解码器,或者您可以安装DIVX并再次尝试.

http://www.fourcc.org/codecs.php [
You specify DIVX in your code which doesn''t work. When you get a dialog you select Intel indeo video which isn''t DIVX. I think DIVX isn''t installed and therefore won''t work. Have a look at the link to check out the FOURCC codec list and change the codec or you could install DIVX and have another try.

http://www.fourcc.org/codecs.php[^]

Good luck!


这篇关于AVI Writer OpenCV访问冲突的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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