ffmpeg 和 mpeg 的麻烦
我想在从一种格式转换为另一种格式时保持视频质量,特别是从 avi 转换为 mpeg。我尝试过使用 ffmpeg 提供的选项目标,并且获得了相同质量的视频,但生成的文件大小与原始文件相比较大,如何减小该大小?
我已经尝试过:
ffmpeg -i input_file.avi -target ntsc-dvd output_file.mpeg
I want to keep video quality when converting from one format to another, specifically from avi to mpeg. I have tried with the option offered ffmpeg target and I achieved the same quality of video but the resulting file size is large compared to the original, how I can reduce that size?
I've tried this:
ffmpeg -i input_file.avi -target ntsc-dvd output_file.mpeg
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
原版使用什么编解码器?如果 AVI 中使用的编解码器比 NTSC DVD 中使用的 MPEG-2 编解码器更好,您可能无法获得与原始版本相同的质量/文件大小。
ntsc-dvd 也指定了分辨率。如果它高于 AVI 分辨率,则会增加文件大小。如果你不需要精确地达到 DVD 分辨率,我会保持相同的分辨率。您可以执行以下操作:
-b
参数允许您设置输出视频比特率。我发现当我想尝试达到正确的质量/文件大小权衡时,这是最容易调整的参数。还有许多其他高级选项可以帮助您在保持质量的同时减小文件大小,但与通过降低分辨率或使用 H.264 等更好的编解码器获得的好处相比,它们通常处于边缘地位。
What codec is used in the original? You may not be able to achieve the same quality/filesize point as the original if the codec used in the AVI is better than the MPEG-2 codec used in NTSC DVDs.
Also ntsc-dvd specifies a resolution as well. If it is higher than the AVI resolution, this will raise the filesize. If you don't need to hit the DVD resolution exactly, I would just keep the same resolution. You could do something like:
The
-b
argument allows you to set the output video bitrate. I have found this to be the easiest parameter to adjust on when I want to try to get to the right quality/filesize tradeoff.There are a lot of other advanced options that may help you get the filesize down while keeping the quality, but they usually are on the margins compared to the benefits you can get by reducing resolution or using a better codec like H.264.
转换视频时总会有数据丢失。特别是在转换为 mpeg 和其他古老格式时。也许F4V或MKV可以用?
When you convert video there will always be a data loss. Especially when converting to mpeg and other ancient formats. Maybe F4V or MKV is usable?