Skip to content

Commit

Permalink
Fix build pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
ehfd authored Nov 10, 2023
1 parent bd1a618 commit d00ed43
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Dockerfile.example
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ Pin-Priority: -1" > /etc/apt/preferences.d/firefox-nosnap && \
git \
vim \
wget \
unzip \
zip \
unzip \
ssl-cert \
jq \
xvfb \
Expand All @@ -111,9 +111,7 @@ Pin-Priority: -1" > /etc/apt/preferences.d/firefox-nosnap && \
jstest-gtk \
coturn && \
rm -rf /var/lib/apt/lists/* && \
update-alternatives --set x-www-browser /usr/bin/firefox && \
# Extract NVRTC dependency, https://developer.download.nvidia.com/compute/cuda/redist/cuda_nvrtc/LICENSE.txt
cd /tmp && curl -fsSL -o nvidia_cuda_nvrtc_linux_x86_64.whl "https://developer.download.nvidia.com/compute/redist/nvidia-cuda-nvrtc/nvidia_cuda_nvrtc-11.0.221-cp36-cp36m-linux_x86_64.whl" && unzip -joq -d ./nvrtc nvidia_cuda_nvrtc_linux_x86_64.whl && cd nvrtc && chmod 755 libnvrtc* && find . -maxdepth 1 -type f -name "*libnvrtc.so.*" -exec sh -c 'ln -snf $(basename {}) libnvrtc.so' \; && mv -f libnvrtc* /opt/gstreamer/lib/x86_64-linux-gnu/ && cd /tmp && rm -rf /tmp/*
update-alternatives --set x-www-browser /usr/bin/firefox

# Install Ubuntu 22.04 specific packages
RUN if [ "${UBUNTU_RELEASE}"\> "20.04" ]; then apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y xcvt; fi && \
Expand All @@ -127,6 +125,9 @@ RUN chmod +x /tini
# Install GStreamer distribution
COPY --from=selkies-gstreamer /opt/gstreamer ./gstreamer

# Extract NVRTC dependency, https://developer.download.nvidia.com/compute/cuda/redist/cuda_nvrtc/LICENSE.txt
RUN cd /tmp && curl -fsSL -o nvidia_cuda_nvrtc_linux_x86_64.whl "https://developer.download.nvidia.com/compute/redist/nvidia-cuda-nvrtc/nvidia_cuda_nvrtc-11.0.221-cp36-cp36m-linux_x86_64.whl" && unzip -joq -d ./nvrtc nvidia_cuda_nvrtc_linux_x86_64.whl && cd nvrtc && chmod 755 libnvrtc* && find . -maxdepth 1 -type f -name "*libnvrtc.so.*" -exec sh -c 'ln -snf $(basename {}) libnvrtc.so' \; && mv -f libnvrtc* /opt/gstreamer/lib/x86_64-linux-gnu/ && cd /tmp && rm -rf /tmp/*

# Install web application
COPY --from=selkies-web /usr/share/nginx/html ./gst-web

Expand Down
2 changes: 2 additions & 0 deletions src/selkies_gstreamer/gstwebrtc_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,8 @@ def build_video_pipeline(self):
# encoder
x264enc = Gst.ElementFactory.make("x264enc", "x264enc")
x264enc.set_property("threads", 4)
x264enc.set_property("aud", False)
x264enc.set_property("b-adapt", False)
x264enc.set_property("bframes", 0)
x264enc.set_property("key-int-max", 0)
x264enc.set_property("byte-stream", True)
Expand Down

0 comments on commit d00ed43

Please sign in to comment.