Browse Source

add fmpeg

master
Chris 3 years ago
parent
commit
29a48642ac
  1. 2
      Dockerfile
  2. 1
      getPreview.php

2
Dockerfile

@ -2,7 +2,7 @@ FROM debian:9.2
MAINTAINER christopher@chris-latza.de
RUN apt-get update && apt-get install -y php-cli
RUN apt-get update && apt-get install -y php-cli ffmpeg
RUN mkdir /data
ADD getPreview.php /data/getPreview.php
WORKDIR /data

1
getPreview.php

@ -99,6 +99,7 @@ while(true)
file_put_contents($imageFileName, file_get_contents($previewURL, false, $globalData['sslContext']));
echo "done\n";
system("ffmpeg -f image2 -framerate 2 -i /data/images/%07d.jpg -r 25 -vcodec libx264 /data/images/video.mp4");
sleep(300);
}
Loading…
Cancel
Save