livekit_egress | 2025-02-28T17:10:01.527Z I...
# ask-ai
m
livekit_egress | 2025-02-28T171001.527Z INFO egress redis/redis.go:142 connecting to redis deID": "NE_oQ5PDRQNfjdv", "handlerID": "EGH_h86cWYEw5mTY", "clusterID": "", "egressID": "EG_9eNU2SnUjNKm", "simple": true, "addr": "redis:6379"} livekit_egress | 00000.043109561 116 0x57072edefb30 WARN cudaloader gstcudaloader.c169gst_cuda_load_library: Could not open library libcuda.so.1, libcuda.so.1: cannot open shared object file: No such file or directory livekit_egress | 00000.043131231 116 0x57072edefb30 WARN nvcodec plugin.c94plugin_init: Failed to load cuda library livekit_egress | 2025-02-28T171001.582Z INFO egress source/web.go:150 xvfb: The XKEYBOARD keymap compiler (xkbcomp) reports: livekit_egress | > Warning: Could not resolve keysym XF86CameraAccessEnable livekit_egress | > Warning: Could not resolve keysym XF86CameraAccessDisable livekit_egress | > Warning: Could not resolve keysym XF86CameraAccessToggle livekit_egress | > Warning: Could not resolve keysym XF86NextElement livekit_egress | > Warning: Could not resolve keysym XF86PreviousElement livekit_egress | > Warning: Could not resolve keysym XF86AutopilotEngageToggle livekit_egress | > Warning: Could not resolve keysym XF86MarkWaypoint livekit_egress | > Warning: Could not resolve keysym XF86Sos livekit_egress | > Warning: Could not resolve keysym XF86NavChart livekit_egress | > Warning: Could not resolve keysym XF86FishingChart livekit_egress | > Warning: {"nodeID": "NE_oQ5PDRQNfjdv", "handlerID": "EGH_h86cWYEw5mTY", "clusterID": "", "egressID": "EG_9eNU2SnUjNKm"} livekit_egress | 2025-02-28T171001.582Z INFO egress source/web.go:150 xvfb: Could not resolve keysym XF86SingleRangeRadar livekit_egress | > Warning: Could not resolve keysym XF86DualRangeRadar livekit_egress | > Warning: Could not resolve keysym XF86RadarOverlay livekit_egress | > Warning: Could not resolve keysym XF86TraditionalSonar livekit_egress | > Warning: Could not resolve keysym XF86ClearvuSonar livekit_egress | > Warning: Could not resolve keysym XF86SidevuSonar livekit_egress | > Warning: Could not resolve keysym XF86NavInfo livekit_egress | {"nodeID": "NE_oQ5PDRQNfjdv", "handlerID": "EGH_h86cWYEw5mTY", "clusterID": "", "egressID": "EG_9eNU2SnUjNKm"} livekit_egress | 2025-02-28T171001.583Z INFO egress source/web.go:150 xvfb: Errors from xkbcomp are not fatal to the X server livekit_egress | {"nodeID": "NE_oQ5PDRQNfjdv", "handlerID": "EGH_h86cWYEw5mTY", "clusterID": "", "egressID": "EG_9eNU2SnUjNKm"} livekit_egress | 00000.254588637 116 0x57072edefb30 WARN default gstsfelement.c97gst_sf_create_audio_template_caps: format 0x120000: 'AVR (Audio Visual Research)' is not mapped livekit_egress | 00000.254608008 116 0x57072edefb30 WARN default gstsfelement.c97gst_sf_create_audio_template_caps: format 0x180000: 'CAF (Apple Core Audio File)' is not mapped livekit_egress | 00000.254611508 116 0x57072edefb30 WARN default gstsfelement.c97gst_sf_create_audio_template_caps: format 0x100000: 'HTK (HMM Tool Kit)' is not mapped livekit_egress | 00000.254615828 116 0x57072edefb30 WARN default gstsfelement.c97gst_sf_create_audio_template_caps: format 0xc0000: 'MAT4 (GNU Octave 2.0 / Matlab 4.2)' is not mapped livekit_egress | 00000.254618758 116 0x57072edefb30 WARN default gstsfelement.c97gst_sf_create_audio_template_caps: format 0xd0000: 'MAT5 (GNU Octave 2.1 / Matlab 5.0)' is not mapped livekit_egress | 00000.254623968 116 0x57072edefb30 WARN default gstsfelement.c97gst_sf_create_audio_template_caps: format 0x210000: 'MPC (Akai MPC 2k)' is not mapped livekit_egress | 00000.254626798 116 0x57072edefb30 WARN default gstsfelement.c97gst_sf_create_audio_template_caps: format 0x230000: 'MPEG-1/2 Audio' is not mapped livekit_egress | 00000.254630098 116 0x57072edefb30 WARN default gstsfelement.c97gst_sf_create_audio_template_caps: format 0xe0000: 'PVF (Portable Voice Format)' is not mapped livekit_egress | 00000.254633498 116 0x57072edefb30 WARN default gstsfelement.c97gst_sf_create_audio_template_caps: format 0x160000: 'SD2 (Sound Designer II)' is not mapped livekit_egress | 00000.254637788 116 0x57072edefb30 WARN default gstsfelement.c97gst_sf_create_audio_template_caps: format 0x190000: 'WVE (Psion Series 3)' is not mapped livekit_egress | livekit_egress | (egress:105): GLib-GObject-CRITICAL **: 171002.021: value "64000000" of type 'gint' is invalid or out of range for property 'bitrate' of type 'gint' my egress servıce gives this errors how to solve ? im runnıng lıvekıt servıce ın docker here ıs my agent Dockerfile and Docker-compose .yml : cat Dockerfile # syntax=docker/dockerfile:1 # Python version ARG PYTHON_VERSION=3.11-slim FROM python:${PYTHON_VERSION} # Python settings ENV PYTHONDONTWRITEBYTECODE=1 ENV PYTHONUNBUFFERED=1 # Add a non-root user ARG UID=10001 RUN adduser \ --disabled-password \ --gecos "" \ --home "/app" \ --shell "/sbin/nologin" \ --uid "${UID}" \ appuser # Install build dependencies RUN apt-get update && \ apt-get install -y gcc python3-dev ffmpeg && \ rm -rf /var/lib/apt/lists/* # Set working directory WORKDIR /app # Copy and install requirements first for better caching COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy all project files COPY . /app # Set proper ownership RUN chown -R appuser:appuser /app # Make .env.local readable if it exists RUN chmod 640 /app/.env.local || true # Switch to non-root user USER appuser # Default command CMD ["python", "agent.py", "start"] livekit-egress: image: livekit/egress:latest container_name: livekit_egress privileged: true environment: - EGRESS_CONFIG_FILE=/app/config.yaml volumes: - /home/ubuntu/livekit-docker/config.yaml/app/config.yamlro - /home/ubuntu/livekit-docker/egress_output:/app/output depends_on: livekit: condition: service_healthy redis: condition: service_healthy restart: always cap_add: - SYS_ADMIN logging: driver: "json-file" options: max-size: "50m" max-file: "5" compress: "true" healthcheck: test: ["CMD", "pgrep", "egress"] interval: 30s timeout: 10s retries: 3 start_period: 40s ulimits: nofile: soft: 65536 hard: 65536 oom_score_adj: -500 here ıs my config .yml for livekit-egress cat config.yaml # /home/ubuntu/livekit-docker/config.yaml api_key: "J8Q27GZ4T9H0X1S6A3WYF0E2L9U4DMBV" api_secret: "N7V1K4FWHQ3SZ9E2RTA8P0MCJ6BQLX0Y" ws_url: "ws://livekit:7880" # SSL yok, ws:// kullanıyoruz redis: address: redis:6379 username: default password: Y3v!n9L#f2@AFp$G1w^K8z*R log_level: debug # Detaylı loglar için s3: access_key: "AKIAX3B7KVP7IHFZAUHW" secret: "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" region: "eu-central-1" # AWS S3 için doğru bölge bucket: "asterisk-call-recordings" force_path_style: true # AWS dışı değil ama uyumluluk için ekledik endpoint: "" # AWS için boş bırakıyoruz, region kullanılıyor temp_dir: "/app/output" insecure: true # SSL olmadığı için ekledik this is my egress.yml cat egress.yaml # egress.yaml api_key: "J8Q27GZ4T9H0X1S6A3WYF0E2L9U4DMBV" api_secret: "N7V1K4FWHQ3SZ9E2RTA8P0MCJ6BQLX0Y" ws_url: "ws://livekit:7880" redis: address: redis:6379 username: default password: Y3v!n9L#f2@AFp$G1w^K8z*R log_level: debug @millions-hair-24956
g
It seems likely that the issues you're encountering with your LiveKit egress service are related to missing dependencies and configuration settings. The warnings about missing CUDA libraries and unmapped audio formats suggest that certain GStreamer plugins or libraries are not installed or configured correctly. Additionally, the error regarding the 'bitrate' property indicates a potential misconfiguration in your encoding settings. 1. CUDA Libraries: The warning about
libcuda.so.1
suggests that the CUDA library is not installed. If you are not using GPU acceleration, you can ignore this warning. Otherwise, ensure that the necessary CUDA libraries are installed on your system. 2. GStreamer Plugins: The warnings about unmapped audio formats indicate that some GStreamer plugins might be missing. Ensure that all required GStreamer plugins are installed. You can refer to the GStreamer configuration guide for more details on the necessary plugins. 3. Xvfb Warnings: The warnings related to
xkbcomp
are not fatal and can typically be ignored unless they are causing functional issues. 4. Bitrate Error: The error regarding the 'bitrate' property being out of range suggests that the bitrate value in your configuration might be incorrect. Check your encoding settings to ensure that the bitrate is set within a valid range. Would you like more detailed guidance on any specific part of the setup or configuration? Sources: - GStreamer configuration guide 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.
m
how to handle these ınsıde docker ? my livekit egress ınsıde docker. @millions-hair-24956
g
To handle these issues inside Docker, you need to ensure that your Docker container has all the necessary dependencies and configurations. Here are some steps you can take: 1. Install Required Libraries: Ensure that your Dockerfile includes the installation of all necessary libraries and plugins. For GStreamer, you might need to install additional plugins. You can add the following to your Dockerfile:
Copy code
RUN apt-get update && \
       apt-get install -y gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav
