Skip to content

Commit

Permalink
use -noautorotate option to avoid discrepancies (fixes #1260) (#1261)
Browse files Browse the repository at this point in the history
use -noautorotate option to avoid discrepancies
  • Loading branch information
machenmusik authored Jan 20, 2023
1 parent 2120bd5 commit b1da94c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nerfstudio/process_data/process_data_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def copy_images_list(
file_type = image_paths[0].suffix
filename = f"frame_%05d{file_type}"
crop = f"crop=iw-{crop_border_pixels*2}:ih-{crop_border_pixels*2}"
ffmpeg_cmd = f"ffmpeg -y -i {image_dir / filename} -q:v 2 -vf {crop} {image_dir / filename}"
ffmpeg_cmd = f"ffmpeg -y -noautorotate -i {image_dir / filename} -q:v 2 -vf {crop} {image_dir / filename}"
run_command(ffmpeg_cmd, verbose=verbose)

num_frames = len(image_paths)
Expand Down Expand Up @@ -209,7 +209,7 @@ def downscale_images(image_dir: Path, num_downscales: int, verbose: bool = False
for f in files:
filename = f.name
ffmpeg_cmd = [
f"ffmpeg -y -i {image_dir / filename} ",
f"ffmpeg -y -noautorotate -i {image_dir / filename} ",
f"-q:v 2 -vf scale=iw/{downscale_factor}:ih/{downscale_factor} ",
f"{downscale_dir / filename}",
]
Expand Down

0 comments on commit b1da94c

Please sign in to comment.