Jump to content

Shared object library not found for ffmpeg on 3.6.0.2


embytal

Recommended Posts

embytal

So that's interesting that you're able to successfully install but @@embytal is not.

 

To be precise the installation is successful in my case. The playback of anything fails. Continuing to troubleshoot now trying to identify useful information. Will report soon

  • Like 1
Link to comment
Share on other sites

embytal

@@embytal You can't just run the ffmpeg binary like that, our libraries are not in a standard directory so they won't be discovered unless you export LD_LIBRARY_PATH first. Of course the emby launcher script does that for you.

export LD_LIBRARY_PATH=/usr/local/opt/emby-server/bin

Are you able to manually run the ffmpeg binary after you do this?

 

 

When I try in my jail:

root@emby:/var/db/emby-server/logs # export LD_LIBRARY_PATH=/usr/local/opt/emby-server/bin
export: Command not found.

From the logs I have that:

018-08-31 16:17:42.784 Error App: Error in ffprobe
	*** Error Report ***
	Version: 3.6.0.31
	Command line: /usr/local/opt/emby-server/system/EmbyServer.exe -os freebsd -ffmpeg /usr/local/opt/emby-server/bin/ffmpeg -ffprobe /usr/local/opt/emby-server/bin/ffprobe -programdata /var/db/emby-server -updatepackage emby-server-freebsd_{version}_amd64.txz
	Operating system: Unix 11.2.2.0
	64-Bit OS: True
	64-Bit Process: True
	User Interactive: False
	Mono: 5.10.1.47 (5.10.1.47 Tue Aug 28 02:52:32 UTC 2018)
	Processor count: 16
	Program data path: /var/db/emby-server
	Application directory: /usr/local/opt/emby-server/system
	System.Exception: ffprobe failed for file:"/mnt/Media/Movies/mymovie.mkv" - streams and format are both null.
	  at Emby.Server.MediaEncoding.Encoder.MediaEncoder+<GetMediaInfoInternal>d__69.MoveNext () [0x001d4] in <c9e5e914e4a24f7982a3cf49bd11b489>:0
	--- End of stack trace from previous location where exception was thrown ---
	  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <d7767e54cb234318be4a1e7ddd12ca51>:0
	  at Emby.Server.MediaEncoding.Encoder.MediaEncoder+<GetMediaInfoInternal>d__69.MoveNext () [0x00369] in <c9e5e914e4a24f7982a3cf49bd11b489>:0
	--- End of stack trace from previous location where exception was thrown ---
	  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <d7767e54cb234318be4a1e7ddd12ca51>:0
	  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <d7767e54cb234318be4a1e7ddd12ca51>:0
	  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <d7767e54cb234318be4a1e7ddd12ca51>:0
	  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <d7767e54cb234318be4a1e7ddd12ca51>:0
	  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in <d7767e54cb234318be4a1e7ddd12ca51>:0
	  at MediaBrowser.Providers.MediaInfo.FFProbeVideoInfo+<ProbeVideo>d__16`1[T].MoveNext () [0x002a8] in <f91bd2b8525c4e678f52cc1e30b416e9>:0
	--- End of stack trace from previous location where exception was thrown ---
	  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <d7767e54cb234318be4a1e7ddd12ca51>:0
	  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <d7767e54cb234318be4a1e7ddd12ca51>:0
	  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <d7767e54cb234318be4a1e7ddd12ca51>:0
	  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <d7767e54cb234318be4a1e7ddd12ca51>:0
	  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in <d7767e54cb234318be4a1e7ddd12ca51>:0
	  at MediaBrowser.Providers.Manager.MetadataService`2+<RunCustomProvider>d__36[TItemType,TIdType].MoveNext () [0x000d9] in <f91bd2b8525c4e678f52cc1e30b416e9>:0
	System.Exception
	  at Emby.Server.MediaEncoding.Encoder.MediaEncoder+<GetMediaInfoInternal>d__69.MoveNext () [0x001d4] in <c9e5e914e4a24f7982a3cf49bd11b489>:0
	--- End of stack trace from previous location where exception was thrown ---
	  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <d7767e54cb234318be4a1e7ddd12ca51>:0
	  at Emby.Server.MediaEncoding.Encoder.MediaEncoder+<GetMediaInfoInternal>d__69.MoveNext () [0x00369] in <c9e5e914e4a24f7982a3cf49bd11b489>:0
	--- End of stack trace from previous location where exception was thrown ---
	  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <d7767e54cb234318be4a1e7ddd12ca51>:0
	  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <d7767e54cb234318be4a1e7ddd12ca51>:0
	  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <d7767e54cb234318be4a1e7ddd12ca51>:0
	  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <d7767e54cb234318be4a1e7ddd12ca51>:0
	  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in <d7767e54cb234318be4a1e7ddd12ca51>:0
	  at MediaBrowser.Providers.MediaInfo.FFProbeVideoInfo+<ProbeVideo>d__16`1[T].MoveNext () [0x002a8] in <f91bd2b8525c4e678f52cc1e30b416e9>:0
	--- End of stack trace from previous location where exception was thrown ---
	  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <d7767e54cb234318be4a1e7ddd12ca51>:0
	  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <d7767e54cb234318be4a1e7ddd12ca51>:0
	  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <d7767e54cb234318be4a1e7ddd12ca51>:0
	  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <d7767e54cb234318be4a1e7ddd12ca51>:0
	  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in <d7767e54cb234318be4a1e7ddd12ca51>:0
	  at MediaBrowser.Providers.Manager.MetadataService`2+<RunCustomProvider>d__36[TItemType,TIdType].MoveNext () [0x000d9] in <f91bd2b8525c4e678f52cc1e30b416e9>:0


