8000 Allow to use different command other than 'ffmpeg' by depau · Pull Request #3 · kkroening/ffmpeg-python · GitHub
[go: up one dir, main page]

Skip to content

Allow to use different command other than 'ffmpeg' #3

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 1 commit into from
May 26, 2017

Conversation

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

Add "cmd" argument to run that allows to provide different command for ffmpeg (e.g. you may want to use avconv or a wrapper).

Copy link
Owner
@kkroening kkroening left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good besides minor comment

args = ['ffmpeg'] + self.get_args()

def run(self, cmd='ffmpeg'):
if type(cmd) == str:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What would it be besides a string? Should there be an else?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It could be a list.
You may want to run

["nice", "-n", "10", "ffmpeg"]

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

About the else you may want to check it is a supported iterable, but generally I don't do too many checks, the interpreter gives understandable tracebacks.
E.g.:

TypeError: unsupported operand type(s) for +: 'int' and 'list'

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