From 9b7a68fdc9eec564000013c808f394b15757b529 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 9 Jan 2020 13:31:47 +0100 Subject: video --- cli/app/search/video.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'cli') diff --git a/cli/app/search/video.py b/cli/app/search/video.py index 4f10d49..3d9f563 100644 --- a/cli/app/search/video.py +++ b/cli/app/search/video.py @@ -1,5 +1,6 @@ import shutil import os +from subprocess import call from app.settings import app_cfg @@ -10,13 +11,13 @@ def export_video(fp_frames, fps=30): '-hide_banner', '-y', # '-v', 'quiet', '-r', fps, - '-i', join(app_cfg.DIR_OUTPUTS, fp_frames, 'frame_%04d.png'), + '-i', os.path.join(app_cfg.DIR_OUTPUTS, fp_frames, 'frame_%04d.png'), '-pix_fmt', 'yuv420p', - join(app_cfg.DIR_OUTPUTS, fp_frames + '.mp4') + os.path.join(app_cfg.DIR_OUTPUTS, fp_frames + '.mp4') ] # print(' '.join(cmd)) call(cmd) - shutil.rmtree(join(app_cfg.DIR_OUTPUTS, fp_frames)) + shutil.rmtree(os.path.join(app_cfg.DIR_OUTPUTS, fp_frames)) def export_video_final(fp_frames): print("Exporting video...") @@ -25,15 +26,15 @@ def export_video_final(fp_frames): '-hide_banner', '-y', # '-v', 'quiet', '-r', fps, - '-i', join(app_cfg.DIR_OUTPUTS, fp_frames, 'frame_%05d.png'), + '-i', os.path.join(app_cfg.DIR_OUTPUTS, fp_frames, 'frame_%05d.png'), '-c:v', 'libx264', '-preset', 'slow', '-crf', '19', '-vf', 'fps=25', '-pix_fmt', 'yuv420p', '-s', '512x512', - join(app_cfg.DIR_RENDERS, fp_frames + '.mp4') + os.path.join(app_cfg.DIR_RENDERS, fp_frames + '.mp4') ] # print(' '.join(cmd)) call(cmd) - shutil.rmtree(join(app_cfg.DIR_OUTPUTS, fp_frames)) + # shutil.rmtree(os.path.join(app_cfg.DIR_OUTPUTS, fp_frames)) -- cgit v1.2.3-70-g09d2