//大小=》变小
ffmpeg -i 1.mp4 -b:v 2M -vcodec msmpeg4 -acodec wmav2 1_mp4.wmv
//大小=》变大
ffmpeg -i 1.mp4 -qscale 2 -vcodec msmpeg4 -acodec wmav2 2_mp4.wmv

ffmpeg -i 1.mp4 -q:a 2 -q:v 2 -vcodec msmpeg4 -acodec wmav2 3_mp4.wmv

ffmpeg -i 1.mp4 outputfile.wmv

ffmpeg -i 1.MP4 -c:v wmv2 -b:v 20M -c:a wmav2 -b:a 192k output.wmv

ffmpeg -i input.wmv -c:v libx264 -crf 23 -profile:v high -r 30 -c:a libfaac -q:a 100 -ar 48000 output.mp4

ffmpeg -i input.wmv -c:v libx264 -crf 23 -c:a libfaac -q:a 100 output.mp4

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

up vote6down votefavorite

5

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)?

ffmpeg mp4 wmv
shareimprove this question
asked Jun 18 '12 at 8:53
Edward Tanguay

60.2k224572875

 
add a comment

3 Answers

activeoldestvotes

up vote10down vote

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

shareimprove this answer
answered Jun 18 '12 at 9:23
Edward Tanguay

60.2k224572875

 
7  
A better solution is to use -qscale (or -qscale:v or -q:v depending on your syntax preference); generally with a value of 2-5. A lower value is higher quality, and 2 can be considered "visually lossless". -sameq is not designed to be used between formats that do not share the same quantizer scale, and this may be the case for you. – LordNeckbeard Jun 18 '12 at 16:03
2  
Also you're applying -sameq as an input option (anything before -i). Probably works as expected, but keep in mind not all options applied to the input will be applied to the output. – LordNeckbeard Jun 18 '12 at 16:07
    
-sameq has been removed. When you try to use it ffmpeg offers "use -qscale 0 or an equivalent quality factor option", and it errors out with an invalid argument. – Robert Koernke Jan 6 at 17:04
add a comment
up vote3down vote

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.

shareimprove this answer
edited Feb 26 '13 at 22:07
answered Feb 7 '13 at 22:59
Fabio Ceconello

11.2k42645

 
add a comment
up vote2down vote

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 http://askubuntu.com/questions/352920/fastest-way-to-convert-videos-batch-or-single
shareimprove this answer
edited Jan 18 at 10:26
answered Jan 18 at 10:02
Reinhard Behrens

212

 
add a comment

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

ffmpeg mp4 to wmv and wmv to mp4相关推荐

  1. Ubuntu 编译ijkplayer 支持几乎所有格式(MP4,mov,mkv,avi,wmv,m4v,mpg,webm,ogv,3g2.flv,f4v,swf)和https

    以下都是经过自己测试过的,并集成,已测试MP4,mov,mkv,avi,wmv,m4v,mpg,webm,ogv,3g2.flv,f4v,swf格式可正常播放并有声音 整个编译过程和集成是按下面说的博 ...

  2. mkv、rmvb、avi、MP4、flv、wmv特点和区别

    mkv.rmvb.avi.MP4.flv.wmv这些指的都是文件格式,也就是封装格式,而不是真正的数据压缩格式,至于他们的特点,下面分别来说.首先纠正一下上面说的一个观点,其实mkv和avi并不能说成 ...

  3. wmv怎么转换成mp4?

    众所周知,视频格式是多种多样的,这些不同的视频格式都是由不同的系统.为满足当下平台和用户的需求开发出来的格式.比如MV就是由微软开发的一系列视频编解及其相关的视频编码格式的统称,这是一种体积很小的视频 ...

  4. 视频wmv怎么转换成mp4格式

    在几十种视频格式里面,可以说有的视频格式给人们带来的体验感非常棒,像wmv就是由微软开发的一系列视频编码格式的统称,它可以实现在同等质量下,用最小的体积来承载文件内容,非常适合在网络上进行播放和传输. ...

  5. DS1819 对应版本的FFMPEG_使用 FFmpeg 对 webp转png , webm转mp4或者gif等进行操作

    最近浏览一些网站发现这些网站的图片格式为 webp .视频格式为 webm .相信对于一些喜欢收藏并且分享的人 或者 内容搬运工来说,这两个格式都不是一个比较好的选择.将它们转换为 png 或者 jp ...

  6. FFmpeg再学习 -- 将 jpeg 转成 mp4

    参看:wiki -- ffmpeg 上一篇已讲将了 ffmpeg 的安装说明,接一下来讲一下我们要实现的功能,将 jpeg 转成 mp4. 参看:使用ffmpeg将jpeg转成mp4 参看:FFmpe ...

  7. Mac使用ffmpeg将.mkv等格式无损转换为.mp4

    Mac使用ffmpeg将.mkv等格式无损转换为.mp4 Mac使用ffmpeg将.mkv等格式无损转换为.mp4 使用脚本批量转换 #! /bin/bash for i in *.mkv; doff ...

  8. MP4文件格式的解析,以及MP4文件的分割算法

    mp4应该算是一种比较复杂的媒体格式了,起源于QuickTime.以前研究的时候就花了一番的功夫,尤其是如何把它完美的融入到视频点播应用中,更是费尽了心思,主要问题是处理mp4文件庞大的"媒 ...

  9. Linux DVD 转 MP4 – HandBrake – Copy a DVD to MP4 or MKV file

    For the impatient: the short version - For those that are impatient and more experienced, you can fo ...

最新文章

  1. linux sort 命令详解(转 )
  2. 360 mysql无法启动_安装MySQL 5后无法启动(不能Start service)解决方法小结
  3. 在c++使用文件流(初学者必看)
  4. XGBoost、LightGBM与CatBoost算法对比与调参
  5. ubuntu14.04修改limits.conf后链接限制仍然不生效
  6. C++ - 类模板(class template) 详解 及 代码
  7. 用FlexGrid做开发,轻松处理百万级表格数据
  8. ubuntu16.04 将cuda10.1降为cuda10.0
  9. 开关电源(DC-DC)与LDO电源的区别---效率
  10. 诗歌赏析 - 兰花草
  11. 3G 模块驱动应用开发总结
  12. 跟随《西西里的美丽传说》 慢游锡拉库萨
  13. 蓝桥杯评分标准_第十届蓝桥杯软件个人赛校内选拔赛评分标准和选拔标准.doc...
  14. es6箭头函数_【知识点】ES6箭头函数、箭头函数与普通函数的区别
  15. 想做程序首先就学正则表达式
  16. 浅谈IT行业加班有没有价值
  17. 软件体系结构测试定义,软件体系架构复习要点
  18. SpringCloud 微服务工作笔记:validationQuery: SELECT 1 FROM DUAL
  19. mysql通过ip地址进行访问
  20. 论知乎是如何评论博客园与CSDN的!!

热门文章

  1. 人工智能论文术语集23
  2. 什么是 es6,promise
  3. 音频采样率与时间戳的计算
  4. 瑞士电信携手爱立信测试LTE-Advanced Pro 实现1Gbps峰值速率
  5. Android STB 添加系统接口
  6. chainer-语义分割-SegNet【附源码】
  7. 以下属于逻辑结构的是【笔记】
  8. JS获取网页 < 变成 /u003C
  9. Linux下sqlite3多线程和串行模式
  10. mysql的表是聚集索引组织表_Mysql的Innodb引擎索引总结