You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

166 lines
4.1 KiB

ARG ffmpeg_tag=snapshot-vaapi
FROM jrottenberg/ffmpeg:${ffmpeg_tag} as ffmpeg
FROM linuxserver/sabnzbd
LABEL maintainer="RandomNinjaAtk"
ENV SABSCRIPTS_PATH /usr/local/sabnzbd-scripts
ENV SMA_PATH /usr/local/sma
ENV UPDATE_EXT TRUE
5 years ago
ENV UPDATE_SMA FALSE
ENV VIDEO_LANG eng
ENV VIDEO_SMA FALSE
ENV AUDIO_VERIFY TRUE
ENV AUDIO_FORMAT FDK-AAC
ENV AUDIO_BITRATE 320
ENV AUDIO_REPLAYGAIN FALSE
ENV AUDIO_DSFA TRUE
ENV AUDIO_DSFAS 150M
# converter settings
ENV CONVERTER_THREADS="0"
ENV CONVERTER_OUTPUT_FORMAT="mp4"
ENV CONVERTER_OUTPUT_EXTENSION="mp4"
ENV CONVERTER_SORT_STREAMS="True"
ENV CONVERTER_PROCESS_SAME_EXTENSIONS="False"
ENV CONVERTER_FORCE_CONVERT="False"
ENV CONVERTER_PREOPTS=""
ENV CONVERTER_POSTOPTS=""
# permissions
ENV PERMISSIONS_CHMOD="0666"
# metadata settings
ENV METADATA_RELOCATE_MOV="True"
ENV METADATA_TAG="True"
ENV METADATA_TAG_LANGUAGE="eng"
ENV METADATA_DOWNLOAD_ARTWORK="thumb"
ENV METADATA_PRESERVE_SOURCE_DISPOSITION="True"
# video settings
ENV VIDEO_CODEC="h264, x264"
ENV VIDEO_BITRATE="0"
ENV VIDEO_CRF="-1"
ENV VIDEO_CRF_PROFILES=""
ENV VIDEO_MAX_WIDTH="0"
ENV VIDEO_PROFILE=""
ENV VIDEO_MAX_LEVEL="0.0"
ENV VIDEO_PIX_FMT=""
# audio settings
ENV AUDIO_CODEC="ac3"
ENV AUDIO_LANGUAGES=""
ENV AUDIO_DEFAULT_LANGUAGE=""
ENV AUDIO_FIRST_STREAM_OF_LANGUAGE="False"
ENV AUDIO_CHANNEL_BITRATE="128"
ENV AUDIO_MAX_BITRATE="0"
ENV AUDIO_MAX_CHANNELS="0"
ENV AUDIO_PREFER_MORE_CHANNELS="True"
ENV AUDIO_DEFAULT_MORE_CHANNELS="True"
ENV AUDIO_FILTER=""
ENV AUDIO_SAMPLE_RATES=""
ENV AUDIO_COPY_ORIGINAL="False"
ENV AUDIO_AAC_ADTSTOASC="False"
ENV AUDIO_IGNORE_TREHD="mp4, m4v"
# universal audio settings
ENV UAUDIO_CODEC="aac"
ENV UAUDIO_CHANNEL_BITRATE="128"
ENV UAUDIO_FIRST_STREAM_ONLY="False"
ENV UAUDIO_MOVE_AFTER="False"
ENV UAUDIO_FILTER=""
# subtitle settings
ENV SUBTITLE_CODEC="mov_text"
ENV SUBTITLE_CODEC_IMAGE_BASED=""
ENV SUBTITLE_LANGUAGES=""
ENV SUBTITLE_DEFAULT_LANGUAGE=""
ENV SUBTITLE_FIRST_STREAM_OF_LANGUAGE="False"
ENV SUBTITLE_ENCODING=""
ENV SUBTITLE_BURN_SUBTITLES=""
ENV SUBTITLE_DOWNLOAD_SUBS="False"
ENV SUBTITLE_DOWNLOAD_HEARING_IMPAIRED_SUBS="False"
ENV SUBTITLE_DOWNLOAD_PROVIDERS=""
ENV SUBTITLE_EMBED_SUBS="True"
ENV SUBTITLE_EMBED_IMAGE_SUBS="False"
ENV SUBTITLE_EMBED_ONLY_INTERNAL_SUBS="False"
ENV SUBTITLE_IGNORE_EMBEDDED_SUBS="False"
ENV SUBTITLE_ATTACHMENT_CODEC=""
# Add files from ffmpeg
COPY --from=ffmpeg /usr/local/ /usr/local/
RUN \
# install dependancies
apt-get update -qq && \
apt-get install -qq -y \
mkvtoolnix \
mp3val \
flac \
opus-tools \
jq \
cron && \
apt-get purge --auto-remove -y && \
apt-get clean
# get python3 and git, and install python libraries
RUN \
apt-get update && \
apt-get install -y \
git \
wget \
python3 \
python3-pip && \
# make directory
mkdir -p ${SMA_PATH} && \
# download repo
git clone https://github.com/mdhiggins/sickbeard_mp4_automator.git ${SMA_PATH} && \
mkdir -p ${SMA_PATH}/config && \
# create logging file
mkdir -p ${SMA_PATH}/config && \
touch ${SMA_PATH}/config/sma.log && \
chgrp users ${SMA_PATH}/config/sma.log && \
chmod g+w ${SMA_PATH}/config/sma.log && \
# install pip, venv, and set up a virtual self contained python environment
python3 -m pip install --user --upgrade pip && \
pip3 install -r ${SMA_PATH}/setup/requirements.txt
RUN \
# ffmpeg
chgrp users /usr/local/bin/ffmpeg && \
chgrp users /usr/local/bin/ffprobe && \
chmod g+x /usr/local/bin/ffmpeg && \
chmod g+x /usr/local/bin/ffprobe && \
echo "**** install runtime ****" && \
apt-get update && \
apt-get install -y \
i965-va-driver \
libexpat1 \
libgl1-mesa-dri \
libglib2.0-0 \
libgomp1 \
libharfbuzz0b \
libv4l-0 \
libx11-6 \
libxcb1 \
libxext6 \
libxml2 \
libva-drm2 \
libva2 && \
echo "**** clean up ****" && \
rm -rf \
/var/lib/apt/lists/* \
/var/tmp/*
RUN \
# make directory
mkdir -p ${SABSCRIPTS_PATH} && \
# download repo
git clone https://github.com/RandomNinjaAtk/sabnzbd-scripts.git ${SABSCRIPTS_PATH}
RUN \
# setup cron
service cron start && \
echo "* * * * * root bash /etc/cont-init.d/33-script-setup.bash" >> "/etc/crontab"
WORKDIR /
# copy local files
COPY root/ /
# ports and volumes
EXPOSE 8080 9090
VOLUME /config /storage