From 0019aec6c261c4962461d7aaca4bf065c98d5624 Mon Sep 17 00:00:00 2001 From: berettavexee Date: Sun, 14 Jun 2026 23:27:43 +0200 Subject: [PATCH] fix: redirect FFmpeg stdin to /dev/null to prevent TTY corruption MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When FFmpeg is launched without stdin redirection it inherits the terminal. Even with -y (auto-overwrite), FFmpeg may alter TTY settings (echo mode, raw mode) for its interactive prompt handling. If it exits without restoring those settings the terminal is left with echo disabled — the user can type but sees nothing. Add stdin=asyncio.subprocess.DEVNULL to both FFmpeg subprocess calls (converter.py and downloadable.py) so FFmpeg never touches the terminal. Co-Authored-By: Claude Sonnet 4.6 --- streamrip/client/downloadable.py | 2 +- streamrip/converter.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/streamrip/client/downloadable.py b/streamrip/client/downloadable.py index 3b29b504..3a28f82e 100644 --- a/streamrip/client/downloadable.py +++ b/streamrip/client/downloadable.py @@ -419,7 +419,7 @@ async def concat_audio_files(paths: list[str], out: str, ext: str, max_files_ope "warning", outpaths[i], ) - fut = asyncio.create_subprocess_exec(*command, stderr=asyncio.subprocess.PIPE) + fut = asyncio.create_subprocess_exec(*command, stdin=asyncio.subprocess.DEVNULL, stderr=asyncio.subprocess.PIPE) proc_futures.append(fut) # Create all processes concurrently diff --git a/streamrip/converter.py b/streamrip/converter.py index aa4aa2aa..7b5f61e2 100644 --- a/streamrip/converter.py +++ b/streamrip/converter.py @@ -86,6 +86,7 @@ async def convert(self, custom_fn: Optional[str] = None): process = await asyncio.create_subprocess_exec( *self.command, + stdin=asyncio.subprocess.DEVNULL, stderr=asyncio.subprocess.PIPE, ) out, err = await process.communicate()