1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
|
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 <alt><shift>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.
|