Writing IkaConfig.py
IkaConfig.py is IkaLog configuration file. The file must be a valid Python script.
Old format is still compatible
Since commit fec6ce274417b04f785cd722e29391ccaea5de20, the format of IkaConfig.py has been changed. This page describes newer verson of IkaConfig.py. Though, the loader will identify if the config is older or newer version, and provides backward compatibility, so your older configuration file still should be valid.
Copy IkaConfig.py.sample to IkaConfig.py
IkaConfig.py.sample file is a good start point.
Selecting the source
We have several input sources today.
| source name |
description |
Win |
Mac |
Linux |
| DirectShow |
Capture using a image grabber via DirectShow |
Y |
Y |
Y |
| CVCapture |
Capture using a image grabber via OpenCV VideoCapture |
Y |
Y |
Y |
| CVFile |
Read a movie file using OpenCV VideoCapture |
Y |
Y |
Y |
| GStreamer |
Receive stream from GStreamer via OpenCV VideoCapture |
? |
? |
Y |
| AVFoundationCapture |
Capture using a image grabber via OS X AVFoundation Framework |
N |
Y |
N |
| ScreenCapture |
Capture Wii U image from your desktop |
Y |
N |
N |
DirectShow
To initialize the 2nd capture device (index = 1)
INPUT_SOURCE = 'DirectShow'
INPUT_ARGS['DirectShow'] = {'device': 1}
CVCapture
To initialize the 2nd capture device (index = 1)
INPUT_SOURCE = 'CVCapture'
INPUT_ARGS['CVCapture'] = {'device': 1}
AVFoundationCapture
To initialize the 2nd capture device (index = 1)
INPUT_SOURCE = 'AVFoundationCapture'
INPUT_ARGS['AVFoundationCapture'] = {'device': 1}
CVFile
To process the movie file video.avi,
INPUT_SOURCE = 'CVFile'
INPUT_ARGS['CVFile'] = {'source': 'video.avi', 'frame_rate': 10}
GStreamer
To initialize the first BlackMagic DeckLink device:
INPUT_SOURCE = 'GStreamer'
INPUT_ARGS['GStreamer'] = {'source': 'decklinksrc connection=hdmi mode=720p5994 device-number=0 ! videoconvert ! appsink'}
To test GStreamer integration:
INPUT_SOURCE = 'GStreamer'
INPUT_ARGS['GStreamer'] = {'source': 'videotestsrc ! videoconvert ! appsink'}
Parameters
| Field |
Value(example) |
Description |
| frame_rate |
10 |
Limit frame rate to process. If set to 10, IkaLog processes up to 10 frames per a second. |
Configuring Plugins
Screen: IkaLog preview on CLI
OUTPUT_PLUGINS.append('Screen')
OUTPUT_ARGS['Screen'] = {'wait_ms': 1, 'size': (1280, 720)}
| Field |
Value(example) |
Description |
| wait_ms |
1 |
Wait time per frame processing. if set to 0, 1ms per 2 sec (For performance) |
| size |
(1280, 720) |
two-dimension tuple to specify size of the preview window, by pixel. |
Console: Console output
OUTPUT_PLUGINS.append('Console')
CSV: CSV Log
OUTPUT_PLUGINS.append('CSV')
OUTPUT_ARGS['CSV'] = {'csv_filename': 'ika.csv'}
| Field |
Value(example) |
Description |
| csv_filename |
ika.csv |
CSV Filename to be written. |
JSON: JSON Log
OUTPUT_PLUGINS.append('JSON')
OUTPUT_ARGS['JSON'] = {'json_filename': 'ika.json'}
| Field |
Value(example) |
Description |
| json_filename |
ika.json |
JSON Filename to be written. |
fluentd: Fluentd forwarder
Forward log to Fluentd.
OUTPUT_PLUGINS.append('Fluentd')
OUTPUT_ARGS['Fluentd'] = {
'host': '127.0.0.1',
'port': 24224,
'username': "marie",
'tag': 'ikalog'
}
| Field |
Value(example) |
Description |
| host |
"127.0.0.1" |
Hostname of Fluentd in_forward plugin |
| port |
24224 |
port of Fluentd in_forward plugin |
| username |
"marie" |
The value of username field in the record to be post |
| tag |
"ikalog" |
Fluentd Tag |
Hue
Deprecated.
Screenshot: Save screenshots of game scoreboard
OUTPUT_PLUGINS.append('Screenshot')
OUTPUT_ARGS['Screenshot'] = {'dest_dir': './screenshots/'}
| Field |
Value(example) |
Description |
| dest_dir |
"./screenshots/" |
The directory the screenshots will be saved in |
Slack: Slack Integration
OUTPUT_ARGS['Slack'] = {
'url': 'https://hooks.slack.com/services/(incoming hook endpoint)'
}
StatInk: Stat.ink Integration
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,
}
| Field |
Value(example) |
Description |
| api_key |
"ABCabc123" |
API Key of your account in Stat.Ink |
| dry_run |
False |
If False, the plugins doesn't post the payload to the server. If set to "dry_run", post to the server with dry_run options (server-side dry-run) |
| track_special_gauge |
False |
Include Special Gauge data |
| track_special_weapon |
False |
Include Special weapon activation data |
| track_splatzone |
False |
Include Splat Zones counter values |
| track_objective |
False |
Include Rainmaker/Tower Control position |
| track_inklings |
False |
Include inklings status (alive or dead) |
| video_id |
"" |
|
| payload_file |
"my_battle.msgpack" |
Post from Stat.Ink payload file |
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,
}
| Field |
Value(example) |
Description |
| consumer_key |
"ABCabc123" |
API Key of your twitter application |
| consumer_secret |
"ABCabc123" |
|
| access_token |
"ABCabc123" |
API Key of your twitter account |
| access_token_secret |
"ABCabc123" |
|
| attach_image |
False |
Attach a scoreboard image to the tweet. |
| footer |
"Staaay Fresh!" |
Additional text message |
| tweet_my_score |
False |
Tweet Turf battle points |
| tweet_kd |
False |
Tweet Kill/Death numbers |
| tweet_udemae |
False |
Tweet Ranked-battle Rank. |
| use_reply |
True |
If set to True, the tweet will be a reply to @ikalog (The tweet will be hidden from non-@ikalog followers |
WebSocketServer: WebSocket Server
OUTPUT_PLUGINS.append('WebSocketServer')
OUTPUT_ARGS['WebSocketServer'] = {'enabled': True}
| Field |
Value(example) |
Description |
| Enaled |
True |
Enable |
Description:
Output description file. Use with CVFile.
OUTPUT_PLUGINS.append('Description')
OUTPUT_ARGS['Description'] = {'output_filepath': 'description.txt'}
| Field |
Value(example) |
Description |
| output_filepath |
'description.txt' |
Filename to be written |
DebugLog: Debug Info (for developers)
| Field |
Value(example) |
Description |
| wait_ms |
1 |
Wait time per frame processing. if set to 0, 1ms per 2 sec (For performance) |
| dir |
"./screenshots" |
window, by pixel. |
VideoRecorder: Automatic control of recording software
#OUTPUT_PLUGINS.append('VideoRecorder')
OUTPUT_ARGS['VideoRecorder'] = {
'control_obs': 'C:/IkaLog/tools/ControlAmarecTV.au3',
'dir': 'C:/IkaLog/videos',
}
| Field |
Value(example) |
Description |
| control_obs |
"tools/ControlAmarecTV.au3" |
AutoIt task file |
| dir |
"./videos/" |
Output Directory |
DebugVideoWriter: Video Writer for Debugging (Flight Recorder)
OUTPUT_ARGS['DebugVideoWriter'] = {'dir': './debug_videos/'}
| Field |
Value(example) |
Description |
| dir |
"./debug_videos/" |
Output Directory |
PreviewDetected: Draw rects in Preview
OUTPUT_PLUGINS.append('PreviewDetected')
OUTPUT_ARGS['PreviewDetected'] = {}
No additional parameters.
BoyomiClient: Narrator by Boyomichan
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',
}
| Field |
Value(example) |
Description |
| host |
"127.0.0.1" |
Hostname of BoyomiChan Server |
| port |
24224 |
port of BoyomiChan Server |
| dictionary_csv |
"path/to/file.csv" |
|
| custom_read_csv |
"path/to/file.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',
}
| Field |
Value(example) |
Description |
| host |
"127.0.0.1" |
IP Address to bind |
| port |
24224 |
port number to bind |
| dictionary_csv |
"path/to/file.csv" |
|
| custom_read_csv |
"path/to/file.csv" |
|