MPEG4质量保存在MATLAB中 [英] MPEG4 quality saved in MATLAB

查看:242
本文介绍了MPEG4质量保存在MATLAB中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要从另一个应用程序中获取一个mpeg4文件,从原始的mpeg4视频中我加载到matlab并编辑(逐帧)。
为此,我尝试使用VideoWriter,将质量设置为100%:

  newVid = VideoWriter(outputfilename, 'MPEG-4'); 
newVid.FrameRate = fps;
newVid.Quality = 100;

然而,我得到的结果非常差,如果原始未编辑的视频大小为〜50MB ,我在matlab中后期编辑的大约是大约20MB,我不知道如何保持质量和尺寸。
我也尝试保存为.avi并转换为mpeg4与ffmpeg,但它给了更差的结果。
任何想法?

解决方案

MPEG-4 压缩格式,因此当您以此格式保存时,会出现信息丢失。质量是压缩的质量,但你不想要任何压缩。要强制Matlab不要使用压缩我的猜测是使用下面的声明作为默认值是H.264

 

newVid。 VideoCompressionMethod ='none'


I need to get an mpeg4 file to use in another application, from an original mpeg4 video I loaded into matlab and edited (frame by frame). To do so, I tried using VideoWriter, setting the quality to 100%:

newVid = VideoWriter(outputfilename, 'MPEG-4');
newVid.FrameRate = fps;
newVid.Quality = 100;

However, the result I'm getting is very poor and if the original unedited video size was ~50MB, the one I get post-edit in matlab is around ~20MB, and I don't know how to keep the quality and size as they were. I also tried saving as .avi and converting to mpeg4 with ffmpeg, but it gave even poorer results. Any ideas?

解决方案

MPEG-4is a compressed format so there is information loss when you save it in this format. Quality is the quality of the compression but you do not want any compression. To force Matlab not to use compression my guess is to use the statement below as the default is H.264


    newVid.VideoCompressionMethod = 'none'

这篇关于MPEG4质量保存在MATLAB中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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