Skip to content

Commit

Permalink
Adjusted Output Video FPS
Browse files Browse the repository at this point in the history
  • Loading branch information
czhurdlespeed committed Oct 15, 2024
1 parent 581f8be commit e2cde8a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion MeltSeg/WeldPathTime.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class VideoProcessing:
def __init__(self):
self.video_path = None
self.output_folder = None
self.input_fps = None
self.fps = None
self.process()

Expand Down Expand Up @@ -53,6 +54,7 @@ def get_fps(self):

video = cv2.VideoCapture(self.video_path)
fps = video.get(cv2.CAP_PROP_FPS)
self.input_fps = fps
video.release()

temp_root = tk.Tk()
Expand All @@ -67,7 +69,7 @@ def get_fps(self):
dialog.geometry(f"300x150+{position_right}+{position_top}")

tk.Label(dialog, text=f"Input Video FPS: {fps:.1f}").pack(pady=10)
tk.Label(dialog, text="Output FPS:").pack()
tk.Label(dialog, text="FPS Sampling Rate:").pack()

fps_options = list(reversed(range(1, int(fps) + 1)))
selected_fps = tk.StringVar(dialog)
Expand Down
2 changes: 1 addition & 1 deletion MeltSeg/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
video_preprocessing.output_folder)
root.mainloop()
sam2 = SAM2Boot(video_preprocessing.output_folder,
frameannotation.file_path, video_preprocessing.fps)
frameannotation.file_path, video_preprocessing.input_fps)

0 comments on commit e2cde8a

Please sign in to comment.