aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKhazhismel <[email protected]>2015-12-23 17:58:34 -0500
committerKhazhismel <[email protected]>2015-12-23 18:00:44 -0500
commite8a06b7ee9aefe141b608f596a95997ccc760b89 (patch)
treea9a6be1ef4410c7325873ef7a00b44f7243749bf
parentUnflip kick/ban permission bits (diff)
downloaddiscord.py-e8a06b7ee9aefe141b608f596a95997ccc760b89.tar.xz
discord.py-e8a06b7ee9aefe141b608f596a95997ccc760b89.zip
Insert options before pipe:1 in ffmpeg player, otherwise they are ignored
-rw-r--r--discord/voice_client.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/discord/voice_client.py b/discord/voice_client.py
index 24a4081a..ecbc4ee4 100644
--- a/discord/voice_client.py
+++ b/discord/voice_client.py
@@ -386,12 +386,14 @@ class VoiceClient:
"""
command = 'ffmpeg' if not use_avconv else 'avconv'
input_name = '-' if pipe else shlex.quote(filename)
- cmd = command + ' -i {} -f s16le -ar {} -ac {} -loglevel warning pipe:1'
+ cmd = command + ' -i {} -f s16le -ar {} -ac {} -loglevel warning'
cmd = cmd.format(input_name, self.encoder.sampling_rate, self.encoder.channels)
if isinstance(options, str):
cmd = cmd + ' ' + options
+ cmd += ' pipe:1'
+
stdin = None if not pipe else filename
args = shlex.split(cmd)
try:
@@ -567,4 +569,3 @@ class VoiceClient:
packet = self._get_voice_packet(encoded_data)
sent = self.socket.sendto(packet, (self.endpoint_ip, self.voice_port))
self.checked_add('timestamp', self.encoder.samples_per_frame, 4294967295)
-