Hardware video transcoding with FFMEG

I’ve received my board and found an SD card. I managed to upgrade SPL and U-Boot in order to run the minimal version of Image-69. All good so far.

I noticed that in the release notes for 2.4.4

  • Support FFmpeg using h264_omx/hevc_omx hard decoding/encoding plug-in;

However, I can’t seem to get it to work. I’ve tried the following command
ffmpeg -i /dev/video4 -c:v h264_omx test.mp4

Which gives the error:

[h264_omx @ 0x2ab59a8950] libOMX_Core.so not found
[h264_omx @ 0x2ab59a8950] libOmxCore.so not found

The only solution that I can find through google, is to install the libomxil-bellagio-dev package which I’ve done but it doesn’t help. /dev/video4 is a USB webcam, however, I’ve tried it with a video file on the SD card and it makes no difference.

Any help would be greatly appreciated.

Thanks, Nick


There are reports in other threads that starfive did change some PATHS in the image so stuff is not where it should be or looked for by the system.

I would do the following:

Find the libOMX_Core.so and libOmxCore.so in your system. Add that PATH to the PATH variable of your Terminal. Then this should be found.

You can also try:

LD_LIBRARY_PATH=/usr/local/lib ldd ./app

This will give you some output. Please post it here.


1 Like

I searched the entire SD card for libOMX_Core.so and libOmxCore.so neither of them appear to exist. I’ve also tried googling to see if there is a Debian package that contains them and couldn’t find anything.

Here is the output of ldd

