Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -142,7 +142,7 @@ def run_inference(prompt, video_path, condition, video_length, seed, steps):
|
|
| 142 |
target_fps = get_video_dimension(video_path)[2]
|
| 143 |
if target_fps > 12 :
|
| 144 |
print(f"FPS is too high: {target_fps}")
|
| 145 |
-
#
|
| 146 |
|
| 147 |
target_fps = 12
|
| 148 |
print(f"NEW INPUT FPS: {target_fps}, NEW FPS: {video_length}")
|
|
@@ -159,6 +159,8 @@ def run_inference(prompt, video_path, condition, video_length, seed, steps):
|
|
| 159 |
# Delete the existing file
|
| 160 |
os.remove('resized.mp4')
|
| 161 |
resized = resize_video(video_path, 'resized.mp4', r_width, r_height, target_fps)
|
|
|
|
|
|
|
| 162 |
|
| 163 |
# normalize pixels
|
| 164 |
#normalized = normalize_and_save_video(resized, 'normalized.mp4')
|
|
|
|
| 142 |
target_fps = get_video_dimension(video_path)[2]
|
| 143 |
if target_fps > 12 :
|
| 144 |
print(f"FPS is too high: {target_fps}")
|
| 145 |
+
#video_length = int((12 * video_length) / target_fps)
|
| 146 |
|
| 147 |
target_fps = 12
|
| 148 |
print(f"NEW INPUT FPS: {target_fps}, NEW FPS: {video_length}")
|
|
|
|
| 159 |
# Delete the existing file
|
| 160 |
os.remove('resized.mp4')
|
| 161 |
resized = resize_video(video_path, 'resized.mp4', r_width, r_height, target_fps)
|
| 162 |
+
resized_video_fcount = get_video_dimension(resized)[3]
|
| 163 |
+
print(f"RESIZED VIDEO FRAME COUNT: {resized_video_fcount}")
|
| 164 |
|
| 165 |
# normalize pixels
|
| 166 |
#normalized = normalize_and_save_video(resized, 'normalized.mp4')
|