How to get better quality converting MP4 to WMV with ffmpeg?

怎甘沉沦 提交于 2019-12-09 04:08:40

问题


I am converting MP4 files to WMV with these two rescaling commands:

ffmpeg -i test.mp4 -y -vf scale=-1:360 test1.wmv
ffmpeg -i test.mp4 -y -vf scale=-1:720 test2.wmv

I've also tried:

ffmpeg -g 1 -b 16000k -i test1.mp4 test1.wmv

However, the .wmv files that are produced are "blocky and grainy" as you can see here in a small section of a video screenshot:

These are the sizes:

test.mp4 - 106 MB
test1.wmv - 6 MB
test2.wmv - 16 MB

How can I increase the quality/size of the resulting .wmv files (the size of the .wmv files is of no concern)?


回答1:


Consider the following command instead (some outdated commands in the final answer section):

ffmpeg -i test.mp4 -c:v wmv2 -b:v 1024k -c:a wmav2 -b:a 192k test1.wmv

REFERENCES

  • List item https://askubuntu.com/questions/352920/fastest-way-to-convert-videos-batch-or-single



回答2:


You can simply use the -sameq parameter ("use same quantizer as source") which produces a much larger sized video file (227 MB) but with excellent quality.

ffmpeg -sameq -i test.mp4 -y -vf scale=-1:360 test1.wmv

In newer versions of ffmpeg flag '-sameq' has been removed. To achieve similar results one should use 'qscale' flag with 0 value:

ffmpeg -sameq -i test.mp4 -qscale 0 -vf scale=-1:360 test1.wmv



回答3:


One thing I discovered after many frustrating attempts of enhancing the final quality was that if you don't specify a bitrate, it'll use a quite low average. Try -b 1000k for a starting point, and experiment increasing or decreasing it until you reach the desired result. Your file will be quite bigger or smaller, accordingly.



来源:https://stackoverflow.com/questions/11079577/how-to-get-better-quality-converting-mp4-to-wmv-with-ffmpeg

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