个人工具
登录
查看“UbuntuHelp:MPlayer/CVS”的源代码 - Ubuntu中文
UbuntuHelp
讨论
查看源代码
历史
搜索
导航
首页
最近更改
随机页面
页面分类
帮助
编辑
编辑指南
沙盒
新闻动态
字词处理
工具
链入页面
相关更改
特殊页面
页面信息
查看“UbuntuHelp:MPlayer/CVS”的源代码
来自Ubuntu中文
←
UbuntuHelp:MPlayer/CVS
跳转至:
导航
,
搜索
因为以下原因,你没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
{{From|https://help.ubuntu.com/community/MPlayer/CVS}} {{Languages|UbuntuHelp:MPlayer/CVS}} <<Include(Tag/Unsupported)>> https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=mplayer.png https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=eyes.png This guide will help you install '''[[UbuntuHelp:MPlayer|MPlayer]] from CVS''', which should most noticeably give a '''GTK2''' GUI. If you simply want to install [[UbuntuHelp:MPlayer|MPlayer]] from the Ubuntu repositories, see the [[UbuntuHelp:MPlayer| MPlayer wiki page]] instead. <<BR>> == Main == === Enabling the appropriate repositories === Using your prefered editor, edit your ''sources.list'' file (don't forget ''sudo'') so it has these repositories enabled: <pre><nowiki> deb http://archive.ubuntu.com/ubuntu breezy-updates main restricted deb-src http://archive.ubuntu.com/ubuntu breezy-updates main restricted deb http://archive.ubuntu.com/ubuntu breezy main universe multiverse restricted deb-src http://archive.ubuntu.com/ubuntu breezy main universe multiverse restricted deb http://security.ubuntu.com/ubuntu breezy-security main restricted deb-src http://security.ubuntu.com/ubuntu breezy-security main restricted deb http://security.ubuntu.com/ubuntu breezy-security universe deb-src http://security.ubuntu.com/ubuntu breezy-security universe </nowiki></pre> You can now update your sources using <pre><nowiki> sudo apt-get update </nowiki></pre> === Installing the required/recommended packages === <pre><nowiki> sudo apt-get install build-essential debhelper libx11-dev libxv-dev libpng12-0 \ libpng12-dev checkinstall libavcodec-dev aalib1 libaa1-dev libaa1 caca-utils \ libcaca-dev libavcodec-dev libavifile-0.7-dev libsdl1.2debian-all \ libsdl1.2debian libsdl1.2-dev libesd0-dev libfaac-dev libfaad2-dev \ liblame-dev libice-dev libjpeg62-dev libmatroska-dev libmad0-dev \ libmp4v2-dev libmikmod2-dev libogg-dev libtheora-dev libvorbis-dev \ libxinerama-dev libxv-dev xlibs-dev x-dev cvs libquicktime1 libquicktime-dev \ libmjpegtools0 fakeroot libgtk2.0-dev libmpcdec-dev </nowiki></pre> If you have '''never''' used '''cvs''' before, do the following command: <pre><nowiki> touch $HOME/.cvspass </nowiki></pre> === Downloading MPlayer CVS === Issue the following commands to get the latest sources: <pre><nowiki> cvs -d:pserver:anonymous@mplayerhq.hu:/cvsroot/mplayer login cvs -z3 -d:pserver:anonymous@mplayerhq.hu:/cvsroot/mplayer co -P main </nowiki></pre> When asked for a password, just hit enter. A directory named main will be created. === Downloading FFmpeg === CVS [[UbuntuHelp:MPlayer|MPlayer]] is not fully functional without a copy of the libavcodec, libavformat and libavutil libraries from FFmpeg. To get FFmpeg CVS: <pre><nowiki> cvs -d:pserver:anonymous@mplayerhq.hu:/cvsroot/ffmpeg login cvs -z3 -d:pserver:anonymous@mplayerhq.hu:/cvsroot/ffmpeg co -P ffmpeg </nowiki></pre> When asked for a password, just hit enter. A directory named ffmpeg will be created. Copy the libavcodec, libavformat and libavutil subdirectories into the main directory just created from the [[UbuntuHelp:MPlayer|MPlayer]] checkout. <pre><nowiki> cp ffmpeg/libav* main/ -rf </nowiki></pre> In order to include libavcodec and libavutil in CVS updates, add the following lines to main/CVS/Entries: <pre><nowiki> D/libavcodec//// D/libavformat//// D/libavutil//// </nowiki></pre> Previously win32 codecs were placed in /usr/lib/win32. Applications like Xine use that directory for the same purpose. If you would like you can either keep both directories or make one linked to the other. If both directories exist you cannot link them. <pre><nowiki> sudo ln -s /usr/lib/win32 /usr/local/lib/codecs </nowiki></pre> '''Note:'''The above is '''optional'''. === Compiling MPlayer === Most users will find the default configuration options adequate. However I recommend the following options. The first option is required to install the GUI. The second option is to allow access to large files over 2GB. Useful to rip DVD's or record Digital Video. The third option is for menus in the OSD (On Screen Display). <pre><nowiki> cd main </nowiki></pre> <pre><nowiki> ./configure --enable-gui --enable-largefiles --enable-menu --prefix=/usr \ --confdir=/etc/mplayer </nowiki></pre> If some errors pops up it is most likely due to a missing dependency (hey, I '''tried''' to include them all). Once it finishes, you should be able to see what you have enabled (ie what you compiled) and you do not. This step is great to see how your compile is piling up. <pre><nowiki> make </nowiki></pre> <pre><nowiki> sudo make install </nowiki></pre> === Building MPlayer's debian package === Open a terminal and type: <pre><nowiki> fakeroot debian/rules binary </nowiki></pre> === Making it work the first time === * Install the deb package, but don't run the program. * Go to a terminal, and run <pre><nowiki> sudo mkdir /usr/local/share/mplayer </nowiki></pre> <pre><nowiki> sudo mkdir /usr/local/share/mplayer/Skin/ </nowiki></pre> * Go to the [http://www.mplayerhq.hu/homepage/design7/dload.html MPlayer download section] and download any skin (Blue is the official default skin); in a sudo terminal, extract the directory from the archive, and copy it to /usr/local/share/mplayer/Skin/ ; rename the extracted directory from "Blue" (or whatever) to "default" (cd to the Skindirectory and then try: sudo mv Blue default) * Assuming that you've downloaded the Microsoft core fonts (by installing '''msttcorefonts'''), do this: <pre><nowiki> sudo ln -s /var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType/Arial.ttf \ /usr/local/share/mplayer/subfont.ttf </nowiki></pre> '''Now''' you can safely start ''gmplayer''. You can later import more skins to the ~/.mplayer/Skin folder. == Extras == === Smooth playback === The defaults of [[UbuntuHelp:MPlayer|MPlayer]]'s A-V sync parameters aren't fine-tuned for perfect files. When looking at timing in such detail, you should take care of video timers, too. Be sure that the hardware RTC timer is used ([[UbuntuHelp:MPlayer|MPlayer]] will complain to the standard output if the RTC timer has a value lower than 1024, start mplayer from a terminal window and examine the error messages). First make sure the kernel rtc module is loaded in your kernel permanently: <pre><nowiki> gksudo gedit /etc/modules </nowiki></pre> Add <pre><nowiki> rtc </nowiki></pre> at the end of the list. Now to set up the rtc timer value at booting up time: <pre><nowiki> gksudo gedit /etc/sysctl.conf </nowiki></pre> Add the following: <pre><nowiki> dev.rtc.max-user-freq=1024 </nowiki></pre> and save the file. For faster loading times, you will need to include the rtc module in your initrd image. Add it to your mkinitramfs configuration file: <pre><nowiki> gksudo gedit /etc/mkinitramfs/modules </nowiki></pre> Add: <pre><nowiki> rtc </nowiki></pre> and regenerate the initrd file of your running kernel: <pre><nowiki> sudo dpkg-reconfigure linux-image-$(uname -r) </nowiki></pre> In case you have several kernels installed, you will have to specify their version explicitly. If you want instant gratification, you can set up the rtc values of the running kernel before stating mplayer like this: <pre><nowiki> sudo modprobe rtc </nowiki></pre> <pre><nowiki> sudo sysctl -w dev.rtc.max-user-freq=1024 </nowiki></pre> === Updating your CVS MPlayer === Go to your [[UbuntuHelp:MPlayer|MPlayer]] '''main''' directory and do <pre><nowiki> cvs -z3 '''update''' -dPA and repeat the compiling steps. </nowiki></pre> === MPlayer Clearlooks skin === The [http://www.gnome-look.org/content/show.php?content=21745 Clearlooks skin] is available on gnome-look. === Mozilla MPlayer Plugin === Go [http://prdownloads.sourceforge.net/mplayerplug-in/mplayerplug-in-3.11.tar.gz?download here] to get the source, and you'll also want to get the [http://ftp.mozilla.org/pub/mozilla.org/mozilla/releases/mozilla1.8b1/gecko-sdk-i686-pc-linux-gnu-gtk2+xft-1.8b1.tar.gz Mozilla SDK]. Once that is downloaded, extract it, just like we did mplayer, then browse to the directory it made and run ./configure again, this time with the following options: <pre><nowiki> ./configure --with-gecko-sdk=/path/to/gecko-sdk --enable-gtk2 </nowiki></pre> Once ./configure is done, just run: <pre><nowiki> make && sudo checkinstall </nowiki></pre> And again, it will compile, build a deb file, and install the deb file for you. === ASCII text video (colored) === <pre><nowiki> mplayer ''video.avi'' -vo caca </nowiki></pre> === ASCII text video (black and white) === <pre><nowiki> mplayer ''video.avi'' -vo aa </nowiki></pre> === Guide discussion === Follow the [http://www.ubuntuforums.org/showthread.php?t=85190 link]. ---- [[category:UbuntuHelp]]
该页面使用的模板:
模板:From
(
查看源代码
)
模板:Languages
(
查看源代码
)(受保护)
模板:Languages/Lang
(
查看源代码
)(受保护)
返回至
UbuntuHelp:MPlayer/CVS
。