1,如何安装MPlayer
1.下载MPlayer源码包:
包括
(1)源码包
注意:在./configure时,需要加上--enable-gui这样就可以安装图形界面了。
(2)解码器
注意:源码包已经自带了解码器
(3)皮肤
注意:默认源码包没有带皮肤,需要自己解压缩皮肤包放到如下目录去:
/usr/local/share/mplayer/skins/default/
2.在安装过程当中会出现如下的问题:
yasm not found, use --yasm='' if you really want to compile without、
这是因为yasm没有安装,因此需要先安装。
说下在Ubuntu 10.40编译安装MPlayer过程,点我下载。在这里获得Mpalyer的源码,解码包和皮肤三个文件,down下来
mplayer-checkout-snapshot.tar.bz2 源码
essential-20071007.tar.bz2 解码器
Blue-1.7.tar.bz2 皮肤
如果提示
Error: yasm not found, use --yasm='' if you really want to compile without
说明YASM没有找到
点我下载
这里下载 YASM的包解压
解压,进入解压包
./configure
make
make install
装完后返回继续
解压,进入ROOT终端,开始安装:
安装解码器,运行终端,输入如下命令
1 sudo mkdir /usr/local/lib/codecs/
2 sudo cp /home/你的用户名/载包所在位置/essential-20071007/* /usr/local/lib/codecs/
拷贝过去后,进入解压的源码目录
3 cd mplayer-checkout-2010-08-23(看你解压后是什么文件名)
4 ./configure --enable-gui --language=zh_CN
然后就可以make了
5 make
6 sudo make install
完了设置皮肤文件
7 sudo mkdir /usr/local/share/mplayer/skins/default
8 sudo cp /home/你的用户名/载包所在位置/Blue/* /usr/local/share/mplayer/skins/default/
拷贝目录的时候皮肤目录下有一个文件夹没有拷贝过去,手动重新拷贝一次
sudo mkdir /usr/local/share/mplayer/skins/default/icons
sudo cp /home/你的用户名/下载包所在位置/Blue/icons/* /usr/local/share/mplayer/skins/default/icons/
好了,ICO文件过去了。
输入gmplayer就启动了,然后手动在应用程序里添加快捷方式。
安装完成
2,linux下mplayer的安装教程,要最简单的
step1. 下载必要的文件(总共约20分钟)
下载主程序:
MPlayer-1.0pre8(有更新版的,建议用这个版本)
官方解码器:
essential-20061022.tar.bz2
官方win32_CODES-all:
windows-essential-20061022.zip
皮肤:
Blue-1.4.tar.bz2
上面的那几样东西都在官方网站找到并顺利下载
下载网址: http://www.mplayerhq.hu/homepage/design7/dload.html
step2. 安装codec(键盘输入请仔细)
tar vjxf essential-20061022.tar.bz2
mv essential-20061022 /usr/lib/codes
chmod 644 /usr/lib/codes/*
chown root.root /usr/lib/codes/*
unzip windows-essential-20061022.zip
mv windows-essential-20061022 /usr/lib/wincodes
chmod 644 /usr/lib/wincodes/*
chown root.root /usr/lib/wincodes/*
3.安装MPlayer
tar vjxf MPlayer-1.0pre8.tar.bz2
cd MPlayer-1.0pre8
./configure --prefix=/usr/local/mplayer/ --enable-gui --enable-freetype --with-codecsdir=/usr/lib/codes/ --with-win32libdir=/usr/lib/wincodes/ --disable-gcc-checking --language=zh_CN
(这一步中,为了防止打错字,最好把这句话拷贝到终端窗口中。回车后,它会让你确认是否真的愿意disable-gcc-checking ,回车就行了。)
make
make的时间相当的长。输入 make 命令后,建议您听完三首mp3或者吃完饭后再回来继续。
make install
cd etc
cp example.conf /usr/local/mplayer/etc/config
cp codecs.conf /usr/local/mplayer/etc/
4.安装字体
把你想用的字体(如 simsun.ttf ,windows系统的字体目录下就有)放到/home//.mplayer 下(root用户放到/root/.mplayer下)并且改名为subfont.ttf .
拷贝(这里假设您的simsun字体临时放在 /root/ 目录下,用户为root):
cp /root/simsun.ttf /root/.mplayer/
改名:
mv /root/.mplayer/simsun.ttf /root/.mplayer/subfont.ttf
(windows系统c\windows\font中有很多字体,你选择一个拷贝到/home//.mplayer,如果没有.mplayer就新建一个,并改名为subfont.ttf,这样同样可以安装好字体,不必输入那么多命令)
5.安装皮肤
tar vjxf Blue-1.4.tar.bz2
mv Blue /usr/local/mplayer/share/mplayer/skins/
cd /usr/local/mplayer/share/mplayer/skins/
ln -s Blue default
6.如果运气还不错的话,应该就可以运行了。在终端中输入
/usr/local/mplayer/bin/gmplayer
就可以运行程序了。
3,ubuntu怎么安装mplayer解码器
引用:
sudo gedit /etc/apt/sources.list
4.添加这两个源到列表
5.
引用:
deb http://archive.ubuntu.com/ubuntu intrepid universe multiverse
deb-src http://archive.ubuntu.com/ubuntu intrepid universe multiverse
6.保存
7.关闭源列表
8.更新
引用:
sudo apt-get update
9.开始安装
引用:
sudo apt-get install mplayer
10.安装前端:
引用:
sudo apt-get install smplayer
11. 安装皮肤 :
引用:
sudo apt-get install smplayer-themes
12.配置 执行
引用:
sudo wget http://www.medibuntu.org/sources.list.d/intrepid.list --output-document=/etc/apt/sources.list.d/medibuntu.list
13.更新一下
引用:
sudo apt-get update
14.执行 :
引用:
sudo apt-get install medibuntu-keyring
15.再更新一下
引用:
sudo apt-get update
16.安装解码器:
引用:
sudo apt-get install w32codecs libdvdcss2 -----------这个是i386用户用的
sudo apt-get install w64codecs libdvdcss2 -----------这个是AMD64用户用的
17.安装火狐插件:
引用:
sudo apt-get install mozilla-mplayer
18.succeed.
19、发现的一个比较实用的技巧。我还是比较喜欢使用smplayer,不但能播放视频,还能看网络电视,另外还有一个比较实用的“截屏”功能。我使用了3d功能,也录制了视频,需要截屏给大家看看,就用到了smplayer了,默认下这个功能没有启动,需要以下的操作就可以了,很简单的:在“选项”-“首选项”-“常规”中,自己设置一个“保存截图的目录“就可以了,我设置是主目录/home下的“图片”文件夹,重新打开一个视频,点击那个“相机图片(截屏功能)”把你喜欢的图片截下来吧
4,ubuntu下怎么安装mplayer
编译安装:
1.到mplayer官网下载mplayer源码包
www.mplayerhq.hu/design7/dload.html
2.安装mplayer编译环境
sudo apt-get build-dep mplayer
3.编译安装
./configure
或./configure –enable-gui
#gui支持
make
sudo make install
4.安装smplayer,mplayer图形前端
sudo apt-get install smplayer
5.vdpau解码支持
到nvidia官方ftp上下载vdpau安装包
download.nvidia.com/XFree86/vdpau/
解压源码包到任意位置
sudo apt-get install subversion
sh checkout-patch-build.sh
软件安装:
安装一个ubuntu-tweak,里面有安装mplayer
命令安装:sudo apt-get install mplayer
5,ubuntu下用mplayer播放rmvb文件出现error
解决not open required directshow codec drvc.dll
在我的UBUNTU8041下装好MPLAYER,设置好中文,但是每每播放RMVB时候都会弹出错误:could not open required directshow codec drvc.dll,却又不影响使用,这让人很不爽。于是乎看论坛发现可以这么解决:
高手们的检测手段:
# find /usr/lib -name drvc*
/usr/lib/codecs/drvc.so
# ldd /usr/lib/codecs/drvc.so
libstdc++.so.5 => not found
从这里推断是libstdc++.so.5没有安装
所以安装它,确保网络通畅后,在终端输入:
sudo apt-get install libstdc++5
6,ubuntu怎么安装audio插件
使用如下命令:sudo apt-get install libpulse-dev安装时会提示依赖于下面这几个软件,一并安装即可:libavahi-client-dev libavahi-common-dev libpulse-mainloop-glib0 libpulse0这个也可以上packages.ubuntu.com官方网址查询libpulse-dev软件的依赖关系,相关链接如下:http://packages.ubuntu.com/raring/libpulse-dev如下图所示:二、pulseaudio库的使用(同步simple API)pulseaudio官网有关于pulseaudio的API doxygen使用手册,网址如下:http://freedesktop.org/software/pulseaudio/doxygen/1、播音sampleA simple playback tool using the simple API//pacat-simple.c/***This file is part of PulseAudio.PulseAudio is free software; you can redistribute it and/or modifyit under the terms of the GNU Lesser General Public License as publishedby the Free Software Foundation; either version 2.1 of the License,or (at your option) any later version.PulseAudio is distributed in the hope that it will be useful, butWITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNUGeneral Public License for more details.You should have received a copy of the GNU Lesser General Public Licensealong with PulseAudio; if not, write to the Free SoftwareFoundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA.***/#ifdef HAVE_CONFIG_H#include #endif#include #include #include #include #include #include #include #define BUFSIZE 1024int main(int argc, char*argv[]) {/* The Sample format to use */static const pa_sample_spec ss = {.format = PA_SAMPLE_S16LE,.rate = 44100,.channels = 2};pa_simple *s = NULL;int ret = 1;int error;/* replace STDIN with the specified file if needed */if (argc > 1) {int fd;if ((fd = open(argv[1], O_RDONLY)) < 0) {fprintf(stderr, __FILE__": open() failed: %s\n", strerror(errno));goto finish;}if (dup2(fd, STDIN_FILENO) < 0) {fprintf(stderr, __FILE__": dup2() failed: %s\n", strerror(errno));goto finish;}close(fd);}/* Create a new playback stream */if (!(s = pa_simple_new(NULL, argv[0], PA_STREAM_PLAYBACK, NULL, "playback", &ss, NULL, NULL, &error))) {fprintf(stderr, __FILE__": pa_simple_new() failed: %s\n", pa_strerror(error));goto finish;}for (;;) {uint8_t buf[BUFSIZE];ssize_t r;#if 0pa_usec_t latency;if ((latency = pa_simple_get_latency(s, &error)) == (pa_usec_t) -1) {fprintf(stderr, __FILE__": pa_simple_get_latency() failed: %s\n", pa_strerror(error));goto finish;}fprintf(stderr, "%0.0f usec \r", (float)latency);#endif/* Read some data ... */if ((r = read(STDIN_FILENO, buf, sizeof(buf))) <= 0) {if (r == 0) /* EOF */break;fprintf(stderr, __FILE__": read() failed: %s\n", strerror(errno));goto finish;}/* ... and play it */if (pa_simple_write(s, buf, (size_t) r, &error) < 0) {fprintf(stderr, __FILE__": pa_simple_write() failed: %s\n", pa_strerror(error));goto finish;}}/* Make sure that every single sample was played */if (pa_simple_drain(s, &error) < 0) {fprintf(stderr, __FILE__": pa_simple_drain() failed: %s\n", pa_strerror(error));goto finish;}ret = 0;finish:if (s)pa_simple_free(s);return ret;}2、录音sample A simple recording tool using the simple API //parec-simple.c/***This file is part of PulseAudio.PulseAudio is free software; you can redistribute it and/or modifyit under the terms of the GNU Lesser General Public License as publishedby the Free Software Foundation; either version 2.1 of the License,or (at your option) any later version.PulseAudio is distributed in the hope that it will be useful, butWITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNUGeneral Public License for more details.You should have received a copy of the GNU Lesser General Public Licensealong with PulseAudio; if not, write to the Free SoftwareFoundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA.***/#ifdef HAVE_CONFIG_H#include #endif#include #include #include #include #include #include #define BUFSIZE 1024/* A simple routine calling UNIX write() in a loop */static ssize_t loop_write(int fd, const void*data, size_t size) {ssize_t ret = 0;while (size > 0) {ssize_t r;if ((r = write(fd, data, size)) < 0)return r;if (r == 0)break;ret += r;data = (const uint8_t*) data + r;size -= (size_t) r;}return ret;}int main(int argc, char*argv[]) {/* The sample type to use */static const pa_sample_spec ss = {.format = PA_SAMPLE_S16LE,.rate = 44100,.channels = 2};pa_simple *s = NULL;int ret = 1;int error;/* Create the recording stream */if (!(s = pa_simple_new(NULL, argv[0], PA_STREAM_RECORD, NULL, "record", &ss, NULL, NULL, &error))) {fprintf(stderr, __FILE__": pa_simple_new() failed: %s\n", pa_strerror(error));goto finish;}for (;;) {uint8_t buf[BUFSIZE];/* Record some data ... */if (pa_simple_read(s, buf, sizeof(buf), &error) < 0) {fprintf(stderr, __FILE__": pa_simple_read() failed: %s\n", pa_strerror(error));goto finish;}/* And write it to STDOUT */if (loop_write(STDOUT_FILENO, buf, sizeof(buf)) != sizeof(buf)) {fprintf(stderr, __FILE__": write() failed: %s\n", strerror(errno));goto finish;}}ret = 0;finish:if (s)pa_simple_free(s);return ret;}3、编译含有pulseaudio库的时候,需要添加pulseaudio的动态链接库-libpulse等,(可以在/usr/lib/i386-linux-gnu/目录下找到pulse的动态库/usr/lib/i386-linux-gnu/libpulsecommon-1.1.so/usr/lib/i386-linux-gnu/libpulsedsp.so/usr/lib/i386-linux-gnu/libpulse-mainloop-glib.so/usr/lib/i386-linux-gnu/libpulse-mainloop-glib.so.0/usr/lib/i386-linux-gnu/libpulse-mainloop-glib.so.0.0.4/usr/lib/i386-linux-gnu/libpulse-simple.so/usr/lib/i386-linux-gnu/libpulse-simple.so.0/usr/lib/i386-linux-gnu/libpulse-simple.so.0.0.3/usr/lib/i386-linux-gnu/libpulse.so/usr/lib/i386-linux-gnu/libpulse.so.0/usr/lib/i386-linux-gnu/libpulse.so.0.13.5)例如: gcc -o pacat-simple pacat-simple.c -lpulse -lpulsecommon-1.1 -lpulse-simple三、ALSA音频库 ALSA全称为:Advanced Linux Sound Architecture一个网址为:http://www.alsa-project.org/main/index.php/Main_Page
7,ubuntu下最好用的视频、音频播放器
乱码不好解决,因为linux下只是别utf-8,不能识别gbk(gb2312、gb18030)等,而视频文件的tag信息大多数都是gbk编码的,所以在linux下显示乱码。
不过,音频文件的tag信息是可以解决显示乱码的,需要用到mp3tag这个软件。
至于播放器,建议视频用smplayer或者totem、vlc。
音频播放器用exaile、audacious,kde下用amarok。
但这些播放器本身都很难解决乱码问题,需要额外转换编码。
8,Ubuntu下用什么播放器播放mkv格式的呢?
Ubuntu下,播放mkv效果比较好的是smplayer.播放1080P的比较流畅。
前提条件:使用smplayer前必须要安装mplayer
安装步骤
1. sudo apt-get install mplayer
2. 安装mplayer时应该已经同时一并安装了ffmpeg,播放各种多媒体格式都不会有问题,如果没有,这样sudo apt-get install ffmpeg
3. 安装 w32codecs解码器, 到Mplayer网站下载最新的解码包,网址是 http://www.mplayerhq.hu/design7/dload.html
选择其中“Binary Codec Packages”标题下的“linux x86 ...”, 如Linux x86 20061022,
下载后解压到 /usr/lib/codecs/ 或 /usr/lib/win32即可。
具体命令:sudo mkdir /usr/lib/codecs/ cd /tmp wget -c http://www.mplayerhq.hu/MPlayer/releases/codecs/essential-20071007.tar.bz2 tar jxvf essential-20071007.tar.bz2 sudo mv essential*/* /usr/lib/codecs/
4. sudo apt-get install smplayer