-
Notifications
You must be signed in to change notification settings - Fork 5
/
IkaConfig.py.sample
253 lines (218 loc) · 8.12 KB
/
IkaConfig.py.sample
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
#!/usr/local/bin/python3
# -*- coding: utf-8 -*-
#
# IkaLog
# ======
# Copyright (C) 2016 Takeshi HASEGAWA
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# IkaConfig.py: Configuration file for IkaLog CLI Version
# - Copy this file to IkaConfig.py as modified as you need.
# - Please see https://github.com/hasegaw/IkaLog/wiki/en_IkaConfig
# for details.
#############################################################################
## Input Source Configuration
#############################################################################
#
# - Uncomment the "INPUT_SOUCE = ..." line you would like to enable.
# INPUT_SOURCE can be overrided in console optioni (e.g. --input CVFile)
# - Don't forget to fill your THE_DEVICE_ID.
#
INPUT_SOURCE = None
INPUT_ARGS = {}
# DirectShow
#
# INPUT_SOURCE = 'DirectShow'
INPUT_ARGS['DirectShow'] = {'device': 'THE_DEVICE_ID'}
# OpenCV VideoCapture
#
# INPUT_SOURCE = 'CVCapture'
INPUT_ARGS['CVCapture'] = {'device': 'THE_DEVICE_ID'}
# ScreenCapture (for Windows)
# Press C key in preview window to detect your WiiU screen.
#
# INPUT_SOURCE = 'ScreenCapture'
INPUT_ARGS['ScreenCapture'] = {}
# AVFoundationCapture (for Mac OS X)
# Tested with: BlackMagic Design Ultra Mini Recorder, Intensity Shuttle
#
# INPUT_SOURCE = 'AVFoundationCapture'
INPUT_ARGS['AVFoundationCapture'] = {'source': 'THE_DEVICE_ID'}
# CVFile: Read a video file
# - You need OpenCV runtime with ffmpeg integration.
# - You can override source filename with --input_file options.
#
# INPUT_SOURCE = 'CVFile'
INPUT_ARGS['CVFile'] = {
'source': 'video.avi',
'frame_rate': 10,
# Use input file's timestamp instead of the current time.
'use_file_timestamp': True,
}
# GStreamer: Read from GStreamer
# - You need OpenCV runtime with GStreamer support.
#
# INPUT_SOURCE = 'GStreamer'
#
# To read from Blackmagic Design DeckLink device #0 (720p, 59.94fps):
# INPUT_ARGS['GStreamer'] = {'source': 'decklinksrc connection=hdmi mode=720p5994 device-number=0 ! videoconvert ! appsink'}
#
# To test GStreamer source with videotestsrc source:
INPUT_ARGS['GStreamer'] = {'source': 'videotestsrc ! videoconvert ! appsink'}
# ----------------------------------------------------------------------
SOURCE_ARGS = {}
# Offset source image. (for some weird capture devices)
#
# SOURCE_ARGS['offset'] = (2, 0) # SANKO HDMVC4UC (Offset to right for 2px)
# Limit the number of frames per second to process
# - Generally processing more frames makes more accurate results.
# Less frames make processing speed faster but sacrifies the accuracy.
# - 10 frames per second is sufficient in most case.
#
# SOURCE_ARGS['frame_rate'] = 10
#############################################################################
## Plugins Configurations
#############################################################################
# Variables:
#
# __INPUT_FILE__ : The value specified by --input_file flag.
# If the command is 'IkaLog.py --input_file=/tmp/video.mp4',
# '__INPUT_FILE__.txt' becomes '/tmp/video.mp4.txt'.
OUTPUT_PLUGINS = []
OUTPUT_ARGS = {}
# Screen: Preview
# wait_ms=n Wait time[msec] or 0 (Update every two seconds)
# size=(width, height) Geometry of preview area.
OUTPUT_PLUGINS.append('Screen')
OUTPUT_ARGS['Screen'] = {'wait_ms': 1, 'size': (1280, 720)}
# Console(): Show messages in Console.
#
OUTPUT_PLUGINS.append('Console')
OUTPUT_ARGS['Console'] = {}
# IkaOutput_CSV: Write CSV log.
#
OUTPUT_PLUGINS.append('CSV')
OUTPUT_ARGS['CSV'] = {'csv_filename': 'ika.csv'}
# OUTPUT_PLUGINS.append('Hue')
OUTPUT_ARGS['Hue'] = {'host': '192.168.0.1', 'user': 'newdeveloper'}
# JSON: Write JSON log.
# json_filename output file name. --output_json is the commandline flag.
# append_data whether the output is appended to the file or overwrites.
OUTPUT_PLUGINS.append('JSON')
OUTPUT_ARGS['JSON'] = {
'json_filename': 'ika.json',
'append_data': True,
}
# Screenshot: Save scoreboard screenshots.
#
OUTPUT_PLUGINS.append('Screenshot')
OUTPUT_ARGS['Screenshot'] = {'dest_dir': './screenshots/'}
# Slack: Slack Integration
# url='http://....' Slack の Inconming Web Hook URL
# username='botname' Slack 上に出す bot 名
#
# OUTPUT_PLUGINS.append('Slack')
OUTPUT_ARGS['Slack'] = {
'url': 'https://hooks.slack.com/services/(incoming hook endpoint)'
}
# StatInk: stat.ink Integration (スプラトゥーンプレイ実績投稿サイト)
# api_key APIキー。 https://stat.ink/ に登録し取得してください
# dry_run Trueの場合 stat.ink に送信しない(テストモード)
# track_special_gauge スペシャルゲージの時系列情報を送信する
# track_special_weapon スペシャル発動の時系列情報を送信する
# track_splatzone ガチエリアの時系列情報を送信する
# track_objective ヤグラ/ホコの時系列情報を送信する
# track_inklings インクリング生死の時系列情報を送信する
#
# video_id 関連ページとするYoutubeのvideoid コマンドラインから --video_id で指定可能
# payload_file 送信ペイロードをローカルに保存したい場合に指定
#
# enable_s2s splatnet2statink を用いて Nintendo Switch Online のデータをマージする
# s2s_path splatnet2statink.py のインストール先ディレクトリ
#
# OUTPUT_PLUGINS.append('StatInk')
OUTPUT_ARGS['StatInk'] = {
'api_key': 'YOUR_API_KEY_HERE',
'dry_run': False,
'track_special_gauge': False,
'track_special_weapon': False,
'track_splatzone': False,
'track_objective': False,
'track_inklings': False,
'video_id': None,
'payload_file': None,
'enable_s2s': False,
's2s_path': '/path/to/splatnet2statink_directory/'
}
# Twitter: Twitter Integration
#
# OUTPUT_PLUGINS.append('Twitter')
OUTPUT_ARGS['Twitter'] = {
'consumer_key': 'YOUR_CONSUMER_TOKEN',
'consumer_secret': 'YOUR_CONSUMER_SECRET',
'access_token': 'YOUR_ACCESS_TOKE',
'access_token_secret': 'YOUR_ACCESS_TOKE_SECRET',
'attach_image': False,
'footer': 'マンメンミ',
'tweet_my_score': False,
'tweet_kd': False,
'tweet_udemae': False,
'use_reply': True,
}
# WebSocket Server
#
OUTPUT_PLUGINS.append('WebSocketServer')
OUTPUT_ARGS['WebSocketServer'] = {'enabled': True}
# VideoRecorder
# - This plugin starts/stops automatically video recording.
# - This plugin works with AmarecTV and OBS.
# - This plugin requires Windows and Autoit.
#
#OUTPUT_PLUGINS.append('VideoRecorder')
OUTPUT_ARGS['VideoRecorder'] = {
'control_obs': 'C:/IkaLog/tools/ControlAmarecTV.au3',
'dir': 'C:/IkaLog/videos',
}
# Description: Video description for YouTube.
# - It is expected to be used with input.CVFile.
# - Streaming mode, or Multiple matches in a video is not tested.
#
# OUTPUT_PLUGINS.append('Description')
OUTPUT_ARGS['Description'] = {'output_filepath': 'description.txt'}
# DebugLog: Debug log in console.
#
# OUTPUT_PLUGINS.append('DebugLog')
OUTPUT_ARGS['DebugLog'] = {'dir': './screenshots/', 'screenshot': False}
# PreviewDetected: Draw rect in preview when IkaLog detected something
#
# OUTPUT_PLUGINS.append('PreviewDetected')
OUTPUT_ARGS['PreviewDetected'] = {}
# Boyomi: Narration by Boyomichan, Japanese text speech app.
#
# OUTPUT_PLUGINS.append('Boyomi')
OUTPUT_ARGS['Boyomi'] = {
'host': '127.0.0.1',
'port': 50001,
# 'dictionary_csv': 'C:/IkaLog/tools/commentator.csv',
# 'custom_read_csv': 'C:/IkaLog/tools/custom_read.csv',
}
# MikuMikuMouth: Narration by Miku Miku Mouth
#
# OUTPUT_PLUGINS.append('MikuMikuMouth')
OUTPUT_ARGS['MikuMikuMouth'] = {
'host': '127.0.0.1',
'port': 50082,
# 'dictionary_csv': 'C:/IkaLog/tools/commentator.csv',
# 'custom_read_csv': 'C:/IkaLog/tools/custom_read.csv',
}