Skip to content

Commit

Permalink
Version 4.4.1 (#263)
Browse files Browse the repository at this point in the history
* Fixing colorspace details from advanced page not applied to x265 (thanks to Tình Em Là Đại Dương)
  • Loading branch information
cdgriffith authored Sep 26, 2021
1 parent 1b01faa commit 2a9197a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## Version 4.4.1

* Fixing colorspace details from advanced page not applied to x265 (thanks to Tình Em Là Đại Dương)

## Version 4.4.0

* Adding #237 zoom option for thumbnail (thanks to Lev Abashkin)
Expand Down
13 changes: 10 additions & 3 deletions fastflix/encoders/hevc_x265/command_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,19 +98,26 @@ def build(fastflix: FastFlix):
x265_params.append(f"frame-threads={settings.frame_threads}")

if not fastflix.current_video.video_settings.remove_hdr:
if fastflix.current_video.color_primaries:

if fastflix.current_video.video_settings.color_primaries:
x265_params.append(f"colorprim={fastflix.current_video.video_settings.color_primaries}")
elif fastflix.current_video.color_primaries:
if fastflix.current_video.color_primaries in x265_valid_color_primaries:
x265_params.append(f"colorprim={fastflix.current_video.color_primaries}")
elif fastflix.current_video.color_primaries in color_primaries_mapping:
x265_params.append(f"colorprim={color_primaries_mapping[fastflix.current_video.color_primaries]}")

if fastflix.current_video.color_transfer:
if fastflix.current_video.video_settings.color_transfer:
x265_params.append(f"transfer={fastflix.current_video.video_settings.color_transfer}")
elif fastflix.current_video.color_transfer:
if fastflix.current_video.color_transfer in x265_valid_color_transfers:
x265_params.append(f"transfer={fastflix.current_video.color_transfer}")
elif fastflix.current_video.color_transfer in color_transfer_mapping:
x265_params.append(f"transfer={color_transfer_mapping[fastflix.current_video.color_transfer]}")

if fastflix.current_video.color_space:
if fastflix.current_video.video_settings.color_space:
x265_params.append(f"colormatrix={fastflix.current_video.video_settings.color_space}")
elif fastflix.current_video.color_space:
if fastflix.current_video.color_space in x265_valid_color_matrix:
x265_params.append(f"colormatrix={fastflix.current_video.color_space}")
elif fastflix.current_video.color_space in color_matrix_mapping:
Expand Down
2 changes: 1 addition & 1 deletion fastflix/version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
__version__ = "4.4.0"
__version__ = "4.4.1"
__author__ = "Chris Griffith"

0 comments on commit 2a9197a

Please sign in to comment.