2. CUDA Libraries: If you need CUDA support, ensure that your Docker container is set up to use NVIDIA's CUDA libraries. You can use NVIDIA's Docker images or install CUDA libraries manually. If CUDA is not needed, you can ignore the warnings. 3. Xvfb Configuration: The warnings from
xkbcomp
are not critical, but if you need to resolve them, ensure that
xvfb
is properly configured in your Docker container. You can install it with:
Copy code
RUN apt-get install -y xvfb
4. Bitrate Configuration: Check your application code or configuration files to ensure that the bitrate is set correctly. If you are setting the bitrate programmatically, ensure it is within the valid range for your encoder. 5. Docker Compose Configuration: Ensure your
docker-compose.yml
is correctly set up to handle dependencies and environment variables. Make sure the
EGRESS_CONFIG_FILE
environment variable points to the correct configuration file. Would you like more detailed guidance on any specific part of the setup or configuration? Sources: - https://docs.livekit.io/home/self-hosting/egress/ - https://livekit-users.slack.com/archives/C025KM0S1CK/p1732276719.309549 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.
m
how can i it to my docker fıle dependencies ? livekit-egress has no Dockerfile
how can i it to my docker fıle dependencies ? livekit-egress has no Dockerfile @millions-hair-24956
g
It seems likely that you want to add dependencies to a Dockerfile for a service that uses LiveKit egress. Since LiveKit egress itself doesn't have a Dockerfile, you can create a custom Dockerfile for your service that includes the necessary dependencies. Here's a basic example of how you can set up a Dockerfile to include GStreamer plugins and other dependencies:
Copy code
# Use a base image with Python
FROM python:3.11-slim