root@starfive:~# LD_LIBRARY_PATH=/usr/local/lib ldd /usr/bin/ffmpeg
	linux-vdso.so.1 (0x0000003fa54c7000)
	libavdevice.so.58 => /usr/lib/riscv64-linux-gnu/libavdevice.so.58 (0x0000003fa5452000)
	libavfilter.so.7 => /usr/lib/riscv64-linux-gnu/libavfilter.so.7 (0x0000003fa50df000)
	libavformat.so.58 => /usr/lib/riscv64-linux-gnu/libavformat.so.58 (0x0000003fa4ec6000)
	libavcodec.so.58 => /usr/lib/riscv64-linux-gnu/libavcodec.so.58 (0x0000003fa3d89000)
	libpostproc.so.55 => /usr/lib/riscv64-linux-gnu/libpostproc.so.55 (0x0000003fa3d7c000)
	libswresample.so.3 => /usr/lib/riscv64-linux-gnu/libswresample.so.3 (0x0000003fa3d67000)
	libswscale.so.5 => /usr/lib/riscv64-linux-gnu/libswscale.so.5 (0x0000003fa3cf4000)
	libavutil.so.56 => /usr/lib/riscv64-linux-gnu/libavutil.so.56 (0x0000003fa3a58000)
	libm.so.6 => /lib/riscv64-linux-gnu/libm.so.6 (0x0000003fa39d4000)
	libpthread.so.0 => /lib/riscv64-linux-gnu/libpthread.so.0 (0x0000003fa39ba000)
	libc.so.6 => /lib/riscv64-linux-gnu/libc.so.6 (0x0000003fa38a9000)
	/lib/ld-linux-riscv64-lp64d.so.1 (0x0000003fa54c8000)
	libraw1394.so.11 => /usr/lib/riscv64-linux-gnu/libraw1394.so.11 (0x0000003fa389d000)
	libavc1394.so.0 => /usr/lib/riscv64-linux-gnu/libavc1394.so.0 (0x0000003fa3896000)
	librom1394.so.0 => /usr/lib/riscv64-linux-gnu/librom1394.so.0 (0x0000003fa3891000)
	libiec61883.so.0 => /usr/lib/riscv64-linux-gnu/libiec61883.so.0 (0x0000003fa3886000)
	libjack.so.0 => /usr/lib/riscv64-linux-gnu/libjack.so.0 (0x0000003fa383b000)
	libdrm.so.2 => /usr/local/lib/libdrm.so.2 (0x0000003fa382a000)
	libopenal.so.1 => /usr/lib/riscv64-linux-gnu/libopenal.so.1 (0x0000003fa3761000)
	libxcb.so.1 => /usr/local/lib/libxcb.so.1 (0x0000003fa3732000)
	libxcb-shm.so.0 => /usr/local/lib/libxcb-shm.so.0 (0x0000003fa372e000)
	libxcb-shape.so.0 => /usr/local/lib/libxcb-shape.so.0 (0x0000003fa3729000)
	libxcb-xfixes.so.0 => /usr/local/lib/libxcb-xfixes.so.0 (0x0000003fa3720000)
	libcdio_paranoia.so.2 => /usr/lib/riscv64-linux-gnu/libcdio_paranoia.so.2 (0x0000003fa3719000)
	libcdio_cdda.so.2 => /usr/lib/riscv64-linux-gnu/libcdio_cdda.so.2 (0x0000003fa3712000)
	libdc1394.so.25 => /usr/lib/riscv64-linux-gnu/libdc1394.so.25 (0x0000003fa36a4000)
	libasound.so.2 => /usr/lib/riscv64-linux-gnu/libasound.so.2 (0x0000003fa35e4000)
	libcaca.so.0 => /usr/lib/riscv64-linux-gnu/libcaca.so.0 (0x0000003fa3525000)
	libGL.so.1 => /usr/lib/riscv64-linux-gnu/libGL.so.1 (0x0000003fa348f000)
	libpulse.so.0 => /usr/lib/riscv64-linux-gnu/libpulse.so.0 (0x0000003fa3452000)
	libSDL2-2.0.so.0 => /usr/local/lib/libSDL2-2.0.so.0 (0x0000003fa3304000)
	libXv.so.1 => /usr/local/lib/libXv.so.1 (0x0000003fa32fc000)
	libX11.so.6 => /usr/local/lib/libX11.so.6 (0x0000003fa31b3000)
	libXext.so.6 => /usr/local/lib/libXext.so.6 (0x0000003fa31a0000)
	libpocketsphinx.so.3 => /usr/lib/riscv64-linux-gnu/libpocketsphinx.so.3 (0x0000003fa3167000)
	libsphinxbase.so.3 => /usr/lib/riscv64-linux-gnu/libsphinxbase.so.3 (0x0000003fa3134000)
	libbs2b.so.0 => /usr/lib/riscv64-linux-gnu/libbs2b.so.0 (0x0000003fa312e000)
	liblilv-0.so.0 => /usr/lib/riscv64-linux-gnu/liblilv-0.so.0 (0x0000003fa3118000)
	libdl.so.2 => /lib/riscv64-linux-gnu/libdl.so.2 (0x0000003fa3114000)
	librubberband.so.2 => /usr/lib/riscv64-linux-gnu/librubberband.so.2 (0x0000003fa30dd000)
	libmysofa.so.1 => /usr/lib/riscv64-linux-gnu/libmysofa.so.1 (0x0000003fa30d2000)
	libflite_cmu_us_awb.so.1 => /usr/lib/riscv64-linux-gnu/libflite_cmu_us_awb.so.1 (0x0000003fa2d12000)
	libflite_cmu_us_kal.so.1 => /usr/lib/riscv64-linux-gnu/libflite_cmu_us_kal.so.1 (0x0000003fa2bad000)
	libflite_cmu_us_kal16.so.1 => /usr/lib/riscv64-linux-gnu/libflite_cmu_us_kal16.so.1 (0x0000003fa27d2000)
	libflite_cmu_us_rms.so.1 => /usr/lib/riscv64-linux-gnu/libflite_cmu_us_rms.so.1 (0x0000003fa2378000)
	libflite_cmu_us_slt.so.1 => /usr/lib/riscv64-linux-gnu/libflite_cmu_us_slt.so.1 (0x0000003fa1fb7000)
	libflite.so.1 => /usr/lib/riscv64-linux-gnu/libflite.so.1 (0x0000003fa1f89000)
	libfribidi.so.0 => /usr/lib/riscv64-linux-gnu/libfribidi.so.0 (0x0000003fa1f6e000)
	libass.so.9 => /usr/lib/riscv64-linux-gnu/libass.so.9 (0x0000003fa1f4c000)
	libva.so.2 => /usr/lib/riscv64-linux-gnu/libva.so.2 (0x0000003fa1f24000)
	libvidstab.so.1.1 => /usr/lib/riscv64-linux-gnu/libvidstab.so.1.1 (0x0000003fa1f15000)
	libzmq.so.5 => /usr/lib/riscv64-linux-gnu/libzmq.so.5 (0x0000003fa1e78000)
	libzimg.so.2 => /usr/lib/riscv64-linux-gnu/libzimg.so.2 (0x0000003fa1e48000)
	libOpenCL.so.1 => /usr/lib/riscv64-linux-gnu/libOpenCL.so.1 (0x0000003fa1e3c000)
	libfontconfig.so.1 => /usr/local/lib/libfontconfig.so.1 (0x0000003fa1df6000)
	libfreetype.so.6 => /usr/local/lib/libfreetype.so.6 (0x0000003fa1d28000)
	libxml2.so.2 => /usr/lib/riscv64-linux-gnu/libxml2.so.2 (0x0000003fa1bff000)
	libbz2.so.1.0 => /lib/riscv64-linux-gnu/libbz2.so.1.0 (0x0000003fa1bf0000)
	libgme.so.0 => /usr/lib/riscv64-linux-gnu/libgme.so.0 (0x0000003fa1baa000)
	libopenmpt.so.0 => /usr/lib/riscv64-linux-gnu/libopenmpt.so.0 (0x0000003fa19d9000)
	libchromaprint.so.1 => /usr/lib/riscv64-linux-gnu/libchromaprint.so.1 (0x0000003fa19c8000)
	libbluray.so.2 => /usr/lib/riscv64-linux-gnu/libbluray.so.2 (0x0000003fa198d000)
	libz.so.1 => /usr/local/lib/libz.so.1 (0x0000003fa196f000)
	libgnutls.so.30 => /usr/lib/riscv64-linux-gnu/libgnutls.so.30 (0x0000003fa17eb000)
	librabbitmq.so.4 => /usr/lib/riscv64-linux-gnu/librabbitmq.so.4 (0x0000003fa17d7000)
	libsrt-gnutls.so.1.4 => /usr/lib/riscv64-linux-gnu/libsrt-gnutls.so.1.4 (0x0000003fa172f000)
	libssh-gcrypt.so.4 => /usr/lib/riscv64-linux-gnu/libssh-gcrypt.so.4 (0x0000003fa16c3000)
	libvpx.so.7 => /usr/lib/riscv64-linux-gnu/libvpx.so.7 (0x0000003fa154e000)
	libwebpmux.so.3 => /usr/lib/riscv64-linux-gnu/libwebpmux.so.3 (0x0000003fa1546000)
	libwebp.so.7 => /usr/lib/riscv64-linux-gnu/libwebp.so.7 (0x0000003fa1506000)
	liblzma.so.5 => /lib/riscv64-linux-gnu/liblzma.so.5 (0x0000003fa14e7000)
	libdav1d.so.6 => /usr/lib/riscv64-linux-gnu/libdav1d.so.6 (0x0000003fa143a000)
	librsvg-2.so.2 => /usr/lib/riscv64-linux-gnu/librsvg-2.so.2 (0x0000003fa0aef000)
	libgobject-2.0.so.0 => /usr/lib/riscv64-linux-gnu/libgobject-2.0.so.0 (0x0000003fa0aa5000)
	libglib-2.0.so.0 => /usr/lib/riscv64-linux-gnu/libglib-2.0.so.0 (0x0000003fa09af000)
	libcairo.so.2 => /usr/local/lib/libcairo.so.2 (0x0000003fa087c000)
	libzvbi.so.0 => /usr/lib/riscv64-linux-gnu/libzvbi.so.0 (0x0000003fa0805000)
	libsnappy.so.1 => /usr/lib/riscv64-linux-gnu/libsnappy.so.1 (0x0000003fa07fc000)
	libaom.so.3 => /usr/lib/riscv64-linux-gnu/libaom.so.3 (0x0000003fa0570000)
	libcodec2.so.1.0 => /usr/lib/riscv64-linux-gnu/libcodec2.so.1.0 (0x0000003f9f6d8000)
	libgsm.so.1 => /usr/lib/riscv64-linux-gnu/libgsm.so.1 (0x0000003f9f6ca000)
	libmp3lame.so.0 => /usr/lib/riscv64-linux-gnu/libmp3lame.so.0 (0x0000003f9f664000)
	libopenjp2.so.7 => /usr/lib/riscv64-linux-gnu/libopenjp2.so.7 (0x0000003f9f620000)
	libopus.so.0 => /usr/lib/riscv64-linux-gnu/libopus.so.0 (0x0000003f9f5dd000)
	libshine.so.3 => /usr/lib/riscv64-linux-gnu/libshine.so.3 (0x0000003f9f5d2000)
	libspeex.so.1 => /usr/lib/riscv64-linux-gnu/libspeex.so.1 (0x0000003f9f5bb000)
	libtheoraenc.so.1 => /usr/lib/riscv64-linux-gnu/libtheoraenc.so.1 (0x0000003f9f590000)
	libtheoradec.so.1 => /usr/lib/riscv64-linux-gnu/libtheoradec.so.1 (0x0000003f9f57c000)
	libtwolame.so.0 => /usr/lib/riscv64-linux-gnu/libtwolame.so.0 (0x0000003f9f55c000)
	libvorbis.so.0 => /usr/lib/riscv64-linux-gnu/libvorbis.so.0 (0x0000003f9f538000)
	libvorbisenc.so.2 => /usr/lib/riscv64-linux-gnu/libvorbisenc.so.2 (0x0000003f9f498000)
	libx264.so.163 => /usr/lib/riscv64-linux-gnu/libx264.so.163 (0x0000003f9f29c000)
	libx265.so.199 => /usr/lib/riscv64-linux-gnu/libx265.so.199 (0x0000003f9f04b000)
	libxvidcore.so.4 => /usr/lib/riscv64-linux-gnu/libxvidcore.so.4 (0x0000003f9ef72000)
	libsoxr.so.0 => /usr/lib/riscv64-linux-gnu/libsoxr.so.0 (0x0000003f9ef1f000)
	libva-drm.so.2 => /usr/lib/riscv64-linux-gnu/libva-drm.so.2 (0x0000003f9ef1b000)
	libva-x11.so.2 => /usr/lib/riscv64-linux-gnu/libva-x11.so.2 (0x0000003f9ef13000)
	libvdpau.so.1 => /usr/lib/riscv64-linux-gnu/libvdpau.so.1 (0x0000003f9ef0e000)
	libdb-5.3.so => /usr/lib/riscv64-linux-gnu/libdb-5.3.so (0x0000003f9eddd000)
	librt.so.1 => /lib/riscv64-linux-gnu/librt.so.1 (0x0000003f9edd5000)
	libstdc++.so.6 => /usr/lib/riscv64-linux-gnu/libstdc++.so.6 (0x0000003f9ec00000)
	libgcc_s.so.1 => /lib/riscv64-linux-gnu/libgcc_s.so.1 (0x0000003f9ebea000)
	libsndio.so.7.0 => /usr/lib/riscv64-linux-gnu/libsndio.so.7.0 (0x0000003f9ebdb000)
	libXau.so.6 => /usr/local/lib/libXau.so.6 (0x0000003f9ebd7000)
	libXdmcp.so.6 => /usr/local/lib/libXdmcp.so.6 (0x0000003f9ebcf000)
	libcdio.so.19 => /usr/lib/riscv64-linux-gnu/libcdio.so.19 (0x0000003f9ebad000)
	libusb-1.0.so.0 => /usr/lib/riscv64-linux-gnu/libusb-1.0.so.0 (0x0000003f9eb94000)
	libslang.so.2 => /usr/lib/riscv64-linux-gnu/libslang.so.2 (0x0000003f9e8b4000)
	libncursesw.so.6 => /lib/riscv64-linux-gnu/libncursesw.so.6 (0x0000003f9e88b000)
	libtinfo.so.6 => /lib/riscv64-linux-gnu/libtinfo.so.6 (0x0000003f9e860000)
	libGLdispatch.so.0 => /usr/lib/riscv64-linux-gnu/libGLdispatch.so.0 (0x0000003f9e7b8000)
	libGLX.so.0 => /usr/lib/riscv64-linux-gnu/libGLX.so.0 (0x0000003f9e7aa000)
	libpulsecommon-15.0.so => /usr/lib/riscv64-linux-gnu/pulseaudio/libpulsecommon-15.0.so (0x0000003f9e744000)
	libdbus-1.so.3 => /lib/riscv64-linux-gnu/libdbus-1.so.3 (0x0000003f9e707000)
	libblas.so.3 => /usr/lib/riscv64-linux-gnu/libblas.so.3 (0x0000003f9e6c3000)
	liblapack.so.3 => /usr/lib/riscv64-linux-gnu/liblapack.so.3 (0x0000003f9e2d0000)
	libserd-0.so.0 => /usr/lib/riscv64-linux-gnu/libserd-0.so.0 (0x0000003f9e2bf000)
	libsord-0.so.0 => /usr/lib/riscv64-linux-gnu/libsord-0.so.0 (0x0000003f9e2b4000)
	libsratom-0.so.0 => /usr/lib/riscv64-linux-gnu/libsratom-0.so.0 (0x0000003f9e2ac000)
	libflite_usenglish.so.1 => /usr/lib/riscv64-linux-gnu/libflite_usenglish.so.1 (0x0000003f9e283000)
	libflite_cmulex.so.1 => /usr/lib/riscv64-linux-gnu/libflite_cmulex.so.1 (0x0000003f9e1ed000)
	libharfbuzz.so.0 => /usr/lib/riscv64-linux-gnu/libharfbuzz.so.0 (0x0000003f9e135000)
	libgomp.so.1 => /usr/lib/riscv64-linux-gnu/libgomp.so.1 (0x0000003f9e102000)
	libbsd.so.0 => /usr/lib/riscv64-linux-gnu/libbsd.so.0 (0x0000003f9e0f1000)
	libsodium.so.23 => /usr/lib/riscv64-linux-gnu/libsodium.so.23 (0x0000003f9e0bd000)
	libpgm-5.3.so.0 => /usr/lib/riscv64-linux-gnu/libpgm-5.3.so.0 (0x0000003f9e07b000)
	libnorm.so.1 => /usr/lib/riscv64-linux-gnu/libnorm.so.1 (0x0000003f9df67000)
	libgssapi_krb5.so.2 => /usr/lib/riscv64-linux-gnu/libgssapi_krb5.so.2 (0x0000003f9df2e000)
	libexpat.so.1 => /usr/local/lib/libexpat.so.1 (0x0000003f9defa000)
	libicuuc.so.71 => /usr/lib/riscv64-linux-gnu/libicuuc.so.71 (0x0000003f9dd45000)
	libmpg123.so.0 => /usr/lib/riscv64-linux-gnu/libmpg123.so.0 (0x0000003f9dd01000)
	libvorbisfile.so.3 => /usr/lib/riscv64-linux-gnu/libvorbisfile.so.3 (0x0000003f9dcf9000)
	libudfread.so.0 => /usr/lib/riscv64-linux-gnu/libudfread.so.0 (0x0000003f9dcf1000)
	libp11-kit.so.0 => /usr/lib/riscv64-linux-gnu/libp11-kit.so.0 (0x0000003f9dc15000)
	libidn2.so.0 => /usr/lib/riscv64-linux-gnu/libidn2.so.0 (0x0000003f9dbf6000)
	libunistring.so.2 => /usr/lib/riscv64-linux-gnu/libunistring.so.2 (0x0000003f9da62000)
	libtasn1.so.6 => /usr/lib/riscv64-linux-gnu/libtasn1.so.6 (0x0000003f9da51000)
	libnettle.so.8 => /usr/lib/riscv64-linux-gnu/libnettle.so.8 (0x0000003f9da0e000)
	libhogweed.so.6 => /usr/lib/riscv64-linux-gnu/libhogweed.so.6 (0x0000003f9d9d0000)
	libgmp.so.10 => /usr/lib/riscv64-linux-gnu/libgmp.so.10 (0x0000003f9d970000)
	libssl.so.3 => /usr/lib/riscv64-linux-gnu/libssl.so.3 (0x0000003f9d8ef000)
	libcrypto.so.3 => /usr/lib/riscv64-linux-gnu/libcrypto.so.3 (0x0000003f9d5e1000)
	libgcrypt.so.20 => /usr/lib/riscv64-linux-gnu/libgcrypt.so.20 (0x0000003f9d50b000)
	libgpg-error.so.0 => /lib/riscv64-linux-gnu/libgpg-error.so.0 (0x0000003f9d4ef000)
	libcairo-gobject.so.2 => /usr/lib/riscv64-linux-gnu/libcairo-gobject.so.2 (0x0000003f9d4e3000)
	libgdk_pixbuf-2.0.so.0 => /usr/lib/riscv64-linux-gnu/libgdk_pixbuf-2.0.so.0 (0x0000003f9d4c2000)
	libgio-2.0.so.0 => /usr/lib/riscv64-linux-gnu/libgio-2.0.so.0 (0x0000003f9d36d000)
	libpangocairo-1.0.so.0 => /usr/lib/riscv64-linux-gnu/libpangocairo-1.0.so.0 (0x0000003f9d360000)
	libpango-1.0.so.0 => /usr/lib/riscv64-linux-gnu/libpango-1.0.so.0 (0x0000003f9d310000)
	libffi.so.8 => /usr/lib/riscv64-linux-gnu/libffi.so.8 (0x0000003f9d307000)
	libpcre.so.3 => /lib/riscv64-linux-gnu/libpcre.so.3 (0x0000003f9d2c9000)
	libpixman-1.so.0 => /usr/local/lib/libpixman-1.so.0 (0x0000003f9d072000)
	libpng16.so.16 => /usr/local/lib/libpng16.so.16 (0x0000003f9d034000)
	libxcb-render.so.0 => /usr/local/lib/libxcb-render.so.0 (0x0000003f9d023000)
	libXrender.so.1 => /usr/local/lib/libXrender.so.1 (0x0000003f9d017000)
	libogg.so.0 => /usr/lib/riscv64-linux-gnu/libogg.so.0 (0x0000003f9d00c000)
	libXfixes.so.3 => /usr/local/lib/libXfixes.so.3 (0x0000003f9d005000)
	libudev.so.1 => /usr/lib/riscv64-linux-gnu/libudev.so.1 (0x0000003f9cfe6000)
	libsndfile.so.1 => /usr/lib/riscv64-linux-gnu/libsndfile.so.1 (0x0000003f9cf81000)
	libX11-xcb.so.1 => /usr/local/lib/libX11-xcb.so.1 (0x0000003f9cf7c000)
	libsystemd.so.0 => /usr/lib/riscv64-linux-gnu/libsystemd.so.0 (0x0000003f9cedc000)
	libasyncns.so.0 => /usr/lib/riscv64-linux-gnu/libasyncns.so.0 (0x0000003f9ced6000)
	libwrap.so.0 => /usr/lib/riscv64-linux-gnu/libwrap.so.0 (0x0000003f9cecd000)
	libgfortran.so.5 => /usr/lib/riscv64-linux-gnu/libgfortran.so.5 (0x0000003f9cdd0000)
	libgraphite2.so.3 => /usr/lib/riscv64-linux-gnu/libgraphite2.so.3 (0x0000003f9cdb0000)
	libmd.so.0 => /usr/lib/riscv64-linux-gnu/libmd.so.0 (0x0000003f9cda3000)
	libkrb5.so.3 => /usr/lib/riscv64-linux-gnu/libkrb5.so.3 (0x0000003f9ccfb000)
	libk5crypto.so.3 => /usr/lib/riscv64-linux-gnu/libk5crypto.so.3 (0x0000003f9cccd000)
	libcom_err.so.2 => /lib/riscv64-linux-gnu/libcom_err.so.2 (0x0000003f9ccc9000)
	libkrb5support.so.0 => /usr/lib/riscv64-linux-gnu/libkrb5support.so.0 (0x0000003f9ccbc000)
	libicudata.so.71 => /usr/lib/riscv64-linux-gnu/libicudata.so.71 (0x0000003f9afb7000)
	libgmodule-2.0.so.0 => /usr/lib/riscv64-linux-gnu/libgmodule-2.0.so.0 (0x0000003f9afb2000)
	libjpeg.so.62 => /usr/lib/riscv64-linux-gnu/libjpeg.so.62 (0x0000003f9af5d000)
	libmount.so.1 => /usr/lib/riscv64-linux-gnu/libmount.so.1 (0x0000003f9af12000)
	libselinux.so.1 => /lib/riscv64-linux-gnu/libselinux.so.1 (0x0000003f9aeed000)
	libresolv.so.2 => /lib/riscv64-linux-gnu/libresolv.so.2 (0x0000003f9aedc000)
	libpangoft2-1.0.so.0 => /usr/lib/riscv64-linux-gnu/libpangoft2-1.0.so.0 (0x0000003f9aec9000)
	libthai.so.0 => /usr/lib/riscv64-linux-gnu/libthai.so.0 (0x0000003f9aec1000)
	libFLAC.so.8 => /usr/lib/riscv64-linux-gnu/libFLAC.so.8 (0x0000003f9ae99000)
	libcap.so.2 => /lib/riscv64-linux-gnu/libcap.so.2 (0x0000003f9ae8f000)
	libzstd.so.1 => /usr/lib/riscv64-linux-gnu/libzstd.so.1 (0x0000003f9ade3000)
	liblz4.so.1 => /usr/lib/riscv64-linux-gnu/liblz4.so.1 (0x0000003f9adc0000)
	libnsl.so.2 => /usr/lib/riscv64-linux-gnu/libnsl.so.2 (0x0000003f9adad000)
	libkeyutils.so.1 => /lib/riscv64-linux-gnu/libkeyutils.so.1 (0x0000003f9ada8000)
	libblkid.so.1 => /usr/lib/riscv64-linux-gnu/libblkid.so.1 (0x0000003f9ad62000)
	libpcre2-8.so.0 => /usr/lib/riscv64-linux-gnu/libpcre2-8.so.0 (0x0000003f9ad0d000)
	libdatrie.so.1 => /usr/lib/riscv64-linux-gnu/libdatrie.so.1 (0x0000003f9ad07000)
	libtirpc.so.3 => /lib/riscv64-linux-gnu/libtirpc.so.3 (0x0000003f9ace5000)


