8000 Allow arguments to be manually passed to ffmpeg/run wrappers by depau · Pull Request #6 · kkroening/ffmpeg-python · GitHub
[go: up one dir, main page]

Skip to content

Allow arguments to be manually passed to ffmpeg/run wrappers #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 28, 2017

Conversation

depau
Copy link
Collaborator
@depau depau commented May 26, 2017

Makes this similar to what I proposed in #3, allowing users to, for example, nice down ffmpeg, run it as another user, etc.

['nice', '-n', '15', 'ffmpeg']
['sudo', '-u', 'restricteduser', 'ffmpeg']

P.S. This obviously does not catch unicode strings in py2 or bytes in py3 (though I'm not sure subprocess accepts them). I can add a condition to check for that but it seemed a bit exaggerated to me, who puts emojis in command lines?

@depau depau changed the title allow arguments to be manually passed to ffmpeg/run wrappers Allow arguments to be manually passed to ffmpeg/run wrappers May 26, 2017
@kkroening
Copy link
Owner

P.S. This obviously does not catch unicode strings in py2

Easy fix, FWIW:

- if type(cmd) == str:
+ if isinstance(cmd, basestring):

@kkroening kkroening merged commit 236dae6 into kkroening:feature-1 May 28, 2017
@kkroening
Copy link
Owner

Merged. Thanks!

@depau depau deleted the patch-2 branch May 28, 2017 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0