减少视频大小,格式相同,并减小帧大小 [英] Reducing video size with same format and reducing frame size

查看:312
本文介绍了减少视频大小,格式相同,并减小帧大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个问题可能非常基本



有没有办法减少有损压缩(WMV,MPEG)格式的帧大小/速率,以获得更小的视频



有没有任何开源或专有apis? >解决方案

ffmpeg 提供此功能。所有你需要做的是运行像

  ffmpeg -i< inputfilename> -s 640x480 -b 512k -vcodec mpeg1video -acodec copy< outputfilename> 

将输入视频文件转换为尺寸为640 x 480和比特率为512的视频千比特/秒,使用MPEG 1视频编解码器并且仅复制原始音频流。当然,你可以插入你需要的任何值,并与尺寸和比特率来实现质量/尺寸权衡你正在寻找。 文档中还描述了大量其他选项



运行 ffmpeg -formats ffmpeg -codecs 格式和编解码器。如果您不必为最终输出定位特定的编解码器,则可以使用H.264等最先进的编解码器,以最小的质量损失实现更好的压缩比。


This question might be very basic

Is there a way to reduce the frame size/rate of Lossy compressed (WMV, MPEG) format, to get a smaller video, of lesser size, with same format.

Are there any open source or proprietary apis for this?

解决方案

ffmpeg provides this functionality. All you need to do is run someting like

ffmpeg -i <inputfilename> -s 640x480 -b 512k -vcodec mpeg1video -acodec copy <outputfilename>

to convert the input video file to a video with a size of 640 x 480 and a bitrate of 512 kilobits/sec using the MPEG 1 video codec and just copying the original audio stream. Of course, you can plug in any values you need and play around with the size and bitrate to achieve the quality/size tradeoff you are looking for. There are also a ton of other options described in the documentation

Run ffmpeg -formats or ffmpeg -codecs for a list of all of the available formats and codecs. If you don't have to target a specific codec for the final output, you can achieve better compression ratios with minimal quality loss using a state of the art codec like H.264.

这篇关于减少视频大小,格式相同,并减小帧大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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