Files
tuliprox/docker/Dockerfile-manual
T
euzuandGitHub fc0f1f32aa Enhanced Metadata Resolution, Stream Analysis & Improved STRM-Output. Added connection priority management.
**Description:**
This PR introduces a major overhaul of how streams are analyzed and connections are managed. It integrates `ffprobe` for deep stream analysis, adds a background task queue for metadata resolution to prevent UI blocking, introduces a connection priority system, and adds support for Live TV probing.

### 🚀 Key Features

*   **FFprobe Integration & Live TV Probing**:
    *   Automatically probes streams (VOD/Series **and now Live TV**) to determine resolution, codecs (HEVC/AV1), dynamic range (HDR/DV), bit depth, and audio channels.
    *   **Safe Probing**: Probing strictly respects the provider's `max_connections` limit.
    *   Docker images now include static `ffmpeg/ffprobe` binaries.

*   **Smart Connection Management (Priority System)**:
    *   Introduced a priority system for connections to manage provider limits intelligently.
    *   **Preemption**: Users with higher priority can preempt (kick) lower priority connections when provider slots are full.
    *   **Background Queue**: Metadata resolution and stream analysis run as background tasks (Priority 0). They only run when connection slots are idle and yield immediately if a real user needs to stream.

*   **Enhanced Metadata Resolution**:
    *   **Fallback Logic**: If a provider is missing the TMDB ID or Release Date, the system resolves them via the TMDB API.
    *   **Smart Title Cleaning**: Implemented a centralized cleaner to strip common IPTV prefixes before attempting metadata matches or generating filenames, significantly improving match rates.

*   **Improved Output**:
    *   **Quality Tags**: Filenames in STRM files now include detailed tags (e.g., `Movie - [4K HEVC HDR].strm`).
    *   **Flat Grouping**: `flat: true` now correctly groups multi-version movies into single folders based on TMDB ID.
    *   **Global Series Date**: Ensures consistent series folder naming even if episodes have different years.
2026-02-12 15:06:57 +01:00

86 lines
2.5 KiB
Plaintext

FROM alpine:latest AS tz-prep
ARG TZ=UTC
ENV TZ=${TZ}
RUN apk add --no-cache tzdata \
&& mkdir -p /output/etc \
&& mkdir -p /output/usr/share \
&& cp -r /usr/share/zoneinfo /output/usr/share/zoneinfo \
&& ln -sf /usr/share/zoneinfo/${TZ} /output/etc/localtime \
&& mkdir -p /output/etc/ssl/certs \
&& cp /etc/ssl/certs/ca-certificates.crt /output/etc/ssl/certs/ca-certificates.crt
# Fetch static FFmpeg binaries
FROM mwader/static-ffmpeg:7.1 AS ffmpeg-static
# Binary selector stage
FROM alpine:latest AS binary-selector
ARG TARGETARCH
WORKDIR /app
# Copy all binaries
COPY ./binaries ./binaries
# Select the appropriate binary based on target architecture
RUN case "${TARGETARCH}" in \
"amd64") cp ./binaries/tuliprox-x86_64-unknown-linux-musl ./tuliprox ;; \
"arm64") cp ./binaries/tuliprox-aarch64-unknown-linux-musl ./tuliprox ;; \
*) echo "Unsupported architecture: ${TARGETARCH}" && exit 1 ;; \
esac
# Scratch Final container
FROM scratch AS scratch-final
ARG TZ=UTC
ENV TZ=${TZ}
# Copy timezone data and localtime from tz-prep
COPY --from=tz-prep /output/usr/share/zoneinfo /usr/share/zoneinfo
COPY --from=tz-prep /output/etc/localtime /etc/localtime
COPY --from=tz-prep /output/etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
# Copy static ffmpeg/ffprobe binaries
COPY --from=ffmpeg-static /ffmpeg /usr/local/bin/
COPY --from=ffmpeg-static /ffprobe /usr/local/bin/
# RUN ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime
WORKDIR /app
# Copy the selected binary from binary-selector stage
COPY --from=binary-selector /app/tuliprox ./tuliprox
COPY ./web ./web
COPY ./resources ./resources
CMD ["/app/tuliprox", "-s", "-p", "/app/config"]
# Alpine Final container
FROM alpine:latest AS alpine-final
ARG TZ=UTC
ENV TZ=${TZ}
# Install dependencies including ffmpeg
RUN apk add --no-cache bash curl strace tcpdump bind-tools nano ca-certificates tini ffmpeg
# Copy timezone data and localtime from tz-prep
COPY --from=tz-prep /output/usr/share/zoneinfo /usr/share/zoneinfo
COPY --from=tz-prep /output/etc/localtime /etc/localtime
COPY --from=tz-prep /output/etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
RUN ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime
WORKDIR /app
# Copy the selected binary from binary-selector stage
COPY --from=binary-selector /app/tuliprox ./tuliprox
COPY ./web ./web
COPY ./resources ./resources
# config should be mounted as volume
# COPY ./config ./config
ENTRYPOINT ["/sbin/tini", "--", "/app/tuliprox"]
CMD ["-s", "-p", "/app/config"]