Mencoder是 MPlayer 媒体播放器的配套程序,可用于编码或转换 MPlayer 可以读取的任何音频或视频流。有关在 MPlayer 和 gmplayer 中启用非自由格式的说明,请参阅 RestrictedFormats wiki 页面。欲了解更多信息,请访问 MPlayer 网站。
步骤1.安装MenCoder和MPlayer
CentOS/RHEL 和 Fedora 用户,请确保您有启用 ATrpms 存储库在系统中。让我们开始根据您的操作系统安装 MPlayer 和 Mencoder。
对于 CentOS/RHEL 和 Fedora:
# yum install mencoder
对于 Ubuntu 和 Debian:
$ sudo apt-get update
$ sudo apt-get install mencoder
步骤2.检查音频/视频代码
成功安装Mencoder后,我们来检查一下可用的音视频编码
视频编解码器:
$ mencoder -ovc help
MEncoder svn r34540 (Ubuntu), built with gcc-4.6 (C) 2000-2012 MPlayer Team
Available codecs:
copy - frame copy, without re-encoding. Doesn't work with filters.
frameno - special audio-only file for 3-pass encoding, see DOCS.
raw - uncompressed video. Use fourcc option to set format explicitly.
nuv - nuppel video
lavc - libavcodec codecs - best quality!
vfw - VfW DLLs, read DOCS/HTML/en/encoding-guide.html.
qtvideo - QuickTime DLLs, currently only SVQ1/3 are supported.
xvid - XviD encoding
x264 - H.264 encoding
音频编解码器:
$ mencoder -oac help
MEncoder svn r34540 (Ubuntu), built with gcc-4.6 (C) 2000-2012 MPlayer Team
Available codecs:
copy - frame copy, without re-encoding (useful for AC3)
pcm - uncompressed PCM audio
mp3lame - cbr/abr/vbr MP3 using libmp3lame
lavc - FFmpeg audio encoder (MP2, AC3, ...)