Skip to content
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

Improve the compatibility of different versions of Python #47

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ __pycache__/
venv/
.vscode/
# Don't ignore files in the test_videos folder
!test_videos/*
!test_videos/*
.venv
2 changes: 1 addition & 1 deletion ffmpeg_process_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def __init__(
self._distorted_video = distorted_video
self._video_filters = f"{video_filters}," if video_filters else ""
self._transcoded_video_scaling = (
f"scale={transcoded_video_scaling.replace("x", ":")}:flags=bicubic,"
"scale={}:flags=bicubic,".format(transcoded_video_scaling.replace("x", ":"))
if transcoded_video_scaling
else ""
)
Expand Down
6 changes: 2 additions & 4 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,7 @@ def initialise_table():
vmaf_scores = []

log.info(f"Values of {args.encoder}'s '-{args.parameter}' parameter will be compared.")
log.info(
f"The following values will be compared: {", ".join(str(value) for value in args.values)}"
)
log.info("The following values will be compared: {}".format(", ".join(str(value) for value in args.values)))

comparison_table = initialise_table()

Expand Down Expand Up @@ -192,7 +190,7 @@ def initialise_table():

# Save the output of libvmaf to the following path.
json_file_path = (
f"{current_output_folder.replace("\\", "/")}/per_frame_metrics.json"
"{}/per_frame_metrics.json".format(current_output_folder.replace("\\", "/"))
)

# Run the libvmaf filter.
Expand Down