FFMPEG OMX troubles

Hi All,

I can’t seem to get ffmpeg working with h264 OMX hardware encoding. Depending on how I install FFMPEG I get different errors, but going “the easy” route and installing it via dietpi-software it errors out when using h264_omx:

ffmpeg -i input.mp4 -c:a aac -b:a 128k -c:v h264_omx -b:v 900k output.mp4

gives me

[h264_omx @ 0x2498610] OMX_GetHandle(OMX.broadcom.video_encode) failed: 80001005

I tried installing libomxil-bellagio-bin like suggested elsewhere but that doesn’t work… I thought libomxil is already included in raspbian in /opt/vc/lib, but that is not being used either

Anybody has a solution to this?
Thanks!

Ok, so, I managed to get it working by copying the library to /usr/lib

cp /opt/vc/lib/libopenmaxil.so /usr/lib

and now ffmpeg successfully loads h264_omx codec

not sure if it’s the correct way to do it.