红联Linux门户
Linux帮助

linux下mencoder的一些用法

发布时间:2008-03-07 10:35:08来源:红联作者:joyrce
Mencoder是linux下的视频转换工具。但是在UBUNTU下我没有找到一个好用的前端。

只能先整理出一些常用的命令行,等研究清楚GTK+以后,自己来写个前端了。

引用:
//To DIVX

mencoder -oac mp3lame -lameopts aq=7:cbr:br=128 -srate 44100 -vf scale=width:height,harddup -ovc lavc -ffourcc DX50 -lavcopts vcodec=mpeg4:vbitrate=320 InputFile -o OutputFile



//To DIVX(2pss)

mencoder -nosound -vf scale=width:height,harddup -ovc lavc -ffourcc DX50 -lavcopts vcodec=mpeg4:vbitrate=320:vpass=1 InputFile -o OutputFile



mencoder -oac mp3lame -lameopts aq=7:cbr:br=128 -srate 44100 -vf scale=width:height,harddup -ovc lavc -ffourcc DX50 -lavcopts vcodec=mpeg4:vbitrate=320:vpass=2 InputFile -o OutputFile



//To XVID

mencoder -oac mp3lame -lameopts aq=7:cbr:br=128 -srate 44100 -vf scale=width:height,harddup -ovc xvid -xvidencopts bitrate=320 InputFile -o OutputFile



//To XVID(2pss)

mencoder -nosound -vf scale=width:height,harddup -ovc xvid -xvidencopts bitrate=320:pass=1 InputFile -o OutputFile



mencoder -oac mp3lame -lameopts aq=7:cbr:br=128 -srate 44100 -vf scale=width:height,harddup -ovc xvid -xvidencopts bitrate=320:pass=2 InputFile -o OutputFile


//To x264

mencoder -oac mp3lame -lameopts aq=7:cbr:br=128 -srate 44100 -vf scale=width:height,harddup -ovc x264 -x264encopts bitrate=320 InputFile -o OutputFile



//To x264(2pss)

mencoder -nosound -vf scale=width:height,harddup -ovc x264 -x264encopts bitrate=320:pass=1 InputFile -o OutputFile



mencoder -oac mp3lame -lameopts aq=7:cbr:br=128 -srate 44100 -vf scale=width:height,harddup -ovc x264 -x264encopts bitrate=320:pass=2 InputFile -o OutputFile



//视频滤镜

... -vf ...,eq=B:C,...harddup ... B=亮度,C=对比度
... -vf ...,rotate=R,...harddup ... R=旋转方式(0,逆时针90度。1,顺时针90度。)
... -vf ...,mirror,...harddup ... 水平翻转
... -vf ...flip,...harddup ... 垂直翻转
.. .-vf ...,crop=W:H:X:Y,...harddup ...
... -vf ...,expand=W:H:::1,...harddup ... 加黑边将画面扩展到W:H
... -vf...-ofps F ... F=帧速率
... -ss H:M:S:MS -endpos H:M:S:MS ... 时间分割(H=小时,M=分钟,S=秒,MS=毫秒)



//MP3音频控制
-oac mp3lame -lameopts aq=Q:[mode=M:][vol=V:]cbr:br=B [-delay D] -srate H Q=精度,M=模式(3为单声道),V=音量,B=比特率,D=延迟,H=采样频率



//字幕控制
-sid [MKV字幕号] -sub [字幕文件路径] -font [字体文件路径] -subfont-text-scale [字体尺寸] -subfont-outline [字体边框尺寸(px)] -subfont-blur [字体模糊(%)] -subpos [字幕位置(%)] -subdelay [延迟] -subcp CP936 -unicode


//To PAL DVD

mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=dvd:tsaf -vf scale=720:576,harddup -srate 48000 -af lavcresample=48000 -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9000:vbitrate=5001:keyint=15:vstrict=0:acodec=ac3:abitrate=224[:aspect=16/9|:aspect=4/3] -ofps 25 -o OutputFile InputFile



//To NTSC DVD

mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=dvd:tsaf -vf scale=720:480,harddup -srate 48000 -af lavcresample=48000 -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9000:vbitrate=5001:keyint=18:vstrict=0:acodec=ac3:abitrate=224[:aspect=16/9|:aspect=4/3] -ofps 23.976 -o OutputFile InputFile



//To PAL AVI Containing AC-3 Audio to DVD

mencoder -oac copy -ovc lavc -of mpeg -mpegopts format=dvd:tsaf -vf scale=720:576,harddup -ofps 25 -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9000:vbitrate=5001:keyint=15:vstrict=0[:aspect=16/9|:aspect=4/3] -o OutputFile InputFile



//To NTSC AVI Containing AC-3 Audio to DVD

mencoder -oac copy -ovc lavc -of mpeg -mpegopts format=dvd:tsaf:telecine -vf scale=720:480,harddup -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9000:vbitrate=5001:keyint=18:vstrict=0[:aspect=16/9|:aspect=4/3] -ofps 23.976 -o OutputFile InputFile



//To PAL SVCD

mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=xsvcd -vf scale=480:576,harddup -srate 44100 -af lavcresample=44100 -lavcopts vcodec=mpeg2video:mbd=2:keyint=15:vrc_buf_size=917:vrc_minrate=600:vbitrate=2001:vrc_maxrate=2500:acodec=mp2:abitrate=224 -ofps 25 -o OutputFile InputFile

//To NTSC SVCD

mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=xsvcd -vf scale=480:480,harddup -srate 44100 -af lavcresample=44100 -lavcopts vcodec=mpeg2video:mbd=2:keyint=18:vrc_buf_size=917:vrc_minrate=600:vbitrate=2001:vrc_maxrate=2500:acodec=mp2:abitrate=224 -ofps 23.976 -o OutputFile InputFile



//To PAL VCD

mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=xvcd -vf scale=352:288,harddup -srate 44100 -af lavcresample=44100 -lavcopts vcodec=mpeg1video:keyint=15:vrc_buf_size=327:vrc_minrate=1152:vbitrate=1152:vrc_maxrate=1152:acodec=mp2:abitrate=224 -ofps 25 -o OutputFile InputFile



//To NTSC VCD

mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=xvcd -vf scale=352:240,harddup -srate 44100 -af lavcresample=44100 -lavcopts vcodec=mpeg1video:keyint=18:vrc_buf_size=327:vrc_minrate=1152:vbitrate=1152:vrc_maxrate=1152:acodec=mp2:abitrate=224 -ofps 23.976 -o OutputFile InputFile
文章评论

共有 0 条评论