python3Packages.pydub: don't warn on calls to ffmpeg

The replacement was done in the codepath that is a fallback that
triggers a warning. So even though the library was ultimately calling to
the right nixpkgs binaries for ffmpeg tools, each call resulted in a
confusing warning like:

Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work
This commit is contained in:
Ihar Hrachyshka
2026-07-28 18:37:19 -04:00
parent 1b29037db1
commit 0e691ca3e8

View File

@@ -1,28 +1,28 @@
diff --git a/pydub/utils.py b/pydub/utils.py
index 2694f90..7764b3f 100644
index 740c500..e741100 100644
--- a/pydub/utils.py
+++ b/pydub/utils.py
@@ -172,7 +172,7 @@ def get_encoder_name():
else:
# should raise exception
warn("Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work", RuntimeWarning)
@@ -164,5 +164,5 @@ def get_encoder_name():
if which("avconv"):
return "avconv"
- elif which("ffmpeg"):
- return "ffmpeg"
+ elif which("@ffmpeg@"):
+ return "@ffmpeg@"
def get_player_name():
@@ -186,7 +186,7 @@ def get_player_name():
else:
# should raise exception
warn("Couldn't find ffplay or avplay - defaulting to ffplay, but may not work", RuntimeWarning)
@@ -178,5 +178,5 @@ def get_player_name():
if which("avplay"):
return "avplay"
- elif which("ffplay"):
- return "ffplay"
+ elif which("@ffplay@"):
+ return "@ffplay@"
def get_prober_name():
@@ -200,7 +200,7 @@ def get_prober_name():
else:
# should raise exception
warn("Couldn't find ffprobe or avprobe - defaulting to ffprobe, but may not work", RuntimeWarning)
@@ -192,5 +192,5 @@ def get_prober_name():
if which("avprobe"):
return "avprobe"
- elif which("ffprobe"):
- return "ffprobe"
+ elif which("@ffprobe@"):
+ return "@ffprobe@"
else: