Skip to content

Commit

Permalink
Correct ss_times call for discs
Browse files Browse the repository at this point in the history
Fixes #100
  • Loading branch information
Audionut committed Oct 24, 2024
1 parent b0428c1 commit c4e072c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/prep.py
Original file line number Diff line number Diff line change
Expand Up @@ -1171,7 +1171,7 @@ def disc_screenshots(self, filename, bdinfo, folder_id, base_dir, use_vs, image_
ss_times = self.valid_ss_time(ss_times, num_screens + 1, length)
(
ffmpeg
.input(file, ss=ss_times[-1], skip_frame=keyframe)
.input(file, ss=ss_times[i], skip_frame=keyframe)
.output(image, vframes=1, pix_fmt="rgb24")
.overwrite_output()
.global_args('-loglevel', loglevel)
Expand Down Expand Up @@ -1311,7 +1311,7 @@ def _is_vob_good(n, loops, num_screens):
voblength, n = _is_vob_good(n, 0, num_screens)
# img_time = random.randint(round(voblength/5), round(voblength - voblength/5))
ss_times = self.valid_ss_time(ss_times, num_screens + 1, voblength)
ff = ffmpeg.input(f"{meta['discs'][disc_num]['path']}/VTS_{main_set[n]}", ss=ss_times[-1])
ff = ffmpeg.input(f"{meta['discs'][disc_num]['path']}/VTS_{main_set[n]}", ss=ss_times[i])
if w_sar != 1 or h_sar != 1:
ff = ff.filter('scale', int(round(width * w_sar)), int(round(height * h_sar)))
(
Expand Down

0 comments on commit c4e072c

Please sign in to comment.