&kmplayer; is an application that is a TDE frontend to <application>MPlayer</application>, <application>Xine</application> and <application>GStreamer</application>.
It's also possible to set an alternative animation. &kmplayer; will look at resp. <filename>~/.trinity/share/apps/kmplayer/intro.xml</filename> and <filename>~/.trinity/share/apps/kmplayer/exit.xml</filename>. The format has to be a supported <acronym>XML</acronym> file.
The intro animation doesn't have to be a short one, because it will automatically end when another source is opened. Of course for the exit animation this would be a bit annoying, however the user can always end the application twice.
</para>
<para>
A simple example of an intro, showing your favorite photo can be
&kmplayer; can play from various sources. These sources are listed in the Source menu.
</para>
<section id="tvsource">
<title>TV</title>
<para>
&kmplayer; can play from TV cards using <application>MPlayer</application> or <acronym>XVideo</acronym> (using <application>kxvplayer</application>). 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.
</para>
<para>
The config file for TV settings is a <acronym>XML</acronym> file, located
Note that <quote>input</quote> elements having channels, should have the <quote>tuner</quote> attribute set to <quote>1</quote>.
</para>
<para>
<acronym>XVideo</acronym> only uses the <quote>xvport</quote> and <quote>xvenc</quote> attributes and they can only be set by manually editing this file. The values of these two attributes can be retrieved by running <quote>kxvplayer</quote> in a terminal application like <quote>konsole</quote>. For every port, <quote>kxvplayer</quote> will output lines like below and the numbers can be set for the attributes mentioned.
<programlisting>
xvport 240
....
encoding: 0 PAL-television
encoding: 1 NTSC-television
encoding: 2 SECAM-television
....
</programlisting>
Also width and height attributes are ignored by the <acronym>XVideo</acronym> player. This player gets the sizes from the X server. One of the nice things of <acronym>XVideo</acronym> 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.
</para>
<para>
See the VDR section for more information about using <acronym>XVideo</acronym>.
</para>
</section>
<section id="vdrsource">
<title>VDR</title>
<para>
To configure your VDR settings in kmplayer, see the Configure panel->Source->VDR->XVideo port panel. There should be ports detected, from which you should select one. You have to figure out what encoding you should use (eg. for western europe, that is PAL) and likely the correct one has a name with <quote>dvb</quote> in it.
</para>
<para>
For instance, I have a TV card, a DVB-S card and a webcam pluged into my system. With these, my settings are that there are three Ports. The first one has a long list of NTSC(-JP)/PAL(-M)/SECAM entries all saying something about television/composite/svideo (my TV card). The second one has NTSC-dvb/PAL-dvb/SECAM-dvb (my DVB-S card). And finally the third has only ntsc/pal (probably my webcam). I should therefore configure (just select it) the second port and second entry (PAL-dvb).
</para>
<para>
Because VDR support from kmplayer can only use <acronym>XVideo</acronym>, of course <acronym>XVideo</acronym> should work (and I believe for video devices, this way of viewing only works on linux). Also this only works on your first display (:0.0). So make sure <quote>videoforlinux</quote> extension works with the X server. For the XFree86 server, therefor in its configuration (<filename>/etc/X11/XF86Config</filename>) it should have
<programlisting>
Section "Module"
....
Load "v4l"
EndSection
</programlisting>
</para>
<para>
Unfortunately, when ever you update your video driver, you have to reconfigure this setting.
</para>
</section>
<section id="kmplayer_url">
<title>Commandline</title>
<para>
Internally for the sources, &kmplayer; uses distinct names. At the time of
this writing these are "dvdnavsource", "dvdsource", "exitsource",
"urlsource", "vcdsource" and "vdrsource". When activated, they mostly
starts playing the list of playable items.
</para>
<para>
You can activate a particular source with a <filename>kmplayer://</filename> type <acronym>URL</acronym>. Just set the host part as the source name and optional path part as extra arguments, so for a channel for the "vdrsource" this could look like <filename>kmplayer://vdrsource/22 MTV 2</filename>. Eg. this script starts kmplayer using "dvdnavsource" and using <acronym>DCOP</acronym> to play fullscreen.
<programlisting>
/bin/bash
kmplayer kmplayer://dvdnavsource/ &
PID=$!
sleep 2
dcop kmplayer-$PID KMediaPlayer toggleFullScreen
</programlisting>
For some sources this will not do much because they are not meant to be
for normal playing. For "pipesource" this is disabled because that
would be a bad security hole of course.
</para>
</section>
</chapter>
<chapter id="questionsanswersandtips">
<title>Questions, Answers, and Tips</title>
<qandaset id="faq">
<title>Frequently asked questions</title>
<qandaentry>
<question>
<para>Xine starts up slow, why does it have to benchmark my CPU all the time?</para>
</question>
<answer>
<para>
Note the answer below is outdated. <application>kxineplayer</application> saves it automatically to last value, so only the first time xine will do the CPU test.
<para>The <application>Xine</application> frontend for &kmplayer;, <application>kxineplayer</application>, uses <filename>~/.trinity/share/apps/kmplayer/xine_config</filename> for its configuration. Settings for <application>Xine</application> are found in the configuration dialog <quote>General Options</quote>|<quote>Xine</quote>. (If you change an option here and save it, <filename>~/.trinity/share/apps/kmplayer/xine_config</filename> will contain some explainations too). The CPU benchmarking is caused by the option <computeroutput>misc.memcpy_method</computeroutput> set to <computeroutput>probe</computeroutput>. To see which memcpy version works the fastest for you, enable <quote>Show Console Output</quote> from the <quote>View</quote> menu and look at the results from this benchmarking when you play something with Xine. Configure <computeroutput>misc.memcpy_method</computeroutput> with the method with the lowest time.</para>
<para>Any hints to make my CDROM less noisy when playing from it (not VCD://)?</para>
</question>
<answer>
<para>Sure, try <command>hdparm -E 8 /dev/cdrom</command> as root after mounting the device. But be sure to double check <filename>/dev/cdrom</filename> pointing to your CDROM drive.
</para>
</answer>
</qandaentry>
</qandaset>
</chapter>
<chapter id="credits-and-licenses">
<title>Credits and Licenses</title>
<para>&kmplayer; copyright 2002,2003 Koos Vriezen</para>