Update video2.py
Browse files
video2.py
CHANGED
@@ -29,12 +29,12 @@ def audio_func(id,lines):
|
|
29 |
if os.path.exists(audio_path):
|
30 |
audio = MP3(audio_path)
|
31 |
duration = audio.info.length
|
32 |
-
return duration
|
33 |
|
34 |
# --- CONFIGURATION ---
|
35 |
def video_func(id,lines):
|
36 |
print(id,lines[id])
|
37 |
-
duration = audio_func(id,lines)
|
38 |
IMAGE_PATH = os.path.join(IMAGE_DIR,f"slide{id}.png") # Ensure this path is correct
|
39 |
VIDEO_DURATION = duration # seconds
|
40 |
HIGHLIGHT_COLOR = (255, 255, 0) # Yellow highlight
|
|
|
29 |
if os.path.exists(audio_path):
|
30 |
audio = MP3(audio_path)
|
31 |
duration = audio.info.length
|
32 |
+
return duration,audio_path
|
33 |
|
34 |
# --- CONFIGURATION ---
|
35 |
def video_func(id,lines):
|
36 |
print(id,lines[id])
|
37 |
+
duration,audio_path = audio_func(id,lines)
|
38 |
IMAGE_PATH = os.path.join(IMAGE_DIR,f"slide{id}.png") # Ensure this path is correct
|
39 |
VIDEO_DURATION = duration # seconds
|
40 |
HIGHLIGHT_COLOR = (255, 255, 0) # Yellow highlight
|