fzwoch / obs-gstreamer

GStreamer OBS Studio plugin
GNU General Public License v2.0
346 stars 35 forks source link

check macOS pre-built library paths #18

Closed fzwoch closed 5 years ago

fzwoch commented 5 years ago

The macOS pre-built binary probably won't work out of the box. The reason is that it needs to be copied into Contents/Resources/bin/(?) of OBS.app or something like that but the rpath for locating libobs.dylib is not set.

fzwoch commented 5 years ago

Plugin install directory is: Applications/OBS.app/Contents/Resources/obs-plugins Libobs is here: Applications/OBS.app/Contents/Resources/bin/libobs.0.dylib

fzwoch commented 5 years ago
$ x86_64-apple-darwin15-otool -L Applications/OBS.app/Contents/Resources/obs-plugins/obs-ffmpeg.so 
Applications/OBS.app/Contents/Resources/obs-plugins/obs-ffmpeg.so:
    @rpath/libobs.0.dylib (compatibility version 0.0.0, current version 0.0.0)
    @rpath/libavcodec.58.dylib (compatibility version 58.0.0, current version 58.18.100)
    @rpath/libavfilter.7.dylib (compatibility version 7.0.0, current version 7.16.100)
    @rpath/libavdevice.58.dylib (compatibility version 58.0.0, current version 58.3.100)
    @rpath/libavutil.56.dylib (compatibility version 56.0.0, current version 56.14.100)
    @rpath/libswscale.5.dylib (compatibility version 5.0.0, current version 5.1.100)
    @rpath/libavformat.58.dylib (compatibility version 58.0.0, current version 58.12.100)
    @rpath/libswresample.3.dylib (compatibility version 3.0.0, current version 3.1.100)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.50.4)
fzwoch commented 5 years ago

Looks like we are fine. The rpath seems to work fine although it goes up and down the same directory once. The main lesson learned here is that the plugin requires the .so suffix to be picked up by OBS.