One problem with ldd is that it only shows up

  • dynamically linked shared libraries that were linked at compile time.

I only learned recently there there are also dynamic, manually loaded at runtime libraries (man dlopen) that ldd does not show. I have no idea how to show what the program is trying to access and from where, other than to debug the program as it runs with strace.

An example of this would be where a programmer scans the USB ports looking for SDR devices (Software Defined Radio) and then only attempts at runtime to load the libraries for the hardware that was plugged into the computer. And then only use functions that were in the libraries that were loaded to access the hardware that is present at that time.

Then this is your main problem. If they are not there they are not detected. Could it be that the -dev packages only holds the source code to build the libs yourself.

A short search turned up: Debian -- Details of package libomxil-bellagio-bin in sid
There seems to be a bin file of the same thing. This should be precompiled.

But there is also this: Debian -- Details of package libomxil-bellagio0 in sid

Point beeing: Make sure you install the package you need

You could also recompile ffmpeg. Could be that the names are not correct. See: ffmpeg h264_omx encoder - libomxcore.so missing. - Raspberry Pi Forums
Issue with libOmxCore.so not found on RPi4 on Arch Linux · Issue #1715 · jellyfin/jellyfin · GitHub


Thanks did not know this!

1 Like

Thanks for that.
I did try compiling FFMPEG last night for the h264_v4l2m2m codec as I read somewhere that the OMX codec was being deprecated (I can’t find the article right now, I’ll add it here if I can find it again). That didn’t work (not that I’m overly surprised) the error being:

