Skip to content

Commit

Permalink
encapp: add enviromental override for vmaf model
Browse files Browse the repository at this point in the history
Set VMAF_MODEL_PATH to override.

Signed-off-by: JohanBlome <[email protected]>
  • Loading branch information
JohanBlome committed Aug 12, 2024
1 parent 51be722 commit 207fd06
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/encapp_quality.py
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,10 @@ def run_quality(test_file, options, debug):
f'"{filter_cmd}libvmaf=log_path={vmaf_file}:'
"n_threads=16:log_fmt=json"
)
# Allow for an environment variable
if os.environ.get("VMAF_MODEL_PATH", None):
print("Environment VMAF_PATH override model")
VMAF_MODEL = os.environ.get("VMAF_MODEL_PATH")
if os.path.isfile(VMAF_MODEL):
shell_cmd += f":model=path={VMAF_MODEL}"
else:
Expand Down

0 comments on commit 207fd06

Please sign in to comment.