Closed devnoname120 closed 3 months ago
When e.g. a filename contains escapable characters, then the
quote()
function encloses it with quotation marks''
. FFmpeg interprets those literally and they don't match any file (the actual file doesn't start with'
).
This isn't the case if you call ffmpeg on the command line. This works: ffmpeg -stats -audible_key blahblahblah -audible_iv blahblahblah -i 'Dispatches_from_Planet_3Thirty-Two(Brief)_Tales_on_the_Solar_System_the_Milky_Way_and_Beyond-AAX_22_32.aaxc' -c copy '../decrypted/Dispatches_from_Planet_3Thirty-Two(Brief)_Tales_on_the_Solar_System_the_Milky_Way_and_Beyond-AAX_22_32.m4b'
You've marked this a "fix", but you never said what the fix for it is.
This isn't the case if you call ffmpeg on the command line.
No shit Sherlock. But here we're not calling ffmpeg from the command line but executing the binary directly:
subprocess.check_output()
is not called with the optionshell = True
You've marked this a "fix", but you never said what the fix for it is.
It's literally written in the description of the PR.
This isn't the case if you call ffmpeg on the command line.
No shit Sherlock. But here we're not calling ffmpeg from the command line but executing the binary directly:
subprocess.check_output()
is not called with the optionshell = True
You've marked this a "fix", but you never said what the fix for it is.
It's literally written in the description of the PR.
Do you mean that we should replace the line "subprocess.check_output(base_cmd, text=True)" with "subprocess.check_output(base_cmd)"? Or does text need some other argument?
@philgoetz Did you try to apply the changes of this pull request?
@philgoetz Did you try to apply the changes of this pull request?
No. Thank you. How was I supposed to know that even existed? I think you're assuming more familiarity with github than I have.
Fix #199
subprocess.check_output()
is not called with the optionshell = True
so it doesn't make sense to escape any arguments because ffmpeg will already receive them as is.When e.g. a filename contains escapable characters, then the
quote()
function encloses it with quotation marks''
. FFmpeg interprets those literally and they don't match any file (the actual file doesn't start with'
).Here is the error that this PR fixes:
In this example
ffmpeg
incorrectly looks for the file'A_Redacted_Book_Name_(that_Contains_Parentheses)_(Some_Editor)-AAX_44_128.aaxc'
that doesn't exist. The actual file isA_Redacted_Book_Name_(that_Contains_Parentheses)_(Some_Editor)-AAX_44_128.aaxc
and it shouldn't have been quoted.