forked from Robert904/mumblerecbot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconstants.py
62 lines (49 loc) · 2.62 KB
/
constants.py
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
# -*- coding: utf-8 -*-
#Global pymumble debugging (lot of output)
DEBUG = True
#send encoder STDOUT/STDERR to the console
DEBUG_ENCODER = True
#Creates the caption and chapter webvtt files
CREATE_WEBVTT = True
CREATE_CHAPTERS = False
SAVEDIR = "/Mumble" # folder where to save the recordings
BUFFER = 0.1 # time to buffer audio input
PIDFILE = "/tmp/mumblerecbot.pid" # location to store the process id
#HOST = "88.198.142.94" # murmur server
HOST = "localhost" # murmur server
PORT = 64738 # murmur port
USER = "vreji" # mumur user
PASSWORD = "" # mumur user
CHANNEL = "alga" # channel to move in ("" = root)
USER_COUNT = 1 # start to record with how many connected users (recorder not included)
# Create a stereo difference based on the channel the user is in, when playing with teams taht can't ear each other
# region is the same for the subtitle webvtt file
STEREO_CHANNELS = {"Team 1": {"stereo": (1, 0), "region": "left"},
"Team 2": {"stereo": (0, 1), "region": "right"},
"Team 3": {"stereo": (1, 0), "region": "left"},
"Team 4": {"stereo": (0, 1), "region": "right"}}
# some constants
BITRATE = 48000
RESOLUTION = 10 # in ms
FLOAT_RESOLUTION = float(RESOLUTION) / 1000
MONO_CHUNK_SIZE = BITRATE * 2 * RESOLUTION / 1000
STEREO_CHUNK_SIZE = MONO_CHUNK_SIZE * 2
# command to send the audio in a pipe for external encoding. %s will be replaced by a generated name
ENCODER = "oggenc --raw --raw-bits=16 --raw-chan=2 --raw-rate=48000 --quality=4 --quiet -o %s.ogg -"
#ENCODER = "oggenc2 --raw --raw-bits=16 --raw-chan=2 --raw-rate=48000 --quality=4 --quiet -o %s.ogg -"
#ENCODER = "ffmpeg -f s16le -ar 48000 -ac 2 -i - -c:a libmp3lame -ab 96k -ac 1 -ar 22050 -f rtp rtp://localhost:1935/"
# comment to be shown in mumble for the recorder user
COMMENT_SUFFIX = " .i kakne co cpacu lo vreji la'o zoi. <a href=\"http://zbagazasni.ax.lt/mumble/\">http://zbagazasni.ax.lt/mumble/</a> .zoi"
#COMMENT_SUFFIX = "<br>/start:forced" + \
# "<br>/stop:blocked" + \
# "<br>/auto[=x]:Automatic start-stop (when x users connected)" + \
# "<br>/newfile:new audio file" + \
# "<br>/exit:disconnect" + \
# "<br>/gamestart:Create a game chapter" + \
# "<br>/gamestop:Finish a game chapter"
# The user's avater is used to see if it is recording in the overlay
START_BITMAP = "start.png"
STOP_BITMAP = "stop.png"
# prevent to create multiple chapters too fast
CHAPTER_MIN_INTERVAL = 10
autotext = "vreji zmiku .i va'o lo nu su'o %i da jorne cu ca'o snaveizba"