What I choose for motion - Libraries -> libffmpeg or Multimedia -> ffmpeg?

Hello, friendly people!
I use

make menuconfig

to setup my version of OpenWRT with support of motion package which support ffmpeg (I need H.265 and H.264 for my IP-camera) but I found that there are two ffmpeg in OpenWRT
One is Libraries->libffmpeg (I am not sure if motion can recognize that it must work with this library)
Second is Multimedia -> ffmpeg
Which one do I choose?
I know that I also must confugure custom option for motion to support ffmpeg.

Thank you!

As I don’t use these I can’t say one way or the other, but have you used Search (/) and Help (?) within menuconfig to figure out how these packages interact?

libffmpeg provides ffmpeg functionality to applications, ffmpeg is one of those applications.

So, I must enable both libffmpeg and ffpmeg? It sounds a bit weird. May be it is enough for motion if I enable just libffmpeg?
I guess in addition to libffmeg-custom I just enable ffmpeg-custom in Multimedia, there will be no harm out of it. I hope.

I did try but Help just shows package configuration text, as it described in .config file literally

I've never played with libffmpeg or motion, but when I needed RTSP capabilities in ffmpeg, I simply enabled them in .config for ffmpeg.

Thank you. I just misunderstand, if I also need to enable Multimedia -> ffmpeg in addition to Multimedia -> ffmpeg-custom. May be this package has hierarchial structire and first I must enable ffmpeg as some kind of declaration for packhage precense, then ffmpeg-custom which provide details for package setup...