有时我们在网上看视频或听音乐,不能打开有关文件,很有可能是由于在codecs和win32文件夹中没有相关的编码,这时就需要最新最完善的编码来帮忙。最近我在网络上闲览时发现了一篇好文章,是专门讲编码的。试着装一遍,还真好。特向网友们推荐,以供参考。为了阅读方便,本人初步翻译了一下,可能有不恰当之处,敬请各位原谅。文章的第二部分是关于编码类型的,由于涉及到视频和音频方面的专业知识,笔者能力有限,只好望而却步了,留待大家发挥吧。
在linux中怎样安装多媒体播放器编码?
作者:Marius Nestor, Linux 编辑
转自SOFTPEDIA网站
象其它操作系统,例如 Windows等一样,大部分Linux 操作系统都不带有多媒体播放器编码,因此,它不能播放 AVI/DivX/XviD格式的video,或者 MOV格式的电影。MPlayer 是建立 Linux编码包的播放软件之一,并在这方面做了很好的工作。
在以下的快速向导中我将教你怎样在你的Linux 系统中安装编码包。让我们就从这里下载编码包作为整个过程的开始吧。
在下载结束后,要使用下列命令解压:
tar -xvf all-20061022.tar.bz2
现在你需要建立一个目录来放编码,这是因为让一些播放器在不同的目录中找到它们。要建立第一个目录,需要执行下列命令:
mkdir /usr/local/lib/codecs/
现在建立第二个目录,执行下列命令:
mkdir /usr/lib/win32
注意:如果你已经安装了如xine或 kaffeine之类的播放器,那么这后一种目录事实上是已经安装了的。不过它是空的,因此你需要用编码去充实它。
你需要用下列命令来把所有的编码拷贝到第一个目录中:
cp all-20061022/* /usr/local/lib/codecs/
在完成拷贝后,你需要执行下列命令改变它的执行权限:
chmod 755 /usr/local/lib/codecs/*
然后,把所有的编码从第一个目录中拷贝到第二个目录中去,用下列命令:
cp /usr/local/lib/codecs/* /usr/lib/win32/
太好了。现在你可以用你最喜欢的媒体播放器和最喜欢的电影文件来测试它们了。
现在让我们在所提供的编码包中寻找一些最重要的 video和 audio编码。(略)
在安装了这个包后,你就可以播放大部分媒体材料了。
以下是原文:
How to Lnstall Multimedia Codecs in Linux
By:Marius Nestor, Linux Editor
Like any other operating system, e.g. Windows, most of the Linux systems come with no multimedia codecs, so you'll not be able to play AVI/DivX/XviD videos or MOV movie trailers. Luckily, someone is taking care of these codecs and they update them regularly. The MPlayer team are the ones that created this Linux codec pack and they are doing a very good job.
In this quick guide I will teach you how to install a codec pack into your Linux system. Let's begin by downloading this codec pack from here. After you have finished downloading, open a console and extract the archive with the following command:
tar -xvf all-20061022.tar.bz2
Now you need to create the directories to store the codecs in, because some players may look in different directories. For the first directory, type the following comand:
mkdir /usr/local/lib/codecs/
Now for the second directory, type the following command:
mkdir /usr/lib/win32
NOTE: You might already have this last directory, if you have installed a multimedia player like xine or kaffeine. The only thing is that this directory is empty, so you still need to fill it up with codecs.
You need now to copy all the codecs to the first directory with the following command:
cp all-20061022/* /usr/local/lib/codecs/
After you have copied the codecs, you must change their permissions to 755, typing the following command:
chmod 755 /usr/local/lib/codecs/*
And finally, copy again all the codecs from the first directory to the second directory with the following command:
cp /usr/local/lib/codecs/* /usr/lib/win32/
That's all! Now you can test them by playing your favorite movie, with your preferred multimedia player.
Let’s have a look now at the most important video and audio codecs that this package provides.
Video Codecs:
• MPEG-1 (VCD) and MPEG-2 (DVD) video
• native decoders for all DivX variants, 3ivX, M$ MPEG-4 v1, v2 and other MPEG-4 variants
• native decoder for Windows Media Video 7/8 (WMV1/WMV2), and Win32 DLL decoder for Windows Media Video 9 (WMV3), both used in .wmv files
• native Sorenson 1 (SVQ1) decoder
• native Sorenson 3 (SVQ3) decoder
• 3ivx v1, v2 decoder
• Cinepak and Intel Indeo codecs (3.1,3.2,4.1,5.0)
• MJPEG, AVID, VCR2, ASV2 and other hardware formats
• VIVO 1.0, 2.0, I263 and other H.263(+) variants
• FLI/FLC
• RealVideo 1.0 & 2.0 from libavcodec, and RealVideo 3.0 & 4.0 codecs using RealPlayer libraries
• native decoder for HuffYUV
• Various old simple RLE-like formats
Audio Codecs:
• MPEG layer 1/2/3 (MP1/2/3) audio (native code, with MMX/SSE/3DNow! optimization)
• Windows Media Audio 7 and 8 (AKA WMAv1 and WMAv2) (native code, with libavcodec)
• Windows Media Audio 9 (WMAv3) (using DMO DLL)
• AC3 Dolby audio (native code, with MMX/SSE/3DNow! optimization)
• AC3 passing through sound card hardware
• AAC
• Ogg Vorbis audio codec (native library)
• RealAudio: DNET (low bitrate AC3), Cook, Sipro and ATRAC3
• QuickTime: Qualcomm and QDesign audio codecs
• VIVO audio (g723, Vivo Siren)
• Voxware audio (using DirectShow DLL)
• alaw and ulaw, various gsm, adpcm and pcm formats and other simple old audio codecs
• Adaptive Multi-Rate (AMR) speech codecs
In conclusion, after installing this package, you'll be able to play most of the video materials out there, with sound of course!

