mixed output
This commit is contained in:
parent
b571bb2271
commit
fee8e821f9
2 changed files with 12 additions and 5 deletions
|
@ -57,7 +57,7 @@ class Command(BaseCommand):
|
|||
source = vo.files.filter(selected=True)[0]
|
||||
batch = vo.get('batch')[0].replace('Text-', '')
|
||||
src = source.data.path
|
||||
target = os.path.join(prefix, 'voice_over', batch, '%s.wav' % fragment_id)
|
||||
target = os.path.join(prefix, 'voice_over', batch, '%s.wav' % fragment_id)
|
||||
os.makedirs(os.path.dirname(target), exist_ok=True)
|
||||
if os.path.islink(target):
|
||||
os.unlink(target)
|
||||
|
|
15
render.py
15
render.py
|
@ -4,6 +4,7 @@ import os
|
|||
import subprocess
|
||||
import sys
|
||||
import time
|
||||
import shutil
|
||||
from pathlib import Path
|
||||
|
||||
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]",
|
||||
"-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:
|
||||
#print(" ".join([str(x) for x in cmd]))
|
||||
subprocess.call(cmd)
|
||||
'''
|
||||
shutil.move(fragment_prefix / "back-5.1.mp4", fragment_prefix / "back.mp4")
|
||||
for fn in (
|
||||
"audio-A1.wav", "audio-A2.wav", "audio-A3.wav",
|
||||
"fl.wav", "fr.wav", "fc.wav", "lfe.wav", "bl.wav", "br.wav",
|
||||
"audio-5.1.mp4", "fl.wav", "fr.wav", "fc.wav", "lfe.wav", "bl.wav", "br.wav",
|
||||
):
|
||||
fn = fragment_prefix / fn
|
||||
if os.path.exists(fn):
|
||||
os.unlink(fn)
|
||||
'''
|
||||
print("Duration - Target: %s Actual: %s" % (target_position, position))
|
||||
with open(_cache, "w") as fd:
|
||||
json.dump(_CACHE, fd)
|
||||
|
|
Loading…
Reference in a new issue