I have been running cefsrc in docker for a while now. Everything was fine until recently I updated docker images and it segfaults :( I assume issue is in this repo or https://github.com/restreamio/docker-gstreamer not sure.
Command to test
Xvfb :0 -screen 0 1920x1080x24 &
export GST_DEBUG=5
export GST_PLUGIN_PATH=/usr/cef:$GST_PLUGIN_PATH
export DISPLAY=:0
gst-launch-1.0 -e cefsrc url=https://soundcloud.com/platform/sama num-buffers=135000 gpu=false do-timestamp=true log-severity=1 ! \
video/x-raw,width=1920,height=1080,framerate=50/1 ! cefdemux name=demux ! \
queue max-size-bytes=4294967295 max-size-buffers=5000 max-size-time=18446744073709551615 ! \
videoconvert ! x264enc ! mp4mux ! filesink location=output.mp4
ARG GST_PLUGINS_RS_TAG=main
FROM catthehacker/ubuntu:rust-22.04 as builder
# https://ryandaniels.ca/blog/docker-dockerfile-arg-from-arg-trouble/
ARG GST_PLUGINS_RS_TAG
WORKDIR /usr/src/gst-plugins-rs
ENV DEST_DIR /opt/gst-plugins-rs
ENV CARGO_PROFILE_RELEASE_DEBUG false
RUN apt update \
&& apt install -yq --no-install-recommends \
libgstreamer-plugins-base1.0-dev \
libgstreamer1.0-dev \
libcsound64-dev \
libclang-11-dev \
libpango1.0-dev \
libdav1d-dev
# libgtk-4-dev # Only in bookworm
RUN git clone -c advice.detachedHead=false \
--branch ${GST_PLUGINS_RS_TAG} \
--single-branch https://github.com/sdroege/gst-plugin-rs \
/usr/src/gst-plugins-rs
RUN export CSOUND_LIB_DIR="/usr/lib/$(uname -m)-linux-gnu" && \
export PLUGINS_DIR=$(pkg-config --variable=pluginsdir gstreamer-1.0) && \
export SO_SUFFIX=so && \
cargo build --release \
--package gst-plugin-png \
&& \
install -v -d ${DEST_DIR}/${PLUGINS_DIR} && \
install -v -m 755 target/release/*.${SO_SUFFIX} ${DEST_DIR}${PLUGINS_DIR}
from restreamio/gstreamer:x86_64-latest-prod
COPY --from=builder /opt/gst-plugins-rs/ /
WORKDIR /usr/recorder
RUN apt update && \
apt install -yq --no-install-recommends curl xvfb && \
curl -s https://deb.nodesource.com/setup_16.x | bash && \
apt-get install -y nodejs
ENV CEFSRC_PLUGIN_DIR /usr/cef
COPY . .
CMD ./run.sh
#!/bin/bash
export DISPLAY=:0
while :
do
Xvfb :0 -screen 0 1920x1080x24
echo "Xvfb has Crashed"
sleep 1
done &
npm start
Debug log
0:00:00.561307153 12 0x55eee5cffb00 INFO cefsrc gstcefsrc.cc:713:run_cef: Initializing CEF
[0505/140854.168528:VERBOSE1:cdm_registration.cc(189)] Widevine enabled but no library found
[0505/140854.168530:VERBOSE1:cdm_registration.cc(189)] Widevine enabled but no library found
[0505/140854.168578:INFO:cpu_info.cc(53)] Available number of cores: 32
[0505/140854.168582:INFO:cpu_info.cc(53)] Available number of cores: 32
[0505/140854.168588:VERBOSE1:zygote_main_linux.cc(218)] ZygoteMain: initializing 0 fork delegates
[0505/140854.168586:VERBOSE1:zygote_main_linux.cc(218)] ZygoteMain: initializing 0 fork delegates
[0505/140854.172348:VERBOSE1:pref_proxy_config_tracker_impl.cc(187)] 0x7f8a08019d40: set chrome proxy config service to 0x7f8a08050180
[0505/140854.172524:VERBOSE1:cdm_registration.cc(189)] Widevine enabled but no library found
[0505/140854.173899:VERBOSE1:pulse_util.cc(236)] Failed to connect to the context. Error: Connection refused
[0505/140854.173916:WARNING:audio_manager_linux.cc(60)] Falling back to ALSA for audio output. PulseAudio is not available or could not be initialized.
[0505/140854.173955:VERBOSE1:webrtc_internals.cc(120)] Could not get the download directory.
[0505/140854.174124:VERBOSE1:media_stream_manager.cc(1065)] MSM::InitializeMaybeAsync([this=0x7f8a08003990])
[0505/140854.174137:VERBOSE1:media_stream_manager.cc(1065)] MDM::MediaDevicesManager()
[0505/140854.174140:VERBOSE1:media_stream_manager.cc(1065)] MSM::MediaStreamManager([this=0x7f8a08003990]))
[0505/140854.175577:VERBOSE1:first_party_sets_handler_impl.cc(432)] Empty path. Failed loading serialized First-Party Sets file.
[0505/140854.175579:VERBOSE1:component_installer.cc(285)] StartRegistration for Widevine Content Decryption Module
[0505/140854.175800:VERBOSE1:component_installer.cc(441)] FinishRegistration for Widevine Content Decryption Module
[0505/140854.175815:VERBOSE1:component_updater_service.cc(131)] CrxUpdateService starting up. First update attempt will take place in 60 seconds. Next update attempt will take place in 18000 seconds.
[0505/140854.177038:VERBOSE1:key_storage_util_linux.cc(54)] Password storage detected desktop environment: (unknown)
[0505/140854.177062:VERBOSE1:key_storage_linux.cc(123)] Selected backend for OSCrypt: BASIC_TEXT
[0505/140854.177068:VERBOSE1:key_storage_linux.cc(143)] OSCrypt did not initialize a backend.
[0505/140854.177137:VERBOSE1:pref_proxy_config_tracker_impl.cc(187)] 0x7f8a081748f0: set chrome proxy config service to 0x7f8a0816ea90
libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
[0100/000000.180773:VERBOSE1:vaapi_wrapper.cc(844)] InitializeVaDriver_Locked(): vaInitialize failed: unknown libva error
Segmentation fault (core dumped)
root@1937c1edc00c:/usr/recorder# [0100/000000.453051:WARNING:sandbox_linux.cc(380)] InitializeSandbox() called with multiple threads in process gpu-process.
I have been running cefsrc in docker for a while now. Everything was fine until recently I updated docker images and it segfaults :( I assume issue is in this repo or https://github.com/restreamio/docker-gstreamer not sure.
Command to test
Debug log