FFmpeg & FFprobe binarys segfault on Linux
Opened this issue · 6 comments
System information:
OS: Arch Linux x86_64
Kernel: 6.4.3-arch1-1
The output of running ffprobe on vid.mp4
:
$ /home/mario/.local/share/virtualenvs/shaka-F3LkE8tS/lib/python3.11/site-packages/streamer_binaries/ffprobe-linux-x64 vid.mp4
ffprobe version n4.4 Copyright (c) 2007-2021 the FFmpeg developers
built with gcc 9 (Ubuntu 9.3.0-17ubuntu1~20.04)
configuration: --pkg-config-flags=--static --disable-ffplay --enable-libvpx --enable-libaom --enable-libx264 --enable-libx265 --enable-libmp3lame --enable-libopus --enable-mbedtls --enable-runtime-cpudetect --enable-gpl --enable-version3 --enable-static --enable-nvenc --enable-vdpau
libavutil 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
libpostproc 55. 9.100 / 55. 9.100
zsh: segmentation fault (core dumped) vid.mp4
Tried multiple other videos and facing the same issue.
I am making a lot of changes right now to the build and configs. I'll ask you to try again as soon as I have these changes merged.
Please try the binaries from this workflow run and let me know if the issue is resolved for you:
https://github.com/shaka-project/static-ffmpeg-binaries/actions/runs/6340785810
Please try the binaries from this workflow run and let me know if the issue is resolved for you:
shaka-project/static-ffmpeg-binaries/actions/runs/6340785810
Still segfaulting on my Arch system, but tried them on Ubuntu and they worked :/
I wonder what the incompatibility is...
I have seen an alternative to true static binaries, which we could try. We could bundle dynamic libraries with the executable, and use a script that sets the loader path to make sure those get used. This would be similar to what we do on Windows and macOS, except in those cases, the OS has stable libraries we can count on. Different Linux distributions can do things very differently.
I wonder what the incompatibility is...
It's probably some FFmpeg bug or a problem with one of the features we enable. I need to re-compile with different configurations to see where the issue comes from.
We've recently discovered that compiling against musl instead of glibc fixes the issue. Our latest Shaka Packager release (v3.0.0) is fully static on Linux. The same could work here.