ffmpeg mp4 to wmv

//大小=》变小
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


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

时间: 2024-08-01 22:45:06

ffmpeg mp4 to wmv的相关文章

ffmpeg转码视频为mp4

ffmpeg是一个强大视频转码工具 参考的中文文档: https://github.com/biglazy/gist/blob/master/ffmpeg/ffmpeg.txt https://legacy.gitbook.com/book/xdsnet/other-doc-cn-ffmpeg/details centos6.6 64位安装 安装libx264(视频转码必备) git clone git://git.videolan.org/x264.git cd x264 ./configur

ffmpeg常用转换命令,支持WAV转AMR

音频转换: 1.转换amr到mp3: ffmpeg -i shenhuxi.amr amr2mp3.mp3 2.转换amr到wav: ffmpeg -acodec libamr_nb -i shenhuxi.amr amr2wav.wav 3.转换mp3到wav: ffmpeg -i DING.mp3 -f wav test.wav 4.转换wav到amr: ffmpeg -i test.wav -acodec libamr_nb -ab 12.2k -ar 8000 -ac 1 wav2amr

用ffmpeg快速剪切和合并视频

如果直接找视频剪切和合并视频的软件,通常出来的都是大的视频编辑软件或者是有图形界面的剪切软件,大型一点的功能太多安装麻烦,小型一点的功能可能不齐全. 只是简单的剪切或者一下合并一下,还是ffmpeg这个命令行工具最方便和快速. 一.剪切视频 ffmpeg -i input.mp4 -ss 30 -c copy -to 40 output.mp4 剪切从30秒开始到40秒结束的视频. ffmpeg -i input.wmv -ss 30 -c copy -t 10 output.wmv 二.合并视

使用ffmpeg来转换media Video

FFMPEG -i 1.wmv -c:v libx264 -strict -2 1_wmv.mp4 ffmpeg -i b.mp4 -codec copy -bsf h264_mp4toannexb a.ts ffmpeg -i 1.mp4 -c:v libx264 -crf 24 destination.flv ffmpeg -i HYB-wish.wav -acodec libmp3lame -ab 192k -ac 2 HYB-wish.mp3ffmpeg -i HYB-wish.wav

技术宅学会几招FFmpeg

有些时候,我需要对某个视频文件做一些简单的处理.也或者是受亲戚朋友的委托吧(又不好意思推辞,因为人家觉得你是搞技术的,这点小事应该能轻松搞定).但是,我犯不着为这点事去安装一个笨重的多媒体软件.我也不想去网上随便找个免费的小工具,怕它不干净.总之,我不想安装没有足够信誉的软件.不过,国外的开源软件还是可以信一信的,比如FFmpeg.矫情吧? FFmpeg都是命令行的,用起来肯定不方便.但是,这对技术宅应该不成问题.下面,我就罗列一些比较实用的使用方法吧. FFmpeg的下载与安装 FFmpeg是

Ffmpeg使用语法

ffmpeg [[options][`-i' input_file]]... {[options] output_file}... 如果没有输入文件,那么视音频捕捉就会起作用. 作为通用的规则,选项一般用于下一个特定的文件.如果你给 –b 64选项,改选会设置下一个视频速率.对于原始输入文件,格式选项可能是需要的. 缺省情况下,ffmpeg试图尽可能的无损转换,采用与输入同样的音频视频参数来输出. 3.选项 我们在将多种格式的视频转换成flv格式的时候,我们关注的就是转换后的flv视频的品质和大

ffmpeg为视频添加时间戳 - 手动编译ffmpeg

FFMPEG给视频加时间戳水印 项目中需要给视频添加时间戳,理所当然最好用的办法是ffmpeg.在找到正确的做法前,还被网上的答案timecode给水了一下(水的不轻,在这里转了2天),大概是这样写的: ffmpeg -i wildlife.wmv -vf "drawtext=fontfile=arial.ttf: text='fuck': timecode='09\:57\:00\:00': r=25: \x=(w-tw)/1.5: y=h-(20*lh):fontcolor=white: b

ffmpeg转换参数和对几种视频格式的转换分析

我们在将多种格式的视频转换成flv格式的时候,我们关注的就是转换后的flv视频的品质和大小.下面就自己的实践所得来和大家分享一下,主要针对avi.3gp.mp4和wmv四种格式来进行分析.通常在使用ffmpeg进行视频转换的时候我们使用到的控制音视频的主要参数有如下:-ab      bitrate      设置音频码率-acodec  codec        使用codec编解码-ac      channels     设置通道,缺省为1-ar      freq         设置音

关于ffmpeg工具的使用总结

FFmpeg官网: http://ffmpeg.org/ 安装ffmpeg: http://www.cnblogs.com/freeweb/p/6897907.html 主要参数: -i 设定输入流 -f 设定输出格式 -ss 开始时间 视频参数: -b 设定视频流量,默认为200Kbit/s -r 设定帧速率,默认为25 -s 设定画面的宽与高 -aspect 设定画面的比例 -vn 不处理视频 -vcodec 设定视频编解码器,未设定时则使用与输入流相同的编解码器 音频参数: -ar 设定采