[h264_v4l2m2m @ 0x2ad66b3be0] Could not find a valid device
[h264_v4l2m2m @ 0x2ad66b3be0] can't configure encoder
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height

I’ll try recompiling specifically for h264_omx and report back.

Edit: Link to article mentioned above Hardware Accelerated Video Encoding on the Raspberry Pi 4 on Ubuntu 20.04 64-bit

I would first try to find the right package to install so you the get needed .so files in the system. If that does not work try to recompile ffmpeg.

Have you checked is the file missing:
ls -l /usr/local/lib/libOMX_Core.so
ls -l /usr/local/lib/libf-omx-il.so

EDIT: Just noticed that you are running the “minimal version”
Did you download and install the package ?
Goto https://debian.starfivetech.com/ → select either one → Engineering Release → Image-69 → minimal → debian-packs → download ffmpeg_gstreamer_riscv64.deb

Or there is always source code: https://github.com/starfive-tech/soft_3rdpart/tree/JH7110_VisionFive2_devel/omx-il


Ahhh that’s helped alot thank you. I originally installed ffmpeg using APT.

Having installed debian-packs → download ffmpeg_gstreamer_riscv64.deb the .so not found errors have now gone. Progress! I also installed the extra packages noted in the Readme.md file in debian-packs.

The next error that I’m chasing down is

