Skip to content

Commit 03e20c3

Browse files
committed
fix: fix fps meta changing
1 parent 2e3c5f0 commit 03e20c3

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

DPF/transforms/video_fps_transforms.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,8 @@ def _process_filepath(self, data: TransformsFileData) -> TransformsFileData:
4848
ffmpeg_command = f'ffmpeg -hide_banner -i {filepath} -vf fps={self.fps} {temp_filename} -y'
4949
subprocess.run(ffmpeg_command, shell=True, capture_output=True, check=True)
5050
shutil.move(temp_filename, filepath)
51+
fps = self.fps
52+
else:
53+
fps = video_fps
5154

52-
return TransformsFileData(filepath, {'fps': self.fps})
55+
return TransformsFileData(filepath, {'fps': fps})

0 commit comments

Comments
 (0)