# Set environment variables
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1

# Install system dependencies
RUN apt-get update && \
    apt-get install -y --no-install-recommends \
    gcc \
    python3-dev \
    ffmpeg \
    gstreamer1.0-plugins-base \
    gstreamer1.0-plugins-good \
    gstreamer1.0-plugins-bad \
    gstreamer1.0-plugins-ugly \
    gstreamer1.0-libav \
    xvfb && \
    rm -rf /var/lib/apt/lists/*

# Add a non-root user
ARG UID=10001
RUN adduser \
    --disabled-password \
    --gecos "" \
    --home "/app" \
    --shell "/sbin/nologin" \
    --uid "${UID}" \
    appuser

# Set working directory
WORKDIR /app

# Copy and install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Copy the rest of the application code
COPY . /app

# Set proper ownership
RUN chown -R appuser:appuser /app

# Switch to non-root user
USER appuser

# Default command
CMD ["python", "agent.py", "start"]
This Dockerfile sets up a Python environment with the necessary GStreamer plugins and other dependencies. You can adjust the
requirements.txt
and other parts of the Dockerfile to fit your specific application needs. Would you like more detailed guidance on any specific part of the setup or configuration? Sources: - https://livekit-users.slack.com/archives/C025KM0S1CK/p1732276719.309549 - https://livekit-users.slack.com/archives/C048FRL1N2C/p1728887410.202539 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.
m
thıs ıs for agents or lıvekıt egress ? @millions-hair-24956
g
If you're looking for further help, please follow-up on one of the other channels available for community support!