And it keeps going on as the web player continues to try playing the movie but nothing works.

Link to comment
Share on other sites

alucryd

My bad, forgot that freebsd has csh as their default shell (the launcher script is using regular sh), the right command is:

setenv LD_LIBRARY_PATH /usr/local/opt/emby-server/lib

Running ffmpeg after that should tell us if it's an issue with ffmpeg or your files.

 

Does the emby user have read access to your files? Can you share one that is failing so we can know what kind of codecs are used inside?

Link to comment
Share on other sites

My bad, forgot that freebsd has csh as their default shell (the launcher script is using regular sh), the right command is:

setenv LD_LIBRARY_PATH /usr/local/opt/emby-server/lib

Running ffmpeg after that should tell us if it's an issue with ffmpeg or your files.

 

Does the emby user have read access to your files? Can you share one that is failing so we can know what kind of codecs are used inside?

 

Alright I think I found the issue !

 

Here is what I have:

root@emby:~ # setenv LD_LIBRARY_PATH /usr/local/opt/emby-server/lib

root@emby:~ # /usr/local/opt/emby-server/bin/ffmpeg
Shared object "libx264.so.152" not found, required by "libavcodec.so.58"

Checking the lib folder, it does not come with emby (which is expected)

root@emby:~ # ls -lai /usr/local/opt/emby-server/lib
total 10844
122187 drwxr-xr-x  2 root  wheel       32 Aug 30 23:55 .
122183 drwxr-xr-x  5 root  wheel        5 Aug 30 23:55 ..
122188 lrwxr-xr-x  1 root  wheel       18 Jul  9 10:53 libSkiaSharp.so -> libSkiaSharp.so.60
122189 lrwxr-xr-x  1 root  wheel       22 Jul  9 10:53 libSkiaSharp.so.60 -> libSkiaSharp.so.60.0.0
122190 -rw-r--r--  1 root  wheel  4486136 Jul  9 10:53 libSkiaSharp.so.60.0.0
122191 lrwxr-xr-x  1 root  wheel       23 Aug  3 11:54 libavcodec.so -> libavcodec.so.58.18.100
122192 lrwxr-xr-x  1 root  wheel       23 Aug  3 11:54 libavcodec.so.58 -> libavcodec.so.58.18.100
122193 -rw-r--r--  1 root  wheel  7832256 Aug  3 11:54 libavcodec.so.58.18.100
122194 lrwxr-xr-x  1 root  wheel       23 Aug  3 11:54 libavdevice.so -> libavdevice.so.58.3.100
122195 lrwxr-xr-x  1 root  wheel       23 Aug  3 11:54 libavdevice.so.58 -> libavdevice.so.58.3.100
122196 -rw-r--r--  1 root  wheel    73040 Aug  3 11:54 libavdevice.so.58.3.100
122197 lrwxr-xr-x  1 root  wheel       23 Aug  3 11:54 libavfilter.so -> libavfilter.so.7.16.100
122198 lrwxr-xr-x  1 root  wheel       23 Aug  3 11:54 libavfilter.so.7 -> libavfilter.so.7.16.100
122199 -rw-r--r--  1 root  wheel  2826856 Aug  3 11:54 libavfilter.so.7.16.100
122200 lrwxr-xr-x  1 root  wheel       24 Aug  3 11:54 libavformat.so -> libavformat.so.58.12.100
122201 lrwxr-xr-x  1 root  wheel       24 Aug  3 11:54 libavformat.so.58 -> libavformat.so.58.12.100
122202 -rw-r--r--  1 root  wheel  2494512 Aug  3 11:54 libavformat.so.58.12.100
122203 lrwxr-xr-x  1 root  wheel       22 Aug  3 11:54 libavutil.so -> libavutil.so.56.14.100
122204 lrwxr-xr-x  1 root  wheel       22 Aug  3 11:54 libavutil.so.56 -> libavutil.so.56.14.100
122205 -rw-r--r--  1 root  wheel   440304 Aug  3 11:54 libavutil.so.56.14.100
122206 lrwxr-xr-x  1 root  wheel       19 Jul 17 06:16 libmp3lame.so -> libmp3lame.so.0.0.0
122207 lrwxr-xr-x  1 root  wheel       19 Jul 17 06:16 libmp3lame.so.0 -> libmp3lame.so.0.0.0
122208 -rw-r--r--  1 root  wheel   264280 Jul 17 06:16 libmp3lame.so.0.0.0
122209 lrwxr-xr-x  1 root  wheel       23 Aug  3 11:54 libpostproc.so -> libpostproc.so.55.1.100
122210 lrwxr-xr-x  1 root  wheel       23 Aug  3 11:54 libpostproc.so.55 -> libpostproc.so.55.1.100
122211 -rw-r--r--  1 root  wheel   116688 Aug  3 11:54 libpostproc.so.55.1.100
122212 lrwxr-xr-x  1 root  wheel       24 Aug  3 11:54 libswresample.so -> libswresample.so.3.1.100
122213 lrwxr-xr-x  1 root  wheel       24 Aug  3 11:54 libswresample.so.3 -> libswresample.so.3.1.100
122214 -rw-r--r--  1 root  wheel   120784 Aug  3 11:54 libswresample.so.3.1.100
122215 lrwxr-xr-x  1 root  wheel       21 Aug  3 11:54 libswscale.so -> libswscale.so.5.1.100
122216 lrwxr-xr-x  1 root  wheel       21 Aug  3 11:54 libswscale.so.5 -> libswscale.so.5.1.100
122217 -rw-r--r--  1 root  wheel   538576 Aug  3 11:54 libswscale.so.5.1.100

