# Playing from &kde; I/O Slaves

## What are &kde; I/O Slaves

&kde; has a great way to access all kinds of data through a system known as I/O Slaves. They are little programs that let you represent many different sources of data as URL like addresses, and open them in &kde; programs like &konqueror; and &kplayer;. For example you can access a network host over SSH with a URL like `fish:/host/path/`, or a zip file with `zip:/home/cooldude/my.zip`.

## How &kplayer; uses them

Many of the &kde; I/O Slaves can return video and audio files and streams, for example `fish:`, `sftp:`, `webdav:`, `tar:`, `zip:`, `audiocd:` and so on. &kplayer; will play them just like any other type of file. By default it will pass the data directly to &mplayer; through a named pipe. If that does not work for any reason, you can tell &kplayer; to use a temporary file for playing from &kde; I/O Slaves on the Advanced page either globally in &kplayer; Settings or in individual File Properties. &kplayer; will then download the entire file into a temporary directory before playing it, which will consume some disk space temporarily, but will allow seeking and length detection.

Note that using the `audiocd` slave is not recommended. Instead you should use &kplayer;'s own support for disk devices. It will detect an audio CD, find audio tracks on it and list them on a submenu under the File menu for easy playback, and will also try to retrieve the disk and track titles from an online database.

## HTTP, FTP and Samba

The best way to play URLs that &mplayer; supports is by passing them on to &mplayer; directly. But if &mplayer; cannot play an HTTP, FTP or Samba URL for any reason, you have the option to tell &kplayer; to use a &kde; I/O Slave. You can do that on the Advanced page either for that individual URL in its File Properties or globally for all URLs of a particular type in &kplayer; Settings.

## Cache size

When playing directly from a &kde; I/O Slave, the Cache setting is important. It should not be too small so &mplayer; can detect the encoding type without discarding data, but on the other hand with large values it will take longer to fill the cache, especially with low bitrate streams like online radio stations.

&kplayer; lets &mplayer; choose an optimal cache by default, but if you experience problems, you can try a cache size setting of one megabyte. The cache size can be set on the Advanced page either globally in &kplayer; Settings or in individual File Properties. Keep in mind that the global setting will also affect files played directly by &mplayer;, and changing it can cause unwanted side effects.

## Playlist files

When using a &kde; I/O Slave to play a playlist file, only the playlist file itself will be retrieved from the I/O Slave. All the URLs it contains will be played by &mplayer; directly. You have to give &kplayer; the URL contained in the playlist if you want it to be played through an I/O Slave.