Jump to content

ffmpeg issues on Linux


Recommended Posts

Posted

I've been running 4.9.1.80 on RHEL 10 for a while now.  Everything seems to be just fine.  But I did notice errors starting to appear in dmesg like these:

[ 2293.684582] ffmpeg[16023]: segfault at 18 ip 00007f7e88fdf35e sp 00007ffe5bdd6fc0 error 4 in libavcodec.so.59.37.100[5df35e,7f7e88a00000+18fc000] likely on CPU 4 (core 0, socket 0)
[ 2293.684593] Code: 8b 0f 1f 00 41 c7 87 3c 07 00 00 01 00 00 00 49 8b 87 08 02 00 00 49 39 87 f0 01 00 00 0f 8d a3 fc ff ff 49 8b 87 e0 01 00 00 <48> 8b 40 18 49 2b 87 18 02 00 00 48 83 bb d8 01 00 00 00 49 89 87
[ 2296.813831] ffmpeg[16101]: segfault at 18 ip 00007f6c1dbdf35e sp 00007ffe521dc180 error 4 in libavcodec.so.59.37.100[5df35e,7f6c1d600000+18fc000] likely on CPU 4 (core 0, socket 0)
[ 2296.813841] Code: 8b 0f 1f 00 41 c7 87 3c 07 00 00 01 00 00 00 49 8b 87 08 02 00 00 49 39 87 f0 01 00 00 0f 8d a3 fc ff ff 49 8b 87 e0 01 00 00 <48> 8b 40 18 49 2b 87 18 02 00 00 48 83 bb d8 01 00 00 00 49 89 87
[ 2299.255499] ffmpeg[16141]: segfault at 18 ip 00007fb6d33df35e sp 00007ffc0a8e87e0 error 4 in libavcodec.so.59.37.100[5df35e,7fb6d2e00000+18fc000] likely on CPU 3 (core 3, socket 0)
 

In /var/lib/emby/logs I see lots of logs like these:
-rw-r--r--. 1 emby emby    17723 Oct 31 12:24 ffmpeg-transcode-f775ccdd-0b71-4a26-b7be-fe104315af85_1.txt
-rw-r--r--. 1 emby emby    17731 Oct 31 12:24 ffmpeg-transcode-f8c23b31-2256-4323-981f-39082c8000a8_1.txt
-rw-r--r--. 1 emby emby    17731 Oct 31 12:33 ffmpeg-transcode-f9041e3b-21a7-4a92-92f4-56bf429b4fc6_1.txt
-rw-r--r--. 1 emby emby    17723 Oct 31 12:32 ffmpeg-transcode-f9ff16e3-f738-42bd-9f41-2dc16eafe3d2_1.txt
 

Containing

 

12:32:16.495 ffmpeg version 5.1-emby_2023_06_25_p4 Copyright (c) 2000-2022 the FFmpeg developers and softworkz for Emby LLC
12:32:16.495   built with gcc 10.3.0 (crosstool-NG 1.25.0)
12:32:16.495 Execution Date: 2025-10-31 12:32:16
12:32:16.496 Censored.mkv: Input/output error
12:32:16.496 EXIT
 

The system versions seem to be fine:

root@stargate:/var/lib/emby/logs# ffmpeg -version | head -1
ffmpeg version 7.1.2 Copyright (c) 2000-2025 the FFmpeg developers
root@stargate:/var/lib/emby/logs# ffprobe -version | head -1
ffprobe version 7.1.2 Copyright (c) 2007-2025 the FFmpeg developers
 

root@stargate:~# sudo -u emby /opt/emby-server/bin/ffmpeg -version
/opt/emby-server/bin/ffmpeg: error while loading shared libraries: libavdevice.so.59: cannot open shared object file: No such file or directory
root@stargate:~# sudo -u emby env LD_LIBRARY_PATH=/opt/emby-server/lib /opt/emby-server/bin/ffmpeg -version
/opt/emby-server/bin/ffmpeg: error while loading shared libraries: libmfx.so.1: cannot open shared object file: No such file or directory
root@stargate:~# systemctl cat emby-server | grep LD_LIBRARY
root@stargate:~# 
 

root@stargate:~# sudo -u emby env LD_LIBRARY_PATH=/opt/emby-server/lib:/opt/emby-server/extra/lib /opt/emby-server/bin/ffmpeg -version
ffmpeg version 5.1-emby_2023_06_25_p4 Copyright (c) 2000-2022 the FFmpeg developers and softworkz for Emby LLC
built with gcc 10.3.0 (crosstool-NG 1.25.0)
configuration: --cc=x86_64-emby-linux-gnu-gcc --prefix=/home/embybuilder/Buildbot/x64/ffmpeg-x64/staging --disable-alsa --disable-doc --disable-ffplay --disable-gnutls --disable-libpulse --disable-librtmp --disable-libxcb --disable-openssl --disable-vdpau --disable-vulkan --disable-xlib --enable-chromaprint --enable-fontconfig --enable-gpl --enable-iconv --enable-libaribb24 --enable-libass --enable-libdav1d --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libzvbi --enable-mbedtls --enable-pic --enable-version3 --enable-libtesseract --enable-cuda-llvm --enable-cuvid --enable-libdrm --enable-libmfx --enable-nvdec --enable-nvenc --enable-vaapi --enable-opencl --enable-cross-compile --cross-prefix=x86_64-emby-linux-gnu- --arch=x86_64 --target-os=linux --enable-shared --disable-static --pkg-config=pkg-config --pkg-config-flags=--static --extra-libs='-ldl -lm -lstdc++ -lsharpyuv -pthread' --disable-debug
libavutil      57. 28.100 / 57. 28.100
libavcodec     59. 37.100 / 59. 37.100
libavformat    59. 27.100 / 59. 27.100
libavdevice    59.  7.100 / 59.  7.100
libavfilter     8. 44.100 /  8. 44.100
libswscale      6.  7.100 /  6.  7.100
libswresample   4.  7.100 /  4.  7.100
libpostproc    56.  6.100 / 56.  6.100
EXIT

Is it safe to switch to the newer versions of ffmpeg included on the system?   Should LD_LIBRARY_PATH be set in the systemd .service file?  Or is this library issue a red herring as the crash seems to happen inside libavcodec (seen in dmesg)?

 

Regards,

Rikki

Posted

Hi there, please attach the complete emby server and ffmpeg log files. Thanks.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...