I have the package installed as per the required list of packages:

root@emby:~ # pkg info -x x264
libx264-0.155.2917

And the more verbose output shows it:

root@emby:~ # pkg info libx264
libx264-0.155.2917
Name           : libx264
Version        : 0.155.2917
Installed on   : Thu Aug 30 23:54:42 2018 EDT
Origin         : multimedia/libx264
Architecture   : FreeBSD:11:amd64
Prefix         : /usr/local
Categories     : multimedia
Licenses       : GPLv2
Maintainer     : koobs@FreeBSD.org
WWW            : http://www.videolan.org/x264.html
Comment        : H.264/MPEG-4 AVC Video Encoding (Library)
Options        :
	ASM            : on
	DEBUG          : off
	GCC            : off
	OPENCL         : on
	PGO            : off
Shared Libs provided:
	libx264.so.155
Annotations    :
	FreeBSD_version: 1101001
	repo_type      : binary
	repository     : FreeBSD
Flat size      : 4.67MiB
Description    :
x264 is a free library for encoding H.264/AVC (aka MPEG-4 Part 10)
video streams.

Encoder features
 * CAVLC/CABAC
 * Multi-references
 * Intra: all modes (4x4 and 16x16 with all predictions)
 * Inter P: all partitions (from 16x16 down to 4x4)
 * Inter B: partitions from 16x16 down to 8x8 (including SKIP/DIRECT)
 * Ratecontrol: constant quantizer, constant bitrate, or multipass ABR
 * Scene cut detection

