This page is designates for for my patches, notes and addons for Klaus Schmidinger's famous Video Disk Recorder (VDR). These informations are provided without any warranty but informations about successful or even unsuccessful use are welcome (and might be noted here also).
According to Sascha Volkenandt, his plugin to use a mplayer on a remote server for transcoding a mplay-able file for DVB output is no longer maintained. However with some slight patches, it works for me with the current VDR release (1.2.5, 1.2.6 should work also).
This patch solves the problem, that the plugin won't compile unter the current VDR version. It is only a "dirty hack", but it works for me.
mplayercluster-0.0.1a-vdr-1.2.5_dirtyhack.diff
Addendum: Sascha gave me a hint how to code a "clean" patch without nasty hacks. Please use this one!
mplayercluster-0.0.1a-vdr-1.2.5.diff
Compiling the MPlayerCluster plugin gave me some warnings on my Debian Sarge (aka "testing") Linux. This patch tries to fix the by added a polymorphic method with the correct signature. As the method is never used (the code compiles without it also), this should not influete the semantic of the code but only avoid the warning.
mplayercluster-0.0.1a-gcc-3.3_no_warnings.diff
The MPlayer plugin of Stefan Huelswitt does not invoke mplayer directly. Instead, it calls a script "mplayer.sh". There are different more or less complicated scripts around, which do some special stuff to determine, how to call mplayer finally.
One very good is the one from Martin Hoffmann and Juri Haberland, which can be found at Juri's Homepage. It has a addional config file to make some preferences and can make optimizations for slow CPUs. Addionally I use it to even "transcode" NTSC resolution MPEG files to PAL ones as (of course) my DVB card can play back NTSC material, but my TV set does only support NTSC in black and white.The only two restrictions, what a "mplayer.sh" script must do, is that it is called with the filename to play as the first parameter and a option string "SLAVE" as a second one. For more informations about, what "Slave" does, read about on the MPlayer plugin homepage. For the MPlayerCluster, the SLAVE command is the only possibility to make use of the script.
This patch changes the recode-server of the MPlayerCluster plugin in a way, that it uses a mplayer.sh script instead of directly invoking mplayer to make use of the features, provided by the mplayer.sh scripts around. You should invoke the recode-server with the full path to your mplayer.sh script.
mplayercluster-0.0.1a-mplayer_sh.diff
For those of you, that do not want to start the recode-server by hand, I mad a init-script, that starts it automatically. Features are:
I don't think, that this is a template for a good system init
script, but it does its job (yes: for me!). Just copy it to
/etc/init.d/ make it executable (chmod +x
/etc/init.d/mplayercluster
) and use your distribution's
"service-manager" to have it run on boot. On Debian, this can be
done by update-rc.d mplayercluster defaults 90
As a result of enhancing the MPlayerCluster plugin, I also mad a enhancement to MPlayer and the mplayer.sh script used in (my) MPlayerCluster plugin and the MPlayer plugin.
Due to a lack of support in my TV set, I am only able to watch NTSC material in black and white. This is quiet sad, as normally my DVB-card is able to decode NTSC-MPEG directly, without transcoding it with mplayer.
After studying the code of Martin Hoffmann and Juri Haberland's mplayer.sh script and mplayer itself, I nearly found a solution. The mentioned mplayer.sh script can be configured to transcode NTSC-sized material (including MPEG) to PAL-compatible sized. Also, it is possible to set a speed flag, which leads to a slower playback, so that the NTSC-typical 29.97 frames per second are played with 25 frames per second leading to a 2997/2500 = 1.1988 longer playtime. This would be tolerable. But another side effect is that the sould get ugly (much lower). This is not stifying for me.
So I digged out my C knowlegde and patched mplayer's framestep filter to be able to use it for the desired framerate conversion. Here my patch:
mplayer-20031128cvs-framestep-rational.diff
After that I changed the mplayer.sh script to be able to make use of the new mplayer feature. I added a possible option to specify that the framestep filter should be used if the media and output framerate differ (as it happens in my case, having disabled the NTSC option). Here is the patch for mplayer.sh:
Now playing NTSC material play quiet smoothly on my TV set (in PAL :-) ).
As the mplayercluster-plugin from Sascha Volkenandt is no longer maintained (at least from himself currently), I now decided to to "do it on my own". The first results can be see in the recoder-tools.
As the result of now using my own recoder-tools, I can now use the normal MPlayer Plugin from Stefan Muempf.
After a while of using it, I found it hard, that it has not the same small feature I like so much when playing normal vdr recording: resume. So I decided to code the missing functionalty on my own. Here is the resulting patch:
vdr-mp3-0.8.3-resume-mplayer.diff
For those of you interested in the design, here some explainations:
I also made some extensions additions to vdr itself.
As I do not like to have the configuration files in the same directory as the video files, I made a small patch to build vdr with a default configuration directory different from the default video directory. This avoided to specify a configuration directory every time, I start vdr.
I also enhanced the installation target(s) of the Makefile. Needed directories (like bin, man, man/man1, man/man5) are now automatically created if they do not exists. Additionally a new target "plugins-install" calls the "install" target for every plugin (only if it exists). I added this target for the example plugins. This target only copies the build plugin library to the directory specified as "$(PLUGINLIBDIR)" in the Makefile or better Make.config. With the help of these targets, you can install vdr and its plugins in a clean directory with "make install plugins-install".
vdr-1.2.6-configdir-plugins-install.diff
For different reasons, I developed my own starting system for vdr, independently from runvdr. It is based on running the final vdr-command in a endless loop similar to runvdr, but without driver reloading, which makes it possible to run it also as non-root.
As I want to control my vdr ocationally via console,
the loop (called vdrd) is run in a screen(1).
This way, I even can control vdr via a "remote" console,
e.g. login into my vdr machine using ssh and typing screen
-r VDR
.
Another good feature is, that I connect this screen(1) to the local console 10 automatically. If I have a keyboard connected to my vdr machine, I can use it a comfortable remote control for typing text (I'm planing to use it with the console-plugin, but this is not realized yet!).
Last but not least, I use several plugins, which possibly have to have some command line options. To avoid having to administrate a very long and unreadable vdr command line, I use a shell-array-variable and bash's quoting facilities to specify my plugins.
These starting scripts are provided here without any warrenty. As I do not have the time, you are on your own with documentation and customization. You can freely distribute and modify them, as long as the copyright line with my email address remains.
visitors since Thu Nov 27 11:32:06 CET 2003 (page liftoff).
Patrick Cernko Last modified: Sat Feb 11 17:28:34 CET 2006