Open ja2142 opened 2 years ago
I took a closer look, and discovered three things:
Requesting loading native lib avutil.56
-> any version avutil is being loaded). Because major version might differ, there can be binary incompatibility - and that's exactly what's happening for me, resulting in a crash. That's something that can be easily fixed in velvet-video.libavutil.so.56
isntead of just avutil
) libs with correct major version are loaded. However because I also have libavutil.so.56 installed on my system, that results in a crash just like above. Why that happens I don't understand, I'd expect for any two versions with the same major version to be binary compatible, so maybe there's ffmpeg's fault?LD_LIBRARY_PATH
set to ~/.velvet-video/natives/0.2.8.full
the example is finally working. Why is modyfing environment variables necessary is unclear to me, I've raised an issue in jnr-ffi (https://github.com/jnr/jnr-ffi/issues/303).
I've tried to play back some audio based on AudioPlayback example, and on linux (manjaro, though I doubt that matters) I got crash in libavutil:
It seems like even though logs at the beginning say that libavutil.so.56 was loaded (from ~/.velvet-video), crash occured in libavutil.so.57.17.100. Looking at error report (hs_err_pid55483.log), it turns out that libavutil from my system was loaded: velvet is using
/usr/lib/libavutil.so.57.17.100
,/usr/lib/libswresample.so.4.3.100
,/usr/lib/libavcodec.so.59.18.100
and/usr/lib/libavformat.so.59.16.100
. Only lib that was actually loaded from ~/.velvet-video islibopenh264.so.5
, which I don't have installed.A weird thing from the error report is the fact that it seems like java tried to load the libs from ~/.velvet-video, but failed? Here are relevant lines:
I'd look into it some more, but at the moment I have pretty much no idea how java is handling native libraries.