mirror of
https://github.com/denizsafak/abogen.git
synced 2026-07-18 13:40:27 +02:00
Fix ffmpeg error in Linux
This commit is contained in:
@@ -519,7 +519,7 @@ class ConversionThread(QThread):
|
|||||||
"-ac",
|
"-ac",
|
||||||
"1",
|
"1",
|
||||||
"-i",
|
"-i",
|
||||||
"pipe:",
|
"pipe:0",
|
||||||
"-c:a",
|
"-c:a",
|
||||||
"libopus",
|
"libopus",
|
||||||
"-b:a",
|
"-b:a",
|
||||||
@@ -598,7 +598,7 @@ class ConversionThread(QThread):
|
|||||||
ffmpeg_cmd_opus = [
|
ffmpeg_cmd_opus = [
|
||||||
"ffmpeg", "-y",
|
"ffmpeg", "-y",
|
||||||
"-thread_queue_size", "1024", # Increased thread_queue_size
|
"-thread_queue_size", "1024", # Increased thread_queue_size
|
||||||
"-f", "f32le", "-ar", "24000", "-ac", "1", "-i", "pipe:",
|
"-f", "f32le", "-ar", "24000", "-ac", "1", "-i", "pipe:0",
|
||||||
"-c:a", "libopus", "-b:a", "24000", # Original bitrate
|
"-c:a", "libopus", "-b:a", "24000", # Original bitrate
|
||||||
opus_out_path,
|
opus_out_path,
|
||||||
]
|
]
|
||||||
|
|||||||
+3
-1
@@ -118,8 +118,10 @@ def create_process(cmd, stdin=None, text=True):
|
|||||||
root.addHandler(handler)
|
root.addHandler(handler)
|
||||||
root.setLevel(logging.INFO)
|
root.setLevel(logging.INFO)
|
||||||
|
|
||||||
|
# Determine shell usage: use shell only for string commands
|
||||||
|
use_shell = isinstance(cmd, str)
|
||||||
kwargs = {
|
kwargs = {
|
||||||
"shell": True,
|
"shell": use_shell,
|
||||||
"stdout": subprocess.PIPE,
|
"stdout": subprocess.PIPE,
|
||||||
"stderr": subprocess.STDOUT,
|
"stderr": subprocess.STDOUT,
|
||||||
"bufsize": 1, # Line buffered
|
"bufsize": 1, # Line buffered
|
||||||
|
|||||||
Reference in New Issue
Block a user