From 9bd28ea079ff5f0370e5cd4612cafb581cd1fecb Mon Sep 17 00:00:00 2001 From: 52462 Date: Sat, 11 Jul 2020 01:42:24 +0200 Subject: [PATCH] Fix a bug where pipe symbols break execution When a pipe symbol is introduced in any ffmpeg flag bash tries to pipe the output to the second half of the command instead of passing it to ffmpeg. Therefore it is necessary to escape --- rffmpeg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rffmpeg.py b/rffmpeg.py index f8f8f2a..c067422 100755 --- a/rffmpeg.py +++ b/rffmpeg.py @@ -266,7 +266,7 @@ def setup_command(target_host): # Parse and re-quote any problematic arguments for arg in cli_ffmpeg_args: # Match bad shell characters: * ( ) whitespace - if re.search('[*()\s]', arg): + if re.search('[*()\s|]', arg): rffmpeg_command.append('"{}"'.format(arg)) else: rffmpeg_command.append('{}'.format(arg))