MPEG4 quality saved in MATLAB

丶灬走出姿态 提交于 2019-12-02 17:01:20

问题


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?


回答1:


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'



来源:https://stackoverflow.com/questions/45738910/mpeg4-quality-saved-in-matlab

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!