WWW: http://www.videolan.org/x264.html

It looks like your custom package has no link to the latest version of that lib.

I grab the required packages from FreeBSD latest packages and not quarterly.

 

The version from quarterly is 0.152.2854.

Recreating my jail on quarterly packages makes everything works so I can confirm in this version, I have the fix for ScheduleDirect pulling things down for my OTA guide and obviously there is no playback error anymore.

 

If you look at this libx264 package, there was an update on the 10th of August 2018 (which I hadn't checked before).

https://www.freshports.org/multimedia/libx264/

 

I would highly recommend you add a clear note on your FreeBSD instructions page for old timers like me who like being on the latest and greatest and may use the latest version of packages.

It might be good to keep track of the version of packages somewhere against the version of the package on your github.

 

I will continue validating Emby but it is very promising as Plex gave me the feeling of being boxed in their ecosystem.

 

 

Thank you all for your support.

Edited by embytal
  • Like 1
Link to comment
Share on other sites

But why does it cause a failure to not be on the very latest?

 

Because there seems to be a link to a precise x264 library version instead of a generic name that would have symlink to the latest version a bit like what you have currently for some embedded emby libs:

122191 lrwxr-xr-x  1 root  wheel       23 Aug  3 11:54 libavcodec.so -> libavcodec.so.58.18.100
122192 lrwxr-xr-x  1 root  wheel       23 Aug  3 11:54 libavcodec.so.58 -> libavcodec.so.58.18.100
122193 -rw-r--r--  1 root  wheel  7832256 Aug  3 11:54 libavcodec.so.58.18.100

So here ideally there should be a linked library to libx264.so and the necessary symlinks.

 

I am not the expert on this one, but it looks more like missing links somewhere rather than the version of that lib not working, until the linkage can be fixed and a formal test can be done.

Edited by embytal
Link to comment
Share on other sites

So you basically ran the dependency install command again, right?

 

Nope. I confirm there is a hard dependency on installing the quarterly packages for the BETA version to have the right library. 

 

The BETA version has a problem with playback which does not work at all on the latest version of libx264 and I do not know how to fix that.

 

I have a fresh jail based on quarterly packages instead of latest packages and Emby playback works fine.

 

In a few weeks from now, this BETA will not work when the version of libx264 will be distributed as version 155 instead of 152 when the next FreeBSD package update will happen for quarterly.

Link to comment
Share on other sites

So you didn't follow the install instructions?

 

Did you read my answer where I explained the problem I faced and recommend for somebody to modify the instructions to make sure it refers to use quarterly packages instead of latest (that's something that is configurable on FreeBSD)?

 

That is to make the beta work. That does not solve the problem I faced with the lib x264 v155 which does not seem to be linked properly.

Edited by embytal
Link to comment
Share on other sites

alucryd

@@embytal Wasn't aware freebsd had 2 release cycles, I installed my VM with default settings to build our ffmpeg.

 

@@Luke He can't follow our instructions to the letter because our ffmpeg is built against the libraries found in the quarterly release of freebsd, this release has older (and arguably more stable) versions of the libraries we link against so most of the time our current ffmpeg won't work with the latest release without dowgrading some packages.

Link to comment
Share on other sites

@@embytal Wasn't aware freebsd had 2 release cycles, I installed my VM with default settings to build our ffmpeg.

 

To be precise, it is not a release cycle as such but more a decision from the FreeBSD team to increase the stability by being on mature versions of packages. It is fairly recent though: https://www.freebsd.org/releases/10.2R/relnotes.html - point 12.1 all the way at the bottom of the page.

The main challenge with quarterly is that I don't believe there is a set date for releasing them while latest are generally coming on Wednesdays on a weekly basis.

 

So while quarterly is the new default, a lot of people want to work with latest version of packages, mainly from habit and are likely to pull latest instead of quarterly.

Link to comment
Share on other sites

What a mess. If I'm understanding that right, that means no matter what we choose there will be a group of users running into this.

Link to comment
Share on other sites

What a mess. If I'm understanding that right, that means no matter what we choose there will be a group of users running into this.

 

Not if there is a clear reference on Emby website of the required version of packages then it is on the users to get that right.

Link to comment
Share on other sites

sluggo45

Cross-referencing my post in the FreeNAS package thread: https://emby.media/community/index.php?/topic/60971-new-freenas-package-for-testing/page-7&do=findComment&comment=615883 - a temp fix, if you don't already know, is compile ffmpeg from the port with the correct options and change the Emby startup script paths to use it instead. Works. I was having the same issues as this thread though I originally discovered them because the Roku thumbs addon wasn't working.

Link to comment
Share on other sites

Well for now that works but it is looking extremely likely what we will soon be adding our own code changes to ffmpeg for new features and improvements. So we will need to be able to build our own.

 

So based on this, everyone's feedback will be helpful about whether we should build against freebsd latest or freebsd stable. Whichever one we choose, there will be one crowd of people having a problem so I guess we need to figure out which crowd will be larger.

Link to comment
Share on other sites

Well for now that works but it is looking extremely likely what we will soon be adding our own code changes to ffmpeg for new features and improvements. So we will need to be able to build our own.

 

So based on this, everyone's feedback will be helpful about whether we should build against freebsd latest or freebsd stable. Whichever one we choose, there will be one crowd of people having a problem so I guess we need to figure out which crowd will be larger.

 

Or you can clearly state in your documentation which version you put as a requirement.

 

If you want to know more about the schedule of port/package update on quarterly for FreeBSD you should look at this wiki: https://wiki.freebsd.org/Ports/QuarterlyBranch

 

This is the default in FreeBSD, you can decide for the stable release to be dependent on quarterly to keep the pace of update under control while your BETA version could be on latest. Regardless, I would modify the current page to make sure it states explicitly the recommended version of packages being used.

 

You are likely to people do the same as I did under FreeNAS through jails which uses the same base as FreeBSD.

 

Hope that helps.

Edited by embytal
Link to comment
Share on other sites

sluggo45

I agree, with the caveat that if the stable Emby train is on quarterly and the beta train requires latest things will get messy....documentation will help from a "RTFM" perspective I suppose :)

 

Users will be running Emby in a jail, most likely one dedicated to Emby. Requiring quarterly packages doesn't seem like a big stretch. Unless I am forgetting something, which package train you are on is jail-specific.

Edited by sluggo45
  • Like 1
Link to comment
Share on other sites

I think it's going to be the same for both. It will be easier on our build server as well as the testing process for both us and users.

Link to comment
Share on other sites

  • 1 month later...

A fresh freebsd 11.2 install following the instructions on the installation page both 3.5.3.0 and the BETA , can't play files . It throws ffmpeg errors mentioned in this thread. The install worked last week. Any easy fix ?   

Link to comment
Share on other sites

Make sure you have configured your freebsd environment to use stable packages and not latest. Thanks.

Link to comment
Share on other sites

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...