Chapter 5. The playable sources

Table of Contents


KMPlayer can play from various sources. These sources are listed in the Source menu.


KMPlayer can play from TV cards using MPlayer or XVideo (using kxvplayer). Before you can watch TV, you have to configure which device to use and the TV channels. You can use the scanner from the configure dialog for this or edit the config file manually.

The config file for TV settings is a XML file, located ~/.kde/share/apps/kmplayer/tv.xml. See here for manipulating this data directly. The XML format is like this example:

    <device path="/dev/video0" width="320" height="240" name="BT878 video (Hauppauge (bt878))" audio=""
              minwidth="48" minheight="32" maxwidth="924" maxheight="576" playback="0" xvport="240">
        <input name="Television" id="0" tuner="1" norm="PAL" xvenc="0">
            <channel name="Ned1" frequency="216"/>
            <channel name="VCR" frequency="594.90"/>
        <input name="Composite1" id="1" xvenc="7"/>
        <input name="S-Video" id="2" xvenc="14"/>
        <input name="Composite3" id="3"/>
    <device path="/dev/video1" width="640" height="480" name="Philips 740 webcam" audio=""
              minwidth="160" minheight="120" maxwidth="640" maxheight="480" playback="1">
        <input name="Webcam" id="0"/>

Note that input elements having channels, should have the tuner attribute set to 1.

XVideo only uses the xvport and xvenc attributes and they can only be set by manually editing this file. The values of these two attributes can be retrieved by running kxvplayer in a terminal application like konsole. For every port, kxvplayer will output lines like below and the numbers can be set for the attributes mentioned.

    xvport 240
    encoding: 0 PAL-television
    encoding: 1 NTSC-television
    encoding: 2 SECAM-television

Also width and height attributes are ignored by the XVideo player. This player gets the sizes from the X server. One of the nice things of XVideo is that scaling is done in hardware, by the video card, so fullscreen support without CPU usage and without resolution change of your monitor. Also no annoying flicker when another window overlaps this video window.

See the VDR section for more information about using XVideo.