From 314f5c7db9f2f58bc573362d58e2ea3de4a6654d Mon Sep 17 00:00:00 2001 From: kev Date: Mon, 8 Apr 2024 14:53:23 +0800 Subject: [PATCH] add scenedetect --- README.md | 1 + scenedetect/Dockerfile | 23 +++++++++++++++++++++++ scenedetect/README.md | 21 +++++++++++++++++++++ 3 files changed, 45 insertions(+) create mode 100644 scenedetect/Dockerfile create mode 100644 scenedetect/README.md diff --git a/README.md b/README.md index c3e67f9..0905e48 100644 --- a/README.md +++ b/README.md @@ -183,6 +183,7 @@ A collection of delicious docker recipes. - [x] red5-arm :construction: :camera: - [x] rtmp-client-arm :+1: - [x] rtmp-server :camera: +- [x] scenedetect - [x] shairplay-arm - [x] shoutcast :musical_note: - [x] tesseract diff --git a/scenedetect/Dockerfile b/scenedetect/Dockerfile new file mode 100644 index 0000000..b382247 --- /dev/null +++ b/scenedetect/Dockerfile @@ -0,0 +1,23 @@ +# +# Dockerfile for scenedetect +# + +FROM python:3.11-bookworm +MAINTAINER EasyPi Software Foundation + +ARG SCENEDETECT_VERSION=0.6.3 +ARG FFMPEG_VERSION=6.1 + +RUN set -xe \ + && apt update \ + && apt install -y curl dumb-init fonts-noto-cjk xvfb xz-utils \ + && curl -sSL https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz \ + | tar xJC /usr/bin/ ffmpeg-${FFMPEG_VERSION}-amd64-static/ffprobe ffmpeg-${FFMPEG_VERSION}-amd64-static/ffmpeg --strip 1 \ + && ffmpeg -version \ + && ffprobe -version \ + && rm -rf /var/lib/apt/lists/* + +RUN pip install scenedetect[opencv-headless]==$SCENEDETECT_VERSION + +ENTRYPOINT ["scenedetect"] +CMD ["--help"] diff --git a/scenedetect/README.md b/scenedetect/README.md new file mode 100644 index 0000000..60d4e26 --- /dev/null +++ b/scenedetect/README.md @@ -0,0 +1,21 @@ +scenedetect +=========== + +[PySceneDetect][1] is a tool for detecting shot changes in videos +([example][2]), and can automatically split the video into separate clips. + +## Tutorial + +```bash +# Create an alias +$ alias scenedetect='docker run --rm -u $(id -u):$(id -g) -v $PWD:/data -w /data vimagick/scenedetect' + +# Download sample video +$ wget https://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4 + +# Perform video splitting +$ scenedetect -i BigBuckBunny_320x180.mp4 split-video +``` + +[1]: https://github.com/Breakthrough/PySceneDetect +[2]: https://www.scenedetect.com/cli/