bugfix + keep entire hls playlist

This commit is contained in:
Sándor 2021-05-29 16:32:17 +02:00
parent a1ca5013f4
commit ae4c450f10
1 changed files with 2 additions and 2 deletions

View File

@ -80,9 +80,9 @@ while (true) :
logger(2, 'All checks passed, starting ffmpeg'); logger(2, 'All checks passed, starting ffmpeg');
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', '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);
if ($_set->recordhls || !$_set->rtmp) if ($_set->recordhls || !$_set->rtmp)
exec('flock -n '.$_set->pid.' -c "ffmpeg -re -i '.$_set->hls.' -c copy '.$output_directory.'/index.m3u8 2> '.$output_directory.'/ffmpeg.log"', $output, $exitcode); exec('flock -n '.$_set->pid.' -c "ffmpeg -re -i '.$_set->hls.' -c copy -hls_list_size 0 '.$output_directory.'/index.m3u8 2> '.$output_directory.'/ffmpeg.log"', $output, $exitcode);
else else
exec('flock -n '.$_set->pid.' -c "ffmpeg -re -i '.$_set->hls.' -c copy -start_number 0 -hls_time 10 -hls_list_size 0 -f hls '.$output_directory.'/index.m3u8 2> '.$output_directory.'/ffmpeg.log"', $output, $exitcode); exec('flock -n '.$_set->pid.' -c "ffmpeg -re -i '.$_set->rtmp.' -c copy -start_number 0 -hls_time 10 -hls_list_size 0 -f hls '.$output_directory.'/index.m3u8 2> '.$output_directory.'/ffmpeg.log"', $output, $exitcode);
logger(2, 'ffmpeg exited with code '.$exitcode); logger(2, 'ffmpeg exited with code '.$exitcode);
notify('Recording stopped', 'The FFMPEG process shut down with exit code: '.$exitcode, 2); notify('Recording stopped', 'The FFMPEG process shut down with exit code: '.$exitcode, 2);
if ($exitcode) if ($exitcode)