1
0
Fork 0

Compare commits

...

3 Commits

Author SHA1 Message Date
Christopher Latza 3d7d42ed7b add record video 2020-06-16 00:37:05 +02:00
Christopher Latza aac0dc2b13 add video record 2020-06-16 00:35:35 +02:00
Christopher Latza f1b94c82aa add screen 2020-06-16 00:30:22 +02:00
2 changed files with 6 additions and 1 deletions

View File

@ -2,7 +2,7 @@ FROM debian:latest
WORKDIR /root/
RUN apt-get update && apt-get install -y ffmpeg curl php-cli php-xml rtmpdump
RUN apt-get update && apt-get install -y ffmpeg curl php-cli php-xml rtmpdump screen
COPY start.sh /root/start.sh
COPY config.php /root/config.php
COPY start.php /root/start.php

View File

@ -54,8 +54,13 @@ while(TRUE)
$result = file_get_contents($DiscordWebhook, false, stream_context_create($startOptions));
echo "done.\n";
system('screen -dm ffmpeg -i '.$StreamURL.' tmp/rtmp/'.$videoFileName);
sleep(1);
$lastOnlineTime = time();
system("rtmpdump -r ".$StreamURL." -m 15 -o /dev/null");
system("killall -9 ffmpeg");
if(($lastOnlineTime + 10) < time())
{