[h264_omx @ 0x2ad9799d40] No component for role video_encoder.avc found
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
1 Like

I’m starting to wonder if I should install the full version and see if it works there, then chase down issues with minimal later.

1 Like

At time like this a spare SD card or two is useful.

I’ve installed that many random packages onto this one now that it’ll almost certainly end up getting nuked soon anyway, but yes in hindsight I probably should have bought a few to chop and change.

1 Like

So I’ve nuked the SD card and installed the full version of image-69. FFMPEG was already installed this time, I didn’t have to install it which was good. I ran the command again ffmpeg -i /dev/video4 -c:v h264_omx ./test.mp4 with the same error message as before.

[h264_omx @ 0x2ace8e0d40] No component for role video_encoder.avc found
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height

This is promising for the minimal image at least once this error is solved.

Some more debugging info just in case it helps anyone.

root@starfive:~# lsmod
Module                  Size  Used by
jpu                    24576  0
vdec                   28672  0
venc                   28672  0
root@starfive:~# ls /dev
autofs		 i2c-6	       mtd2ro	  ptyb4  ptyd0	ptyec  ptyq8  ptys4  ptyu0  ptyvc  ptyx8  ptyz4      tty14  tty4   tty8   ttyb4  ttyd0	ttyec	   ttyq7  ttys3  ttytf	ttyvb  ttyx7  ttyz3    vcsa5
block		 i2c-7	       mtdblock0  ptyb5  ptyd1	ptyed  ptyq9  ptys5  ptyu1  ptyvd  ptyx9  ptyz5      tty15  tty40  tty9   ttyb5  ttyd1	ttyed	   ttyq8  ttys4  ttyu0	ttyvc  ttyx8  ttyz4    vcsa6
bus		 initctl       mtdblock1  ptyb6  ptyd2	ptyee  ptyqa  ptys6  ptyu2  ptyve  ptyxa  ptyz6      tty16  tty41  ttyS0  ttyb6  ttyd2	ttyee	   ttyq9  ttys5  ttyu1	ttyvd  ttyx9  ttyz5    vcsa7
char		 input	       mtdblock2  ptyb7  ptyd3	ptyef  ptyqb  ptys7  ptyu3  ptyvf  ptyxb  ptyz7      tty17  tty42  ttyS1  ttyb7  ttyd3	ttyef	   ttyqa  ttys6  ttyu2	ttyve  ttyxa  ttyz6    vcsu
console		 jpu	       null	  ptyb8  ptyd4	ptyp0  ptyqc  ptys8  ptyu4  ptyw0  ptyxc  ptyz8      tty18  tty43  ttyS2  ttyb8  ttyd4	ttyp0	   ttyqb  ttys7  ttyu3	ttyvf  ttyxb  ttyz7    vcsu1
cpu_dma_latency  kmsg	       port	  ptyb9  ptyd5	ptyp1  ptyqd  ptys9  ptyu5  ptyw1  ptyxd  ptyz9      tty19  tty44  ttyS3  ttyb9  ttyd5	ttyp1	   ttyqc  ttys8  ttyu4	ttyw0  ttyxc  ttyz8    vcsu2
cuse		 log	       ptmx	  ptyba  ptyd6	ptyp2  ptyqe  ptysa  ptyu6  ptyw2  ptyxe  ptyza      tty2   tty45  ttyS4  ttyba  ttyd6	ttyp2	   ttyqd  ttys9  ttyu5	ttyw1  ttyxd  ttyz9    vcsu3
disk		 loop-control  pts	  ptybb  ptyd7	ptyp3  ptyqf  ptysb  ptyu7  ptyw3  ptyxf  ptyzb      tty20  tty46  ttyS5  ttybb  ttyd7	ttyp3	   ttyqe  ttysa  ttyu6	ttyw2  ttyxe  ttyza    vcsu4
dri		 loop0	       ptya0	  ptybc  ptyd8	ptyp4  ptyr0  ptysc  ptyu8  ptyw4  ptyy0  ptyzc      tty21  tty47  ttya0  ttybc  ttyd8	ttyp4	   ttyqf  ttysb  ttyu7	ttyw3  ttyxf  ttyzb    vcsu5
dwdma		 loop1	       ptya1	  ptybd  ptyd9	ptyp5  ptyr1  ptysd  ptyu9  ptyw5  ptyy1  ptyzd      tty22  tty48  ttya1  ttybd  ttyd9	ttyp5	   ttyr0  ttysc  ttyu8	ttyw4  ttyy0  ttyzc    vcsu6
fd		 loop2	       ptya2	  ptybe  ptyda	ptyp6  ptyr2  ptyse  ptyua  ptyw6  ptyy2  ptyze      tty23  tty49  ttya2  ttybe  ttyda	ttyp6	   ttyr1  ttysd  ttyu9	ttyw5  ttyy1  ttyzd    vcsu7
full		 loop3	       ptya3	  ptybf  ptydb	ptyp7  ptyr3  ptysf  ptyub  ptyw7  ptyy3  ptyzf      tty24  tty5   ttya3  ttybf  ttydb	ttyp7	   ttyr2  ttyse  ttyua	ttyw6  ttyy2  ttyze    vdec
fuse		 loop4	       ptya4	  ptyc0  ptydc	ptyp8  ptyr4  ptyt0  ptyuc  ptyw8  ptyy4  random     tty25  tty50  ttya4  ttyc0  ttydc	ttyp8	   ttyr3  ttysf  ttyub	ttyw7  ttyy3  ttyzf    venc
gpiochip0	 loop5	       ptya5	  ptyc1  ptydd	ptyp9  ptyr5  ptyt1  ptyud  ptyw9  ptyy5  rtc	     tty26  tty51  ttya5  ttyc1  ttydd	ttyp9	   ttyr4  ttyt0  ttyuc	ttyw8  ttyy4  urandom  vga_arbiter
gpiochip1	 loop6	       ptya6	  ptyc2  ptyde	ptypa  ptyr6  ptyt2  ptyue  ptywa  ptyy6  rtc0	     tty27  tty52  ttya6  ttyc2  ttyde	ttypa	   ttyr5  ttyt1  ttyud	ttyw9  ttyy5  v4l      video0
hugepages	 loop7	       ptya7	  ptyc3  ptydf	ptypb  ptyr7  ptyt3  ptyuf  ptywb  ptyy7  shm	     tty28  tty53  ttya7  ttyc3  ttydf	ttypb	   ttyr6  ttyt2  ttyue	ttywa  ttyy6  vcs      video1
hvc0		 media0        ptya8	  ptyc4  ptye0	ptypc  ptyr8  ptyt4  ptyv0  ptywc  ptyy8  snd	     tty29  tty54  ttya8  ttyc4  ttye0	ttypc	   ttyr7  ttyt3  ttyuf	ttywb  ttyy7  vcs1     video2
hvc1		 mem	       ptya9	  ptyc5  ptye1	ptypd  ptyr9  ptyt5  ptyv1  ptywd  ptyy9  spidev1.0  tty3   tty55  ttya9  ttyc5  ttye1	ttypd	   ttyr8  ttyt4  ttyv0	ttywc  ttyy8  vcs2     video3
hvc2		 mmcblk1       ptyaa	  ptyc6  ptye2	ptype  ptyra  ptyt6  ptyv2  ptywe  ptyya  stderr     tty30  tty56  ttyaa  ttyc6  ttye2	ttype	   ttyr9  ttyt5  ttyv1	ttywd  ttyy9  vcs3     video4
hvc3		 mmcblk1p1     ptyab	  ptyc7  ptye3	ptypf  ptyrb  ptyt7  ptyv3  ptywf  ptyyb  stdin      tty31  tty57  ttyab  ttyc7  ttye3	ttypf	   ttyra  ttyt6  ttyv2	ttywe  ttyya  vcs4     video5
hvc4		 mmcblk1p2     ptyac	  ptyc8  ptye4	ptyq0  ptyrc  ptyt8  ptyv4  ptyx0  ptyyc  stdout     tty32  tty58  ttyac  ttyc8  ttye4	ttyprintk  ttyrb  ttyt7  ttyv3	ttywf  ttyyb  vcs5     video6
hvc5		 mmcblk1p3     ptyad	  ptyc9  ptye5	ptyq1  ptyrd  ptyt9  ptyv5  ptyx1  ptyyd  tty	     tty33  tty59  ttyad  ttyc9  ttye5	ttyq0	   ttyrc  ttyt8  ttyv4	ttyx0  ttyyc  vcs6     video7
hvc6		 mqueue        ptyae	  ptyca  ptye6	ptyq2  ptyre  ptyta  ptyv6  ptyx2  ptyye  tty0	     tty34  tty6   ttyae  ttyca  ttye6	ttyq1	   ttyrd  ttyt9  ttyv5	ttyx1  ttyyd  vcs7     watchdog
hvc7		 mtd0	       ptyaf	  ptycb  ptye7	ptyq3  ptyrf  ptytb  ptyv7  ptyx3  ptyyf  tty1	     tty35  tty60  ttyaf  ttycb  ttye7	ttyq2	   ttyre  ttyta  ttyv6	ttyx2  ttyye  vcsa     watchdog0
hwrng		 mtd0ro        ptyb0	  ptycc  ptye8	ptyq4  ptys0  ptytc  ptyv8  ptyx4  ptyz0  tty10      tty36  tty61  ttyb0  ttycc  ttye8	ttyq3	   ttyrf  ttytb  ttyv7	ttyx3  ttyyf  vcsa1    zero
i2c-0		 mtd1	       ptyb1	  ptycd  ptye9	ptyq5  ptys1  ptytd  ptyv9  ptyx5  ptyz1  tty11      tty37  tty62  ttyb1  ttycd  ttye9	ttyq4	   ttys0  ttytc  ttyv8	ttyx4  ttyz0  vcsa2
i2c-2		 mtd1ro        ptyb2	  ptyce  ptyea	ptyq6  ptys2  ptyte  ptyva  ptyx6  ptyz2  tty12      tty38  tty63  ttyb2  ttyce  ttyea	ttyq5	   ttys1  ttytd  ttyv9	ttyx5  ttyz1  vcsa3
i2c-5		 mtd2	       ptyb3	  ptycf  ptyeb	ptyq7  ptys3  ptytf  ptyvb  ptyx7  ptyz3  tty13      tty39  tty7   ttyb3  ttycf  ttyeb	ttyq6	   ttys2  ttyte  ttyva	ttyx6  ttyz2  vcsa4
root@starfive:~# uname -a
Linux starfive 5.15.0-starfive #1 SMP Mon Dec 19 07:56:37 EST 2022 riscv64 GNU/Linux

