Test and log ffmpeg version output earlier

Running the ffmpeg in an earlier (hopefully cached) layer should clean up the logs a bit.

On a related note, shadowing the environment variable was causing some confusing log output, so stop doing that as well.
This commit is contained in:
tcely
2025-01-08 00:31:30 -05:00
committed by GitHub
parent f6e557f502
commit f0b7d31949

View File

@@ -109,6 +109,7 @@ RUN decide_arch() { \
_file="/tmp/ffmpeg-${ARCH}.tar.xz" && \ _file="/tmp/ffmpeg-${ARCH}.tar.xz" && \
download_expected_file ffmpeg "${TARGETARCH}" "${_file}" && \ download_expected_file ffmpeg "${TARGETARCH}" "${_file}" && \
tar -xvvpf "${_file}" --strip-components=2 --no-anchored -C /usr/local/bin/ "ffmpeg" "ffprobe" && rm -f "${_file}" && \ tar -xvvpf "${_file}" --strip-components=2 --no-anchored -C /usr/local/bin/ "ffmpeg" "ffprobe" && rm -f "${_file}" && \
/usr/local/bin/ffmpeg -version && \
file /usr/local/bin/ff* && \ file /usr/local/bin/ff* && \
# Clean up # Clean up
apt-get -y autoremove --purge curl file binutils xz-utils && \ apt-get -y autoremove --purge curl file binutils xz-utils && \
@@ -217,10 +218,9 @@ RUN set -x && \
# Append software versions # Append software versions
RUN set -x && \ RUN set -x && \
/usr/local/bin/ffmpeg -version && \ ffmpeg_version=$(/usr/local/bin/ffmpeg -version | awk -v 'ev=31' '1 == NR && "ffmpeg" == $1 { print $3; ev=0; } END { exit ev; }') && \
FFMPEG_VERSION=$(/usr/local/bin/ffmpeg -version | awk -v 'ev=31' '1 == NR && "ffmpeg" == $1 { print $3; ev=0; } END { exit ev; }') && \ test -n "${ffmpeg_version}" && \
test -n "${FFMPEG_VERSION}" && \ printf -- "ffmpeg_version = '%s'\n" "${ffmpeg_version}" >> /app/common/third_party_versions.py
printf -- "ffmpeg_version = '%s'\n" "${FFMPEG_VERSION}" >> /app/common/third_party_versions.py
# Copy root # Copy root
COPY config/root / COPY config/root /