图像序列到视频质量 [英] Image sequence to video quality

查看:205
本文介绍了图像序列到视频质量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



当我使用建议的ffmpeg方法时:

  ffmpeg -f image2 -i image%d.jpg video.mpg 

视频不是真的好像我希望的那样:/



例如使用VDUB,如果我从同一个图像导出avi顺序其完美的qulality,然而文件大小可以是巨大的如果theres很多jpegs。



在过去我已经使用x264 gui前端,如staxrip和从未压缩AVI生成的视频非常特别,压缩非常好,输出文件(mp4)非常小巧。



那么压缩图像的最好方法是什么顺序是否有非常高的品质?当然有比ffmpeg好的东西吗?是否可以像使用ffmpeg一样从图像序列中使用x264,并获得更高的质量? FYI我将使用startprocess();

解决方案

该命令的输出质量来优化ac#.net项目中的任务是不好的,原因如下:




  • 这是使用MPEG-1编解码器的编码,这是非常过时的。 $ b
  • 你没有设置比特率,所以它是自己猜测的,这可能是不足的。



尝试一下:

  ffmpeg -f image2 -i image%d.jpg -vcodec mpeg4 -b 800k video.avi 

对于mpeg 4视频或:

  ffmpeg -f image2 -i image%d.jpg -vcodec libx264 -b 800k video.avi 

对于H.264视频(您将必须安装libx264才能使其工作)。你可以玩比特率,因为它取决于你的帧的大小你将需要什么比特率。此外,如果您想更多地尝试,运行 ffmpeg -formats 将显示所有输出格式和编解码器。



有关更多选项,请参阅 ffmpeg文档


I have been experimenting with creating a video from a sequence of images.

When I use the suggested ffmpeg method:

ffmpeg -f image2 -i image%d.jpg video.mpg

The video is not really as good as I hoped it would be :/

For example with VDUB, If I export avi from the same image sequence its perfect qulality, however the file size can be huge if theres a lot of jpegs.

In the past I have used x264 gui front-ends such as staxrip and the video produced from an uncompressed AVI is very exceptional and the compression is very very good, relitively tiny output files (mp4).

So what is the best way to compress the image sequence so that there is very high quality? Surely there is something better than ffmpeg? is it possible to use the x264 from an image sequence as you would with ffmpeg, and get higher quality? FYI i will be excecuting the task from within a c#.net project using startprocess();

解决方案

The quality of that command's output is bad for a few reasons:

  • It is encoding using the MPEG-1 codec, which is quite outdated.
  • You are not setting the bitrate, so it is coming up with its own guess, which is probably inadequate.

Try something like:

ffmpeg -f image2 -i image%d.jpg -vcodec mpeg4 -b 800k video.avi

for mpeg 4 video or:

ffmpeg -f image2 -i image%d.jpg -vcodec libx264 -b 800k video.avi

for H.264 video (You will have to have libx264 installed for this to work). You can play around with the bitrate because it depends on the size of your frames what bitrate you will need. Also, running ffmpeg -formats will display all of the output formats and codecs if you want to experiment more.

See the ffmpeg documentation for even more options.

这篇关于图像序列到视频质量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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