force re-render sound

This commit is contained in:
j 2026-01-29 12:11:30 +01:00
commit 2bd9200b0f
2 changed files with 8 additions and 4 deletions

View file

@ -1,4 +1,5 @@
import os
import shutil
import subprocess
import ox
@ -11,11 +12,11 @@ from .render import default_prefix as root
from .render import load_defaults
def render_all(options):
if os.path.exists(os.path.join(root, "render/forest-5.1.mp4")):
if not options["force"] and os.path.exists(os.path.join(root, "render/forest-5.1.mp4")):
print("forest-5.1.mp4 exists, skipping")
else:
render_forest()
if os.path.exists(os.path.join(root, "render/music-5.1.mp4")):
if not options["force"] and os.path.exists(os.path.join(root, "render/music-5.1.mp4")):
print("music-5.1.mp4 exists, skipping")
else:
render_music()
@ -81,11 +82,12 @@ def render_music():
"-filter_complex", "[0:a][1:a][2:a][3:a][4:a][5:a]amerge=inputs=6[a]",
"-map", "[a]",
"-ar", "48000",
"-c:a", "aac", "render/music-5.1.mp4"
"-c:a", "aac", "render/music-5.1-new.mp4"
])
for cmd in cmds:
print(" ".join([str(x) for x in cmd]))
subprocess.call(cmd)
shutil.move("render/music-5.1-new.mp4", "render/music-5.1.mp4")
for name in (
"music.kdenlive",
"music.wav",
@ -157,11 +159,12 @@ def render_forest():
"-filter_complex", "[0:a][1:a][2:a][3:a][4:a][5:a]amerge=inputs=6[a]",
"-map", "[a]",
"-ar", "48000",
"-c:a", "aac", "render/forest-5.1.mp4"
"-c:a", "aac", "render/forest-5.1-new.mp4"
])
for cmd in cmds:
print(" ".join([str(x) for x in cmd]))
subprocess.call(cmd)
shutil.move("render/forest-5.1-new.mp4", "render/forest-5.1.mp4")
for name in (
"forest.kdenlive",
"forest.wav",