From 88c5055858bce56c68b680dda477f167a8c7aaa2 Mon Sep 17 00:00:00 2001 From: deflax Date: Sat, 13 Jan 2024 01:14:14 +0200 Subject: [PATCH] move recorded file to the vod dir --- src/scheduler/app.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/scheduler/app.py b/src/scheduler/app.py index 68b4a69..3d8c8ae 100644 --- a/src/scheduler/app.py +++ b/src/scheduler/app.py @@ -164,14 +164,16 @@ def exec_recorder(stream_id, stream_hls_url): return False logger_job.warning(f'Recording {output_file} started.') rechead = stream_id + output = f'{rec_path}/live/{output_file}' ffmpeg = ( FFmpeg() .option("y") .input(stream_hls_url) - .output(output_file, vcodec="copy") + .output(output, vcodec="copy") ) ffmpeg.execute() - logger_job.warning(f'Recording {output_file} finished.') + logger_job.warning(f'Recording {output_file} finished. Moving file to {rec_path}/vod') + os.rename(f'{rec_path}/live/{output_file}', f'{rec_path}/vod/{output_file}') rechead = "" # Datarhei CORE API sync