.\" .TH MPlayerXP 1 .SH NAME MPlayerXP \- mplayer with extra performance .SH SYNOPSIS .B mplayerxp <-options> streamname .PP .SH DESCRIPTION .I mplayerxp MPlayerXP is a branch of well known mplayer (http://mplayerhq.hu) (runs on many Unices, and non-x86 CPUs, see section 6). It plays most MPEG, AVI, MOV/QT and ASF/WMV files, supported by many native and Win32 DLL codecs. You can watch VideoCD, SVCD, DVD, and even DivX movies too. Unique big features of mplayer(xp) are .I VIDIX technology which provides direct access to BES of video cards. Due this feature MPlayerXP is first player under *nix .B BUSMASTERING - the case when decoded frames are transfered into videomemory without CPU usage. .I VESA Provides movie playback on every VESA compatible card, even without X!, and enables TV-out no many cards. Main difference of .I MPlayerXP from .I MPlayer is new thread-based core. This core was designed for .B DECODING AHEAD feature which provides EXTRA performance of movie playback. Several subtitles types are supported (curently 9 !) and the fonts are rendered with nice big antialiased shaded fonts ! Of course there is support for european/ISO 8859-1,2 (hungarian, english, czech, etc), cyrillic, korean fonts. .LP .SH "XP OPTIONS" .TP .B \-xp\ <0-4> start MPlayerXP in XP mode. You should get smoothness (fixed FPS on the screen) with UP systems and decoding speedup with SMP. 0 : XP mode off 1 : Decode video in separate thread 2 : Decode audio and video in the same separate thread 3 : As 2 plus audio playing in separate thread .B [default] 4 : Decode video and audio and play audio in three different threads .TP .B \-da_buffs Allows you specify number of buffers for decoding ahead. You can set it from 5 upto 64. 64 is default. (I recommend to use 10 buffers as minimum to avoid screen juddering and other negative factors). .I NOTE: .B (For both - UP and SMP) drivers which provide direct BES access will change it automatically but you may force this number to decrease number of buffers. From other side - than more buffers you are using than less number of delays you will have during decoding and you will be able to watch frame which take longer time to be decoded just in time. .IP .SH "AUDIO-VIDEO SYNCHRONIZATION" .I Introduction: Almost all movies consist from two independed streams (audio and video) at least. These streams have different bitrate and number of total frames per movie. To play them synchronously we need to have some control points when both audio and video should be presented simultaneously at the same moment of time. From historical reasons, mplayerxp had two methods of A-V synchronizations: so-called .B dapsync and so-called .B Arpi's method. But version .I 0.5 of mplayerxp introduces new .B PTS-based method of A-V synchronization. .SS PTS-based method. From point of player PTS-based synchronization is the best choise since player knows PTS of every audio and video packet and knows when they should be present. But there are some negative sides - movies which were produced with violating of all laws of video industry. For example, simplest merging of independed files into single one or dumping DVDs without PTS fixing :( But even in case of such movies there are chances to reach A-V synchronization within of short time. (Of course, if player won't sleep in case when audio PTS is already 0 but video PTS still much large than 0). Main positive side of this method is .B auto-convergence from point of synchronization. .SS DAP and Arpi's methods. Both methods are based of frame duration instead of PTS and that even worse - both methods handle PTS info for video part of movie only ignoring audio PTS. They assume that audio stream has constant bitrate and since audio frames can't be dropped and/or played faster or slower then player can use timer of audio card as the measure for video pts. Main negative side of this method is impossibility to detect A-V resync if it happens by some reasons (VBR audio as one of them) or when there exists drift between streams (due not a perfect hardware/drivers for example). .TP .B \-pts use PTS based method of A/V synchronization. .I [default] in XP mode. .TP .B \-force_pts_fix force PTS fixing for "bad" (see PTS-based method explanation above) files. Useful as "cure" tool during stream remuxing (see .B "MUXING" section below). .I Note: It's default mode during DVD .B riping/playback .I Note2: It's useful only with described above cases and is not acceptable in other cases. .I Note3: It may cause problems after seeking in some cases. .TP .B \-force_pts_fix2 .I [default] in XP mode for MPEG with -pts. Difference from the previous method is that PTS are not changed, instead are the frame duration temporarily used until both audio and video PTS has restarted from 0. This method does not have the problem after seeking but it can not be used together with -nopts and it is default off in that case. If -force_pts_fix is set than that method will be used even if -force_pts_fix2 is set to. .TP .B \-nopts use Arpi's A/V sync method. .TP .B \-nopts \-dapsync use alternative A/V sync method. Where is it useful? (is not available in .I XP mode) .TP .B \-frame_reorder .I [default] in XP mode. Useful with -pts in XP mode on some MPEG where the frames are not stored in order. The frames pts is reordered as they are add to buffer. .TP .B \-delay\ audio delay in seconds (may be +/- float value) .TP .B \-fps\ force frame rate (if value is wrong in the header) (float number) (works with .I \-nopts key only) .TP .B \-mc\ maximum sync correction per 5 frames (in seconds) (works with .I \-nopts key only) .TP .B \-noframedrop no frame dropping : every frame is played, audio and video may be out of sync .I [default] .TP .B \-framedrop frame dropping : decodes all video frames, but skips displaying some ones (useful for slow cpu/systems) .TP .B \-hardframedrop hardframe dropping : skips displaying and decoding of some frames .I Note: may produce image distortion with some codecs (useful for very slow cpu/systems) .TP .B \-softsleep uses high quality software timers. Efficient as the RTC, doesn't need root, but requires more CPU. .TP .B \-nortc Disables using of /dev/rtc (real-time clock - high precision x86 chip) to compute PTS. .LP .SH "BUS MASTERING OPTIONS (OR SPEEDUP)" .I Introduction: Many modern chips have the ability to act as a bus master. Bus mastering allows to transfer data from system memory to the frame buffer and vice versa with minimal CPU usage. When chip acts as a bus master then it frees CPU for other useful work and acts similar to second CPU on SMP. Performance is differ on slow and fast CPUs and on different chips but anyway bus mastering should povide speedup on any system. .TP .B \-enable_bm Enables using of bus mastering if it's available for given OS/videocard. .I Note: 1. To use this feature you should load dhahelper (linux-kernel driver) which provides some function which are unavailable from user-space. 2. You need to use VIDIX. 3. VIDIX driver for your card should provide but card should support bus mastering. 4. You need to use XP mode. .TP .I Examlpe: .TP cd mplayerxp/libdha/dhahelper .TP make all install .TP modprobe dhahelper .TP mplayerxp -vo xvidix -xp -enable_bm -fs -zoom videoout.avi .SS .I Another ways to speedup playback: In general, there are two ways to increase performance of playback - .I 1. Using of additional hardware (most effective way) and .I 2. optimizing software to descrease number of cpu clocks required per frame playback (most difficult and limited way). Well, .B busmastering is one of ways to attract additional hardware. But not only video card may act as master. Almost all modern hardware is able to be master in system. You should spend your attention to investigate this quesion to have maximal performance of your system. Under linux exists generic way to attempt enable DMA transfer from HDD (CDROM,DVDROM) through hdparm utility: .PP hdparm -u1 -d1 -a8 /dev/hdX .PP where hdX is device with file or movie. .TP .I Examlpe: hdparm -u1 -d1 -a8 /dev/cdrom .TP .I Note: This command doesn't increase the speed of data transfer but frees CPU for other useful work. .SS .I DMA for audio: The best way to have DMA for audio stream is installing of SBLive! like cards which don't have on-board memory and always act as masters. In other case you should study options of your kernel drivers (OSS or ALSA) to find out way to enable data transfer from RAM into audio card without CPU usage. .SS .I See also: If you have very slow system (means: nothing helps) then please read also .B "LongPlay" description in .I POSTPROCESSING section .LP .SH "GENERAL OPTIONS" .TP .I NOTE Every "flag" option has "noflag" pair, e.g. -fs opposite is -nofs .TP .B \-vo\ [:] select video output driver and optinaly device. "device" is valid with SDL and GGI too, it means sub-driver then (for example: -vo sdl:aalib). you can get the list of available drivers executing .I mplayerxp -vo help .TP .B \-ao\ [:] select audio output driver and optinaly device. "device" is valid with SDL too, it means sub-driver then (for example: -vo sdl:esd). If using OSS, you can specify which sound device to use like this : -ao oss:/dev/dsp1 (replaces the old -dsp option) you can get the list of available drivers executing .I mplayerxp -ao help .TP .B \-lircconf\ specifies a configfile for LIRC (see http://www.lirc.org) if you don't like the default ~/.lircrc .TP .B \-v enable verbose output (more -v means more verbosity) .TP .B \-benchmark Performs benchmarking. Currently it displays 3 characteristics of movie playback: MIN benchmark, AVE benchmark and MAX benchmark. You can estimate possibility of usage of .B -xp key: you should have no dropped frames if both MIN and AVE BENCH are less than 100%. .I Note: The more is the difference between MIN and MAX BENCHS, the better is the performance of new core. .I Note: If MIN BENCH is more than 100% then MPlayerXP will not help you! (Same as MPlayer). .TP .B \-playlist play files according to this filelist (1 file/row or Winamp or ASX format). .TP .B \-ss\