Building OpenWRT but error happen with ffmpeg-audio-dec and libavfilter

Hello. I have next error:

cp: can not stat '/home/ladmin/openwrt/build_dir/target-x86_64_musl/ffmpeg-audio-dec_6.1.2/ipkg-install/usr/lib/libavfilter.so.*': No such file or directory
cp: can not stat '/home/ladmin/openwrt/build_dir/target-x86_64_musl/ffmpeg-audio-dec_6.1.2/ipkg-install/usr/lib/libswresample.so.*': No such file or directory

I must say that I have already run building process several times and all was OK. May be there are some outdated temp files or something like that? Would be appreciated for any help. Thank you.

Need I update scripts and feeds may be?

scripts/feeds update -a
scripts/feeds install -a

or clean building environment from previous biulds, like

make clean

I would not want to do last command because it delete my .config file, I believe.

make clean will not remove your .config. See: https://openwrt.org/docs/guide-developer/toolchain/use-buildsystem#cleaning_up

If you are building from the development branch you should regularly update your sources with: git pull followed by update/install feeds.

The build environment can sometimes be recovered by uninstalling and reinstalling the failing package.

Many thanks. Can you kindly help me to understand how to do this? I will try to

git pull

now and I hope it will solve the problem

UPD: After all listed above manupulations I checked specified directory where files libavfilter.so and libswresample.so must be, but there are no these files. Maybe I can download them from some reliable source and just put in this directory?

Or may be they just stored in some other location?

UPD2: OMG. I have found that this error is unresolverd since version 22.03 ffmpeg: Build with `ffmpeg-custom` fails for me with missing `libavfilter.so.*` and `ibswresample.so.*`, in 22.03. · Issue #19036 · openwrt/packages

did you modify the Makefile?

1 Like

No. I never edit Makefile

It is happen that I now have conflict between libffmpeg-custom and ffmpeg-full and I can not deselect ffmpeg-full because it is a dependency for motion-ffmpeg! Which would be no problem, but ffmpeg-full is compiled without h264 support no matter if I enable “Paid Functionality” or not.

Situation is that the only package which motion-ffmpeg supports in ffmpeg-full, and ffmpeg-full can not be compiled with support of H264 and H265, as I understand. Even if I open ffmpeg-full makefile there are no options to include support for theese codecs. I believe it is because makefile is generated by make menuconfig and not supposed to be edited manually, is it?

have you seen this?

if i have time i will try to build ffmpeg with x265

root@OpenWrt:~# x265 -V
x265 [info]: HEVC encoder version 4.1+1-1d117be
x265 [info]: build info [Linux][GCC 13.3.0][64 bit] 8bit+10bit+12bit
x265 [info]: using cpu capabilities: NEON
root@OpenWrt:~# x265 -V -D10
x265 [info]: HEVC encoder version 4.1+1-1d117be
x265 [info]: build info [Linux][GCC 13.3.0][64 bit] 10bit
x265 [info]: using cpu capabilities: NEON
root@OpenWrt:~# x265 -V -D12
x265 [info]: HEVC encoder version 4.1+1-1d117be
x265 [info]: build info [Linux][GCC 13.3.0][64 bit] 12bit
x265 [info]: using cpu capabilities: NEON
root@OpenWrt:~# x265 -V -D8
x265 [info]: HEVC encoder version 4.1+1-1d117be
x265 [info]: build info [Linux][GCC 13.3.0][64 bit] 8bit+10bit+12bit
x265 [info]: using cpu capabilities: NEON
root@OpenWrt:~#
1 Like

OMG, I did not notice that option. I never thought that compile for x86 may be broken for x86, lol. Thank you. May be I’d better concentrate on building libffmpeg-custom and edit motion-ffmpeg config so that it would use not ffmpeg-full (which is also do not work with x264) but libffmpeg-custom instead?

P.S. As far as I understand simply editing makefile is no longer an option since it is generated automatically. So I need to edit makefile.am before I start building process via make command?

UPD: It was no problem to build libffmpeg-custom with h264 and hevc support, after I disabled motion-ffmpeg and ffmpeg-full as its dependence. At least building process end up with no errors. Now the only problem left is to manually configure motion-ffmpeg to use libffmpeg-custom instead of ffmpeg-full, I believe.

I guess I must enable motion but copy makefile from motion-ffmpeg to motion’s building directory? I am not quite sure how building process works, can some kind sir clarify it for me? After finishing make menuconfig there is no autoconfig performed? I mean when I execute make command, it only takes info from makefile, not from makefile.am or makefile.in?

1 Like

I prefer to create and update the ffmpeg Makefile to make it easier to add things