Basic configuration

Basic configuration

As a general rule, the initial KPlayer settings are chosen for optimal performance and playback, so no additional setup is needed. However, in some cases changing the initial settings can improve KPlayer performance.

Video setup

XVideo is the video output KPlayer uses by default. For many systems this is the optimal choice. Make sure your X Server has XVideo extension enabled. Look in your /etc/X11/xorg.conf or /etc/X11/XF86Config-4 file for a line that reads

Load "extmod"

This is the line that loads the XVideo extension, so make sure it is not disabled. Also check /var/log/Xorg.0.log or /var/log/XFree86.0.log to make sure that XVideo is loaded without error.

If KPlayer cannot use XVideo for any reason, it will fall back on using X11 video output in the default configuration. X11 output is OK except it forces the use of software scaler, which will consume significantly more processor cycles, and it does not support changing contrast, brightness, hue and saturation, so those controls will not be functional.

Depending on your video card, you may find that a different MPlayer video output type(s) work better for you. For example you can try VIDIX output if you have a Matrox or ATI card. For Matrox cards there is also XMGA output.

You can change the video output type on the Video page in KPlayer Settings. However, some video outputs may not support embedding video into KPlayer and will open their own window instead. Those video outputs are not recommended.

Audio setup

The optimal audio output to use with KPlayer is ALSA, which is the default setting when KPlayer is first installed. If ALSA is not available, OSS is the second best choice.

If the audio output is configured correctly, but KPlayer cannot use it, usually it is because another program has locked the audio device. The optimal solution for this is to allow multiple programs access the audio device at the same time.

For example, to set up ALSA to allow more than one program to use the same device, put something along these lines into your ~/.asourndrc:

  type dmix
  ipc_key 1234
  slave.pcm "hw:card-name"

where card-name is the name of the audio card that you can find out by running cat /proc/asound/cards. Before trying the new configuration, be sure to stop any programs that are known to lock audio devices and keep them locked, for example killall artsd

You can change the audio output type on the Audio page in KPlayer Settings.

However, some audio outputs like SDL or sound server outputs like ARTS or ESD are not recommended since they may cause stability problems, degraded performance and a broken volume control.

MPlayer setup

Depending on how you installed MPlayer you may have gotten a global mplayer.conf file in a directory like /etc/mplayer. The local version of that file is ~/.mplayer/config. Make sure that those files do not have a gui=yes option. Remove or comment it out if you find it. If you ever want to use MPlayer's own GUI (not recommended), you can get it by running gmplayer.

Also make sure there are no other options that may interfere with KPlayer operation. If you see any, either comment them out or override them in KPlayer Settings.

Smooth playback

A while ago Arpi wrote a Fine-tuning MPlayer article where you can find more useful tips on optimizing MPlayer.

One thing you can do to get smoother playback is enable the hardware RTC timer. Run

echo 1024 > /proc/sys/dev/rtc/max-user-freq

as root, and also make sure /dev/rtc is user readable.

Arpi also recommends trying options like -mc 0.001 and -autosync 30. Put them into the Additional command line arguments field on the Advanced page in KPlayer Settings and see if they make a noticeable difference for you.

The -vop MPlayer option has since been replaced by the -vf option, so that section of the article may be somewhat obsolete or the tips may need some adjustment for the current MPlayer.

Previews in the Open File dialog

There is some obsolete KDE based software, like Kaboodle, that tells KDE that it wants to be used for previewing media files, even those it does not support, in the standard Open File dialog, which is what KPlayer uses. This makes browsing directories with media files painfully slow, and unfortunately there is no option to turn off previewing selectively for certain file types. Even if you turn off the Play automatically option, the preview program will still be loaded. The workaround is to either turn off previewing in KPlayer entirely if you don't need it, or remove the offending program from your system.

Previewing files in KMLDonkey

The recent official MLDonkey GUIs have been badly broken, leaving KMLDonkey as the most usable, albeit crashy, MLDonkey frontend. KMLDonkey supports embedding of KPlayer for previewing files, but it is recommended that you change your mldonkey_preview script to start the full KPlayer for previewing partial downloads, since that will give better interface and more options. If MPlayer cannot play a partial download, probably nothing else will, so just wait for a larger chunk to get downloaded.


Would you like to make a comment or contribute an update to this page?
Send feedback to the KDE Docs Team