General: Custom paths to ffmpeg and OpenImageIO tools #3982
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Brief description
Added mechanism to define custom paths to ffmpeg and oiio tools and more detailed validation of them.
Description
Right now we're missing vendorized oiio tool for MacOs and don't have mechanism to be able allow different paths for them. Also we have issues on some linux distributions that executables we support are compatible with them. It is possible to define
OPENPYPE_FFMPEG_PATHS
andOPENPYPE_OIIO_PATHS
which lead to custom paths where tool can be found. These tools are checked as before using executables from OpenPype build. Added one more layer of executable validation to check if they can be executed by executing them. FFmpeg tools are validated with executing{tool} -version
arguments and oiio tools are validated executing{tool} --help
. In both cases the return code should be0
(they don't validate if the tool is really the tool).It should be possible to set just tool name in then env values (they must be without extensions). In that case is used tool from
PATH
environment.Executable paths are cached on first get. That's because the validation is time consuming and may cause huge slowdown.
Additional info
Environment keys can be changed and we can also add direct ability of define them in settings. Not sure if we should support direct ability to set them in settings -> opinions?
Note: We would have to set the environments anyway on startup because lib functions should not use settings directly (or move the functions out of lib?).
Testing notes:
OPENPYPE_FFMPEG_PATHS
andOPENPYPE_OIIO_PATHS
in system settings to different pathsget_oiio_tools_path
andget_ffmpeg_tool_path
which should return paths from your paths, or not if the tool is not there, or can't be executedExtractReview
where your paths should be usedResolves #3935