Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

General: Custom paths to ffmpeg and OpenImageIO tools #3982

Conversation

iLLiCiTiT
Copy link
Member

@iLLiCiTiT iLLiCiTiT commented Oct 13, 2022

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 and OPENPYPE_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 be 0 (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:

  1. Set OPENPYPE_FFMPEG_PATHS and OPENPYPE_OIIO_PATHS in system settings to different paths
  2. Call get_oiio_tools_path and get_ffmpeg_tool_path which should return paths from your paths, or not if the tool is not there, or can't be executed
  3. You can run publishing and check logging output e.g. from ExtractReview where your paths should be used

Resolves #3935

@ynbot
Copy link
Contributor

ynbot commented Oct 13, 2022

@iLLiCiTiT iLLiCiTiT self-assigned this Oct 13, 2022
@iLLiCiTiT iLLiCiTiT added the type: enhancement Enhancements to existing functionality label Oct 13, 2022
@iLLiCiTiT iLLiCiTiT merged commit 997495d into develop Oct 18, 2022
@iLLiCiTiT iLLiCiTiT deleted the feature/OP-4182_Add-custom-location-for-OpenImageIO-and-FFMpeg branch October 18, 2022 15:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: enhancement Enhancements to existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add custom location for OpenImageIO and FFMpeg
3 participants