This is a "post plugin" for xine based media players. Written by: Andreas Auras (yak54@gmx.net) See the file COPYING for license information. Many ideas and algorithm for this plugin had been derived from the fantastic Atmolight-plugin for the Video Disk Recorder (VDR) that was developed by Eike Edener. Description: ------------ The "atmo" post plugin analyze the video picture and generates output data for so called "atmolight" controllers. For detailed informations about "atmolight" visit the VDR-Wiki: http://www.vdr-wiki.de/wiki/index.php/Atmo-plugin http://www.vdr-wiki.de/wiki/index.php/DF10CH This project is hosted at: http://projects.vdr-developer.org/projects/show/xine-lib-atmolight Requirements: ------------- Actual xine-lib-1.2 release: http://hg.debian.org/hg/xine-lib/xine-lib-1.2 The xine-lib-1.2 library must have the df-xine-lib-extensions patch applied from here: http://projects.vdr-developer.org/projects/xine-lib/files For compiling the plugin the xine-lib and libusb-1.0 development files have to be installed. On debian based systems these are packages libxine-dev and libusb-1.0-0-dev. Compiling and installation: --------------------------- make make install Configuration: -------------- Load this plugin as a post plugin in your xine based media player. For the VDR xineliboutput player or xine-ui player add a command line option like this: --post=atmo:driver=classic,driver_param=/dev/ttyS0,top=1,bottom=1,left=1,right=1,center=1 When using DF10CH controller(s): --post atmo:driver=df10ch Parameters understood by this plugin: ------------------------------------- The plugin stores the actual parameter setting in the xinelib config file under the key 'post.atmo.parameters'. Plugin parameters specified at the command line are mandatory and always override the parameters stored in the xinelib config file at startup time. You should specify all static parameters like output driver or section layout at the command line. Parameters that you wish to trim while player is running should not be specified within the command line. Players like xine-ui have GUI support for changing plugin parameters (press p to show the post processing panel). Changes of Parameters marked with * will be immediately applied while player is running. The other parameters will be applied after a stream close/open sequence (this happens already when switching a channel within VDR). Parameter Default Description driver none Selects output driver. Currently supported are: file Write output data to file. Useful for testing and debugging. classic Send output data to serial port. Used Protocol is for "classic" Atmolight 2 channel controller. See: http://www.vdr-wiki.de/wiki/index.php/Atmo-plugin df4ch Send output data to serial port. Used Protocol is for my own designed 4 channel controller. df10ch Send output data via libusb to my own designed DF10CH 10 channel Controller(s). driver_param Parameter for output driver: file: File name of output file. If not specified "xine_atmo_data.out" is used. classic, df4ch: Path of serial device e.g. /dev/ttyS0 For users with usb-to-serial converters the device could be specified as a regular expression that is looked up in /proc/tty/driver/usbserial to evaluate the /dev/ttyUSB device. The parameter must start with "usb:" followed by the regular expression e.g.: usb:pl2303.*usb-.*-[^6] df10ch: All connected controllers are scanned automatically. No parameter required here. top bottom left right center top_left top_right bottom_left bottom_right 0 Number of sections (RGB channel groups) in area. For top, bottom, left and right area more then one section could be specified. Valid values: 0 ... 25 for top, bottom, left, right Valid values: 0 ... 1 for center, top_left, top_right, bottom_left, bottom_right NOTE!!!: Starting from plugin version 0.3 for "classic" controllers you must define one section for area top, bottom, left, right and center as plugin parameter!!! For DF10CH controller you do not have to specify these parameters here because they are read from the controller configuration data. Use the DF10CH setup program to configure your desired layout. analyze_rate * 35 Rate of frame grabbing and video analysis. Unit milliseconds. Valid values: 10 ... 500 analyze_size * 1 Size of analyze window. The window width is calculated by (analyze_size+1)*64 pixel. The window height is calculated aspect correct according to the grabbed video window size. So a analyze size of 1 for a 16:9 video will give us a 128x72 pixel analyze window. Valid values: 0 ... 3 For DF10CH controller you do not have to specify this parameter here because it is read from the controller configuration data. Use the DF10CH setup program to configure your desired analyze size. overscan * 30 Ignored overscan border of grabbed video frame. Unit is percentage of 1000. e.g. 30 -> 3% Valid values: 0 ... 200 For DF10CH controller you do not have to specify this parameter here because it is read from the controller configuration data. Use the DF10CH setup program to configure your desired overscan. edge_weighting * 60 Power of edge weighting. Value is divided by 10 e.g. 80 -> power of 8 Valid values 10 ... 200 For DF10CH controller you do not have to specify this parameter here because it is read from the controller configuration data. Use the DF10CH setup program to configure your desired edge weighting. darkness_limit * 1 Minimum brightness of pixel. Values below are interpreted as black pixel. Used to detect and skip "black borders" in video. Valid values are 0 ... 100 hue_win_size * 3 Windowing size for HUE. Valid values 0 ... 5 sat_win_size * 3 Windowing size for saturation. Valid values 0 ... 5 hue_treshold * 93 Threshold limit for change of color. Unit percentage of 100. Valid values 1 ... 100 brightness * 100 Controls brightness of generated color values. Unit percentage of 100. Valid values 50 ... 300 Note: When using DF10CH controller(s) it is better to use the white calibration or common brightness feature of the DF10CH setup program instead of this parameter because you will lose lesser or no PWM resolution. uniform_brightness * 0 Enable/Disable uniform brightness calculation. Valid values: 0 (disable), 1 (enable) When enabled only one uniform average brightness value is calculated for all sections. This is the behavior of the "classic" VDR Atmolight plugin. When disabled a average brightness value is calculated for each section. This mode is more suitable when many sections for a area exists. filter * combined Select smoothness filter. Currently there are two filters supported: percentage and combined. Valid values: off, percentage, combined filter_smoothness * 50 Controls filter smoothness of percentage filter. Unit percentage of 100. Valid values 1 ... 100 filter_length * 500 Controls filter length of combined filter. Unit milliseconds. Valid values 300 ... 5000 filter_threshold * 40 Controls filter threshold of combined filter. Unit percentage of 100. Valid values 1 ... 100 filter_delay * 0 Controls delay of output send to controller. Unit milliseconds. Valid values 0 ... 1000 Note: Delay should be specified as multiples of 20ms wc_red wc_green wc_blue * 255 White calibration values for red, green and blue channel. Valid values 0 ... 255. Note: When using DF10CH controller(s) it is better to use the white calibration feature of the DF10CH setup program instead of this parameter because you will lose lesser PWM resolution. gamma * 0 Gamma correction factor for red, green and blue channel. Value is divided by 10 e.g. 25 -> gamma 2.5 Valid values 0 ... 50. 0 means no gamma correction Note: When using DF10CH controller(s) it is better to use the gamma calibration feature of the DF10CH setup program instead of this parameter because you will not lose PWM resolution. start_delay * 250 Delay after stream start before first output is send [ms]. Valid values 0 ... 5000. enabled * 1 Enable/Disable output of color values to atmolight controller. Valid values: 0 (disable), 1 (enable) For some parameters (e.g. filter parameters) you will find a more detailed description here: http://www.vdr-wiki.de/wiki/index.php/Atmo-plugin Additional patches located in sub directory 'patches': ------------------------------------------------------ xine-ui-atmolight-switch.patch This is a patch for the xine-ui player that extends the player with a 'AtmolightEnable' command to switch the Atmolight on/off. The command can be bound to keyboard or LIRC keys but it is not supported by the remote interface. xineliboutput-atmolight-switch.patch This is a patch for the xineliboutput player that extends the player with a 'Atmolight' command to switch the Atmolight on/off. Send slave command "Atmolight" for toggling on/off, "Atmolight 0" for switching off or "Atmolight 1" for switching on. Also pressing keyboard key 'a' or sending LIRC command 'Atmolight' toggles the Atmolight.