move recorded file to the vod dir

This commit is contained in:
deflax 2024-01-13 01:14:14 +02:00
parent 4b547923fb
commit 88c5055858

View file

@ -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