Building openwrt with h264 support enabled in ffmpeg

Hello everyone. I have some problem because Im trying to build openwrt for my DWR-118 with enabled libx264 ald enabled h264 encoding in ffmpeg. Im trying to do it by check h264 demuxer in make menuconfig > libraries > libffmpeg-custom but when i additionally check ffmpeg in multimedia it is enabling libffmpeg-full and I cannot disable it because it is locked (-*-). Then when Im trying build it Im getting few errors like this:

* check_data_file_clashes: Package libffmpeg-custom wants to install file /home/epcadmin/git_dwr118/openwrt/build_dir/target-mipsel_24kc_musl/root-ramips/usr/lib/libavcodec.so.57
        But that file is already provided by package  * libffmpeg-full

Then I`ve changed feeds/packages/multimedia/ffmpeg/Makefile,

linie DEPENDS+= +libffmpeg-full
to DEPENDS+= +libffmpeg-custom
rm tmp
make menuconfig

and then I`m getting:

Package libffmpeg-custom is missing dependencies for the following libraries:

libasound.so.2
libavfilter.so.6
libswresample.so.2

Then I tried to add to DEPENDS asa-lib, libavfilter and libswresample in ffmpeg Makefile:

but I got same error.

Can anyone help me ?

Is there simpler way to get h264 encoding working in ffmpeg ?

As you've found, the build system isn't "happy" about trying to install a file from one package over that of another file.

One approach would be to replicate ffmpeg into ffmpeg-custom or the like, much as you've done for the library itself, changing the dependencies as appropriate to your "custom" version(s).

I'm going to assume that you've never tried to use x264 with ffmpeg before, anything less than ~768Mbyte of RAM will for sure give you out of memory errors even without any "crazy" settings. So in short, forget it. It's never going to work, you can probably get away with remuxing but that's about it.

Im not going to stream anything. I need to save h264 RTSP stream to pendriva, thats all. Do you think its too much?

If, as you say, you just want to capture an rtsp stream to disk then this should do:

$ ffmpeg -i rtsp://<rtsp source uri> -acodec copy -vcodec copy <output-path>

No need for libx264 if not decoding.

If, as you say, you just want to capture an rtsp stream to disk then this should do:

$ ffmpeg -i rtsp://<rtsp source uri> -acodec copy -vcodec copy <output-path>

No need for libx264 if not decoding.

Its not true becasue without h264 I have that there is no codec. With custom firmware I dont have that error and its working, cpu 10%, memry 50% free during job.

You probably need (I'm 99.9% sure) ability and decode h264 and demux which ffmpeg can handle on its own (if selected), you don't need libx264 if you're not going transcode or encode.

Hello, pikwas!
Tell me please did you solve your problem? I'm trying to capture rtsp-stream from ip-camera like you and have the same problems. My topic is here.