| 291 | return clips |
| 292 | |
| 293 | def crop(self, suffix="crop", dest_folder=None): |
| 294 | x1, _, y1, _ = self.get_bbox() |
| 295 | output_path = self.make_output_path(suffix, dest_folder) |
| 296 | command = ( |
| 297 | f'ffmpeg -n -i "{self.video_path}" ' |
| 298 | f"-filter:v crop={self.width}:{self.height}:{x1}:{y1} " |
| 299 | f'-c:a copy "{output_path}"' |
| 300 | ) |
| 301 | subprocess.call(command, shell=True) |
| 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) |