Compare commits
3 Commits
5e1141eae9
...
3d7d42ed7b
Author | SHA1 | Date |
---|---|---|
Christopher Latza | 3d7d42ed7b | |
Christopher Latza | aac0dc2b13 | |
Christopher Latza | f1b94c82aa |
|
@ -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
|
||||
|
|
|
@ -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())
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue