(self, angle, rotatecw="Arbitrary", suffix="rotated", dest_folder=None)
| 302 | return output_path |
| 303 | |
| 304 | def rotate(self, angle, rotatecw="Arbitrary", suffix="rotated", dest_folder=None): |
| 305 | output_path = self.make_output_path(suffix, dest_folder) |
| 306 | command = f'ffmpeg -n -i "{self.video_path}" -vf ' |
| 307 | if rotatecw == "Arbitrary": |
| 308 | angle = np.deg2rad(angle) |
| 309 | command += f"rotate={angle} " |
| 310 | elif rotatecw == "Yes": |
| 311 | command += "transpose=1 " |
| 312 | else: |
| 313 | raise ValueError("Unknown rotation direction.") |
| 314 | |
| 315 | command += f'-c:a copy "{output_path}"' |
| 316 | subprocess.call(command, shell=True) |
| 317 | return output_path |
| 318 | |
| 319 | def rescale( |
| 320 | self, |
no test coverage detected