This looks to me like an “normal” ffmpeg error. Meaning: The programm functions like it should be (no crashes or librarys missing) but there is an error in the parameters the user sent or something is missing. It feels like you missing a parameter or something but i would say the programm itself works as it should.

Google turns up this:

1 Like

Glad to receive your question,and I can understand what you’re confusion.
Now let me answer your question:
In your command , the encoder used is h264_omx.But VPU didn’t support h264 encoding,so you can change h264_omx to hevc_omx.

ffmpeg -i /dev/video4 -c:v hevc_omx test.mp4

And then you can get test.mp4,you can use ffplay to play it on the desktop

ffplay -i test.mp4

I hope this reply will help you


Thanks, makes total sense.
From the JH7110 datasheet:
Video Decode H264/H265 4k@60 fps
Video Encode H265 1080p@30 fps

1 Like

Ahhh that makes sense.
Thank you for the response it worked perfectly.

Encoding at 10fps with virtually no CPU loading at all. I’m not sure why its 10fps for the moment, it could be my camera, or a setting that needs changing etc. but it’s not a problem right now for my application.

When I get a second I’ll try again with the minimal distribution, though I’m not expecting any issues now I have it running.

Thank you to everyone for your help, so far I’m loving the VisionFive 2 board :slight_smile:

1 Like

I’d try:
$ 4l2-ctl --device=/dev/video4 --list-formats
$ v4l2-ctl --device=/dev/video4 --list-formats-ext
(you may need to do a “sudo apt install v4l-utils”, not sure)
And see what is supported.