make sure output is same, not intermediate
This commit is contained in:
parent
a827f04632
commit
3b29fd5058
1 changed files with 14 additions and 3 deletions
11
render.py
11
render.py
|
|
@ -592,6 +592,7 @@ def render_all(options):
|
||||||
print(" ".join([str(x) for x in cmd]))
|
print(" ".join([str(x) for x in cmd]))
|
||||||
subprocess.call(cmd)
|
subprocess.call(cmd)
|
||||||
|
|
||||||
|
if options.get("debug"):
|
||||||
for a, b in (
|
for a, b in (
|
||||||
("back-audio.mp4", "back.mp4"),
|
("back-audio.mp4", "back.mp4"),
|
||||||
("front-mixed.mp4", "front.mp4"),
|
("front-mixed.mp4", "front.mp4"),
|
||||||
|
|
@ -602,6 +603,16 @@ def render_all(options):
|
||||||
print('!!', duration_a, fragment_prefix / a)
|
print('!!', duration_a, fragment_prefix / a)
|
||||||
print('!!', duration_b, fragment_prefix / b)
|
print('!!', duration_b, fragment_prefix / b)
|
||||||
sys.exit(-1)
|
sys.exit(-1)
|
||||||
|
|
||||||
|
for a, b in (
|
||||||
|
("back-audio.mp4", "front-mixed.mp4"),
|
||||||
|
):
|
||||||
|
duration_a = ox.avinfo(str(fragment_prefix / a))['duration']
|
||||||
|
duration_b = ox.avinfo(str(fragment_prefix / b))['duration']
|
||||||
|
if duration_a != duration_b:
|
||||||
|
print('!!', duration_a, fragment_prefix / a)
|
||||||
|
print('!!', duration_b, fragment_prefix / b)
|
||||||
|
|
||||||
shutil.move(fragment_prefix / "back-audio.mp4", fragment_prefix / "back.mp4")
|
shutil.move(fragment_prefix / "back-audio.mp4", fragment_prefix / "back.mp4")
|
||||||
shutil.move(fragment_prefix / "front-mixed.mp4", fragment_prefix / "front.mp4")
|
shutil.move(fragment_prefix / "front-mixed.mp4", fragment_prefix / "front.mp4")
|
||||||
if options["keep_audio"]:
|
if options["keep_audio"]:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue