Browse Source

Move to Ubuntu:20.04 for newer tools

add-file-preservation 1.2.0
Drew Short 4 years ago
parent
commit
3bdcd4872c
  1. 28
      Dockerfile
  2. 56
      acm-config-default.json

28
Dockerfile

@ -1,19 +1,28 @@
FROM ubuntu:18.04
FROM ubuntu:20.04
LABEL maintainer="Drew Short <warrick@sothr.com>" \
name="acm" \
version="1.2.0" \
description="Prepackaged ACM with defaults and tooling"
ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
ENV DEBIAN_FRONTEND=noninteractive
ARG MOZJPEG_VERSION="3.3.1"
# Install tooling (ffmpeg, opusenc, optipng, python3)
RUN apt-get update \
&& apt-get install -y \
RUN ln -fs /usr/share/zoneinfo/UCT /etc/localtime \
&& apt-get update -y \
&& apt-get install -y --fix-missing \
curl \
ffmpeg \
python3 \
python3-pip \
opus-tools \
optipng \
curl
python3 \
python3-pip \
tzdata \
webp
WORKDIR /tmp
@ -43,8 +52,11 @@ COPY docker/acm acm
# Make script executable
RUN chmod +x acm
WORKDIR /project
VOLUME ["/input", "/output"]
WORKDIR /app
COPY acm-config.json.example acm-config.json
COPY docker/entrypoint.sh .
CMD ["sh", "/project/entrypoint.sh"]
CMD ["sh", "-c", "find /input/ -type f | /app/entrypoint.sh --stdin --remove-prefix /input/ compress -p default -d /output/"]

56
acm-config-default.json

@ -79,6 +79,25 @@
"command": "cp {input_file} {output_file}"
}
},
"webp": {
"jpeg": {
"processors": ["cwebp"],
"extensions": [
"jpg",
"jpeg"
],
"outputExtension": "webp",
"command": "cwebp -jpeg_like -q 90 -o {output_file} {input_file}"
},
"png": {
"processors": ["cwebp"],
"extensions": [
"png"
],
"outputExtension": "webp",
"command": "cwebp -lossless -o {output_file} {input_file}"
}
},
"aggressive": {
"jpeg": {
"processors": ["ffmpeg", "cjpeg"],
@ -115,6 +134,43 @@
"outputExtension": "ogg",
"command": "ffmpeg -hide_banner -loglevel panic -i {input_file} -f wav -| opusenc --bitrate 64 --vbr --downmix-stereo --discard-comments --discard-pictures - {output_file}"
}
},
"aggressive-webp": {
"jpeg": {
"processors": ["cwebp"],
"extensions": [
"jpg",
"jpeg"
],
"outputExtension": "webp",
"command": "export FILE={output_file} && export TEMP_FILE=${FILE}_tmp.jpg && ffmpeg -i {input_file} -vf scale=-1:720 ${TEMP_FILE} && cwebp -jpeg_like -q 75 -o {output_file} ${TEMP_FILE} && rm ${TEMP_FILE}"
},
"png": {
"processors": ["cwebp"],
"extensions": [
"png"
],
"outputExtension": "webp",
"command": "cwebp -o {output_file} ${input_file}"
},
"video": {
"processors": ["ffmpeg"],
"extensions": [
"mp4",
"webm"
],
"outputExtension": "webm",
"command": "ffmpeg -hide_banner -loglevel panic -i {input_file} -vf scale=-1:720 -c:v libvpx-vp9 -b:v 0 -crf 38 -c:a libopus {output_file}"
},
"audio": {
"processors": ["ffmpeg", "opusenc"],
"extensions": [
"wav",
"mp3"
],
"outputExtension": "ogg",
"command": "ffmpeg -hide_banner -loglevel panic -i {input_file} -f wav -| opusenc --bitrate 64 --vbr --downmix-stereo --discard-comments --discard-pictures - {output_file}"
}
}
}
}
Loading…
Cancel
Save