notify('Recording','Restreamer API reported that repeating to local nginx is connected and the HLS endpoint is found. The HLS output is now being recorded. HLS URL is the following: '.$_set->hls.', Output directory is: '.$output_directory,2);
notify('Recording stopped','The FFMPEG process shut down with exit code: '.$exitcode,2);
if($exitcode)
{
logger(3,'Non-clean exit (expected), checking if output directory is empty');
if(is_dir_empty($output_directory))
if(@rmdir($output_directory))
logger(4,'Output directory removed');
else
{
logger(4,'Unable to remove output directory');
notify('Error','The FFMPEG process shut down with exit code '.$exitcode.' and the output directory is empty (nothing recorded). Output directory should have been removed automatically, but the process failed. Remove the output directory manually: '.$output_directory,4);