shaka-project / static-ffmpeg-binaries

Static binaries of FFmpeg, for multiple OS & CPU combinations, built from source in a GitHub Actions workflow.
https://github.com/joeyparrish/static-ffmpeg-binaries/releases
Apache License 2.0
11 stars 9 forks source link

FFmpeg & FFprobe binarys segfault on Linux #28

Open mariocynicys opened 11 months ago

mariocynicys commented 11 months ago

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.

joeyparrish commented 11 months ago

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.

joeyparrish commented 11 months ago

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

mariocynicys commented 11 months ago

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 :/

joeyparrish commented 11 months ago

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.

mariocynicys commented 11 months ago

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.

joeyparrish commented 6 months ago

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.