-
Notifications
You must be signed in to change notification settings - Fork 7k
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
ffmpeg version query #4254
ffmpeg version query #4254
Conversation
setup.py
Outdated
stdout=subprocess.PIPE).stdout.decode('utf-8') | ||
ffmpeg_version = ffmpeg_version.split('version')[-1].split()[0] | ||
ffmpeg_version_str = str(subprocess.check_output(["ffmpeg", "-version"])) | ||
ffmpeg_version = re.split(r"ffmpeg\ version\ |\.|\ |-", ffmpeg_version_str)[1:3] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @vmoens !
Do we need to escape the spaces? i.e. could this just be ffmpeg version |\.| |-
?
Also, let's add a small description for future-us, something like
# this splits on both dots and spaces as the output format differs across versions / platforms
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vmoens do we still need to espace the spaces? Other than that, LGTM :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought i corrected that, but you're right there are a couple remaining
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM modulo minor escaping question above
Hey @vmoens! You merged this PR, but no labels were added. |
Summary: * string manipulation for ffmpeg version retrieval * ffmpeg version 4.2 control * commenting solution * removing all escapes for spaces Reviewed By: NicolasHug Differential Revision: D30417202 fbshipit-source-id: 1e685d810eae1d1887b06586c8142e87ee4a1b4b Co-authored-by: Vincent Moens <vmoens@fb.com>
Closes #4214