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
|
diff --git a/nextcord/opus.py b/nextcord/opus.py
index b1119a8e..b7c9c713 100644
--- a/nextcord/opus.py
+++ b/nextcord/opus.py
@@ -233,7 +233,7 @@ def _load_default() -> bool:
_filename = os.path.join(_basedir, "bin", f"libopus-0.{_target}.dll")
_lib = libopus_loader(_filename)
else:
- opus = ctypes.util.find_library("opus")
+ opus = "@libopus@"
if opus is None:
_lib = None
diff --git a/nextcord/player.py b/nextcord/player.py
index 5c7daf52..48a11eb7 100644
--- a/nextcord/player.py
+++ b/nextcord/player.py
@@ -127,7 +127,7 @@ class FFmpegAudio(AudioSource):
self,
source: Union[str, io.BufferedIOBase],
*,
- executable: str = "ffmpeg",
+ executable: str = "@ffmpeg@",
args: Any,
**subprocess_kwargs: Any,
) -> None:
@@ -254,7 +254,7 @@ class FFmpegPCMAudio(FFmpegAudio):
self,
source: Union[str, io.BufferedIOBase],
*,
- executable: str = "ffmpeg",
+ executable: str = "@ffmpeg@",
pipe: bool = False,
stderr: Optional[IO[str]] = None,
before_options: Optional[str] = None,
@@ -357,7 +357,7 @@ class FFmpegOpusAudio(FFmpegAudio):
*,
bitrate: int = 128,
codec: Optional[str] = None,
- executable: str = "ffmpeg",
+ executable: str = "@ffmpeg@",
pipe: bool = False,
stderr=None,
before_options=None,
@@ -510,7 +510,7 @@ class FFmpegOpusAudio(FFmpegAudio):
"""
method = method or "native"
- executable = executable or "ffmpeg"
+ executable = executable or "@ffmpeg@"
probefunc = fallback = None
if isinstance(method, str):
@@ -555,9 +555,9 @@ class FFmpegOpusAudio(FFmpegAudio):
@staticmethod
def _probe_codec_native(
- source, executable: str = "ffmpeg"
+ source, executable: str = "@ffmpeg@"
) -> Tuple[Optional[str], Optional[int]]:
- exe = executable[:2] + "probe" if executable in ("ffmpeg", "avconv") else executable
+ exe = executable[:-4] + "probe" if executable.endswith(("ffmpeg", "avconv")) else executable
args = [
exe,
"-v",
@@ -584,7 +584,7 @@ class FFmpegOpusAudio(FFmpegAudio):
@staticmethod
def _probe_codec_fallback(
- source, executable: str = "ffmpeg"
+ source, executable: str = "@ffmpeg@"
) -> Tuple[Optional[str], Optional[int]]:
args = [executable, "-hide_banner", "-i", source]
proc = subprocess.Popen(
|