Esempio n. 1
0
    def __init__(self, service_request: Dandere2xServiceRequest):
        """
        Uses multiple Dandere2xServiceThread to upscale a given file. It does this by attempting to split the video
        up into equal parts, then migrating each upscaled-split video into one complete video file.
        """
        super().__init__(service_request=copy.deepcopy(service_request))

        assert is_file_video(ffprobe_dir=load_executable_paths_yaml()['ffprobe'],
                             input_video=self._service_request.input_file),\
            "%s is not a video file!" % self._service_request.input_file

        self._child_threads: List[Dandere2xServiceThread] = []
        self._divided_videos_upscaled: List[str] = []
Esempio n. 2
0
    def __init__(self, service_request: Dandere2xServiceRequest):
        """
        Uses a single Dandere2xServiceThread object to upscale a video file.

        Args:
            service_request: Dandere2xServiceRequest object.
        """
        super().__init__(service_request=copy.deepcopy(service_request))

        assert is_file_video(ffprobe_dir=load_executable_paths_yaml()['ffprobe'],
                             input_video=self._service_request.input_file),\
            "%s is not a video file!" % self._service_request.input_file

        self.child_request = copy.deepcopy(service_request)
        self.child_request.input_file = os.path.join(service_request.workspace,
                                                     "pre_processed.mkv")
        self.child_request.output_file = os.path.join(
            service_request.workspace, "non_migrated.mkv")
        self.child_request.workspace = os.path.join(service_request.workspace,
                                                    "subworkspace")
        self.dandere2x_service = None