Environment

Follow up

What does ldd motion give you? I.e., do libavformat.so and libavcodec.so get resolved (I guess not)?

Is the non-standard ffmpeg library folder (i.e., /dir/lib to go with your example) in /etc/ld.so.conf? Does it appear when you run ldconfig -v?

I would guess that putting the library folder in /etc/ld.so.conf and running ldconfig would do the trick. I don't know about RH, but in Gentoo you're not supposed to edit /etc/ld.so.conf directly, but should put files in /etc/env.d instead. Anyway, make sure your newly added library path occurs before any other path that includes an ffmpeg installation (e.g., one in /usr/local/lib).

Generally speaking, Motion does not handle multiple installations of FFMpeg very well, in particular if some are in the ordinary search paths (e.g., /usr/lib or /usr/local/lib) and others are in custom folders. This is, however, a problem with how runtime linking is performed in general and not something that we can blame Motion for. Why it worked for you in a previous version of Motion, I don't know.

A solution to the problem is to edit the makefile and hard-code the paths to libavformat.so and libavcodec.so (off the top of my head, something in line with -l/usr/local/lib/ffmpeg-custom/lib/libavformat.so, but this is neither very elegant nor very flexible. Plus it requires some clumsy additions to the configure script if we want it to happen automatically, if I recall correctly.

Thanks for the info. Using your instructions I found out that ldconfig was never in my path (it's in sbin in RH) thus it never ran correctly; My original cache must've been ok with the location of the previous version of ffmpeg.

After correcting this, ldconfig ran correctly and everthing worked ok with ffmpeg-0.4.9 and motion-3.2.2 .