fix deinterlace
This commit is contained in:
@@ -501,12 +501,7 @@ class FfxController():
|
|||||||
commandSequence1 = (commandTokens
|
commandSequence1 = (commandTokens
|
||||||
+ self.__targetMediaDescriptor.getInputMappingTokens(only_video=True))
|
+ self.__targetMediaDescriptor.getInputMappingTokens(only_video=True))
|
||||||
|
|
||||||
# Optional tokens
|
commandSequence1 += filterTokens
|
||||||
#NOTE: Filters and so needs to run on the first pass as well, as here
|
|
||||||
# the required bitrate for the second run is determined and recorded
|
|
||||||
# TODO: Results seems to be slightly better with first pass omitted,
|
|
||||||
# Confirm or find better filter settings for 2-pass
|
|
||||||
# commandSequence1 += self.__context['denoiser'].generatefilterTokens()
|
|
||||||
|
|
||||||
for td in self.__targetMediaDescriptor.getTrackDescriptors(trackType=TrackType.VIDEO):
|
for td in self.__targetMediaDescriptor.getTrackDescriptors(trackType=TrackType.VIDEO):
|
||||||
#HINT: Attached thumbnails are not supported by .webm container format
|
#HINT: Attached thumbnails are not supported by .webm container format
|
||||||
|
|||||||
@@ -161,6 +161,55 @@ class FfxControllerTests(unittest.TestCase):
|
|||||||
any(token.startswith("ENCODING_PRESET=") for token in commands[1])
|
any(token.startswith("ENCODING_PRESET=") for token in commands[1])
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def test_vp9_run_job_applies_identical_video_filters_to_both_passes(self):
|
||||||
|
context = self.make_context(VideoEncoder.VP9)
|
||||||
|
target_descriptor, source_descriptor = self.make_media_descriptors()
|
||||||
|
controller = FfxController(context, target_descriptor, source_descriptor)
|
||||||
|
commands = []
|
||||||
|
|
||||||
|
with (
|
||||||
|
patch.object(
|
||||||
|
controller,
|
||||||
|
"executeCommandSequence",
|
||||||
|
side_effect=lambda command: commands.append(command) or ("", "", 0),
|
||||||
|
),
|
||||||
|
patch("ffx.ffx_controller.os.path.exists", return_value=False),
|
||||||
|
):
|
||||||
|
controller.runJob(
|
||||||
|
"input.mkv",
|
||||||
|
"output.webm",
|
||||||
|
targetFormat="webm",
|
||||||
|
chainIteration=[
|
||||||
|
{
|
||||||
|
"identifier": "quality",
|
||||||
|
"parameters": {"quality": 27},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"identifier": "nlmeans",
|
||||||
|
"parameters": {},
|
||||||
|
"tokens": ["nlmeans=s=2.8"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"identifier": "bwdif",
|
||||||
|
"parameters": {},
|
||||||
|
"tokens": ["bwdif=mode=1"],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
cropArguments={
|
||||||
|
"output_width": 704,
|
||||||
|
"output_height": 576,
|
||||||
|
"x_offset": 8,
|
||||||
|
"y_offset": 0,
|
||||||
|
},
|
||||||
|
)
|
||||||
|
|
||||||
|
self.assertEqual(2, len(commands))
|
||||||
|
expectedFilterChain = (
|
||||||
|
"crop=704:576:8:0, nlmeans=s=2.8, bwdif=mode=1"
|
||||||
|
)
|
||||||
|
self.assert_token_pair(commands[0], "-vf", expectedFilterChain)
|
||||||
|
self.assert_token_pair(commands[1], "-vf", expectedFilterChain)
|
||||||
|
|
||||||
def test_av1_run_job_emits_file_level_quality_and_preset_metadata(self):
|
def test_av1_run_job_emits_file_level_quality_and_preset_metadata(self):
|
||||||
context = self.make_context(VideoEncoder.AV1)
|
context = self.make_context(VideoEncoder.AV1)
|
||||||
target_descriptor, source_descriptor = self.make_media_descriptors()
|
target_descriptor, source_descriptor = self.make_media_descriptors()
|
||||||
|
|||||||
Reference in New Issue
Block a user