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
@ -96,6 +97,19 @@ while (true) :
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);