mixed output

This commit is contained in:
j 2023-10-28 11:24:51 +02:00
parent b571bb2271
commit fee8e821f9
2 changed files with 12 additions and 5 deletions

View file

@ -4,6 +4,7 @@ import os
import subprocess import subprocess
import sys import sys
import time import time
import shutil
from pathlib import Path from pathlib import Path
import ox import ox
@ -328,18 +329,24 @@ def render_all(options):
"-filter_complex", "[0:a][1:a][2:a][3:a][4:a][5:a]amerge=inputs=6[a]", "-filter_complex", "[0:a][1:a][2:a][3:a][4:a][5:a]amerge=inputs=6[a]",
"-map", "[a]", "-c:a", "aac", fragment_prefix / "audio-5.1.mp4" "-map", "[a]", "-c:a", "aac", fragment_prefix / "audio-5.1.mp4"
]) ])
cmds.append([
"ffmpeg", "-y",
"-nostats", "-loglevel", "error",
"-i", fragment_prefix / "back.mp4",
"-i", fragment_prefix / "audio-5.1.mp4",
"-c", "copy",
fragment_prefix / "back-5.1.mp4",
])
for cmd in cmds: for cmd in cmds:
#print(" ".join([str(x) for x in cmd])) #print(" ".join([str(x) for x in cmd]))
subprocess.call(cmd) subprocess.call(cmd)
''' shutil.move(fragment_prefix / "back-5.1.mp4", fragment_prefix / "back.mp4")
for fn in ( for fn in (
"audio-A1.wav", "audio-A2.wav", "audio-A3.wav", "audio-5.1.mp4", "fl.wav", "fr.wav", "fc.wav", "lfe.wav", "bl.wav", "br.wav",
"fl.wav", "fr.wav", "fc.wav", "lfe.wav", "bl.wav", "br.wav",
): ):
fn = fragment_prefix / fn fn = fragment_prefix / fn
if os.path.exists(fn): if os.path.exists(fn):
os.unlink(fn) os.unlink(fn)
'''
print("Duration - Target: %s Actual: %s" % (target_position, position)) print("Duration - Target: %s Actual: %s" % (target_position, position))
with open(_cache, "w") as fd: with open(_cache, "w") as fd:
json.dump(_CACHE, fd) json.dump(_CACHE, fd)