1
0
mirror of synced 2024-11-27 17:00:54 +01:00

fix ffmpeg

This commit is contained in:
源文雨 2023-04-01 15:10:46 +08:00
parent c9a041a8ab
commit 981ec0ddb8

View File

@ -8,7 +8,7 @@ def load_audio(file,sr):
out, _ = (
ffmpeg.input(file, threads=0)
.output("-", format="s16le", acodec="pcm_s16le", ac=1, ar=sr)
.run(cmd=["./ffmpeg", "-nostdin"], capture_stdout=True, capture_stderr=True)
.run(cmd=["ffmpeg", "-nostdin"], capture_stdout=True, capture_stderr=True)
)
except ffmpeg.Error as e:
raise RuntimeError(f"Failed to load audio: {e.stderr.decode()}") from e