diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2020-01-09 13:31:47 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2020-01-09 13:31:47 +0100 |
| commit | 9b7a68fdc9eec564000013c808f394b15757b529 (patch) | |
| tree | 19a6fadd0bac84c2a9f99fe17f0b3951ecbac662 /cli/app | |
| parent | 21bb879e00eea74a5df9e703749b8cfa20ec1732 (diff) | |
video
Diffstat (limited to 'cli/app')
| -rw-r--r-- | cli/app/search/video.py | 13 |
1 files changed, 7 insertions, 6 deletions
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)) |
