Skip to content

Commit f0f0c3f

Browse files
author
Johannes Ballé
committed
Fixes frame duplication issue in convert_to_pngs.py.
1 parent 31bb1ed commit f0f0c3f

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

clic2022/convert_to_pngs.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ def _convert_video_to_pngs(video_path: str, png_out_root: str):
1717
os.makedirs(os.path.dirname(out_path_base), exist_ok=True)
1818

1919
subprocess.run([
20-
"ffmpeg", "-i", video_path, "-filter_complex", "extractplanes=y+u+v[y][u][v]",
20+
"ffmpeg", "-i", video_path,
21+
"-vsync", "vfr",
22+
"-filter_complex", "extractplanes=y+u+v[y][u][v]",
2123
"-map", "[y]", out_path_base + "_y.png",
2224
"-map", "[u]", out_path_base + "_u.png",
2325
"-map", "[v]", out_path_base + "_v.png",
@@ -75,4 +77,4 @@ def main():
7577

7678

7779
if __name__ == "__main__":
78-
main()
80+
main()

0 commit comments

Comments
 (0)