Installed packages: ffmpeg, libavdevice-dev, libavformat-dev, libavcodec-dev, libavutil-dev, and libavfilter-dev all at version 4.3.5-0+deb11u1
Can’t find the ha-av 10.1.0 changelog to address the issue, but found that PR on the main PyAv project that mentions the added “AV_CODEC_CAP_OTHER_THREADS” declaration from ffmpeg 6.0 that might have been merged either on the ha-av package, so PROBABLY an update to ffmpeg 6.0 libs and binaries might solve the issue.
EDIT: Found in the full HA changelog the PR #93420 that confirm the aforementioned hypotesis that ha-av 10.1.0 dropped support for ffmpeg 4.3.x (the default on Raspbian OS), so the fix might consist in a downgrade of ha-av, or an upgrade of ffmpeg and needed libs to the 6.x branch.
I have a similar problem (not sure it’s exactly the same), installation fails on ha-av, both during upgrade or manual, but I’m getting the following error (no matter which method):
running pip3.11 install ha-av==10.1.0 ends with the following error:
> src/av/sidedata/sidedata.c:5662:9: error: ‘AV_FRAME_DATA_SEI_UNREGISTERED’ undeclared (first use in this function)
> 5662 | if (((AV_FRAME_DATA_SEI_UNREGISTERED != -1L) != 0)) {
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> src/av/sidedata/sidedata.c:5662:9: note: each undeclared identifier is reported only once for each function it appears in
> error: command '/usr/bin/gcc' failed with exit code 1
> [end of output]
>
> note: This error originates from a subprocess, and is likely not a problem with pip.
> ERROR: Failed building wheel for ha-av
> Failed to build ha-av
> ERROR: Could not build wheels for ha-av, which is required to install pyproject.toml-based projects
I tried this also with python 3.10.9, 3.11.1 and 3.11.4 - all with the same result.
System is bulleseye running on RPI2 with HA CORE 2023.5.3
Have you tried first to install all ffmpeg dev libs, as suggested this answer in this thread?
Anyways, for the issue with ha-av 10.1.0 on RPiOS Bullseye, i think the only solution will be to replace the distro’s ffpmg version with a manually downloaded and compiled ffmpeg 6.x with all the dev libs. ATM I’ve rolled back to HA 2023.5.4
no 10.0.0 produce the same error on 23.6.x
i will stop updating ha core on buster and wait for bookworm. slowly it becomes too much work for me to keep ha core under buster up to date.
12 june is bookworm release and a few weeks later maybe the next raspbian.
with debian12 you get python11, ffmpeg5 and rustc 1.63 out of the box.
i want to spent my time on doing cool stuff with ha and not on keep it alive 2023.5.4 is fine
I totally agree - the problem is that I can’t really stop trying as long as I have things to check… so eventually I managed upgrading ha-av to 10.1.0. I did that by recompiling ffmpeg (followed Compiling FFmpeg on the Raspberry Pi - Pi My Life Up), with a little help from another thread here (Error Ha AV with 2023.04 - #11 by kexan82).
With the following modifications to the process:
fPIC should be enabled for libvpx (add --enable-pic to its configure command)
ffmpeg needs to be compiled as a shared lib (add --disable-static and --enable-shared to the configure command)
I compiled ffmpeg 4.4 (in the last git command clone release/4.4) it might work also with 5.0 or 6.0 but I didn’t try.
After this I can upgrade to ha-av 10.1.0. I can also share the ffmpeg deb file I used, if anyone is interested (but it includes the 32bit libs, I think you guys require the 64bit version).
Now I’m a happy camper running upgraded HomeAssistant core 2023.6.0…
This worked for me to compile ffmpeg version 536cd25 running on RPi armv7l.
There was a problem with the libraries being found. At first, I thought I needed to set LD_LIBRARY_PATH, but that wasn’t the solution. I needed to make sure /usr/local/lib was in a file under /etc/ld.so.conf.d . Then, sudo ldconfig
and a reboot seemed to fix it.
Thanks for this, compiling ffmpeg on the rpi4 worked for me also. Ran into the same issue where ha couldn’t find the linked libraries and ldconfig was the solution as well.
ROTFL, me too. I’m actually trying to build ffmpeg from scratch but having some troubles wit zimg and AOM probably because I’m on a aarch64 OS version.
[ 31%] Building C object CMakeFiles/aom_av1_encoder.dir/third_party/vector/vector.c.o
[ 31%] Building C object CMakeFiles/aom_av1_encoder.dir/av1/encoder/dwt.c.o
[ 31%] Built target aom_av1_encoder
make: *** [Makefile:149: all] Error 2
pi@raspberrypi4:~/ffmpeg-libraries/aom/aom_build $
/home/pi/ffmpeg-libraries/aom/aom_dsp/arm/sum_neon.h:148:25: error: incompatible types when initializing type ‘uint16x8_t’ using type ‘int’
148 | const uint16x8_t a1 = vpaddq_u16(sum[2], sum[3]);
@Maurizion you probably were fooled, like me, by the fact that we might have a 64bit kernel, but the userland is only 32bit, so all compiles should be done for the 32bit version.
Doing a recap for the newcomers, to fix building of ha-av in HA 2023.6.x on a Core installation on Raspbian OS, you should do only the following part from the aforementioned guide, compiling only ffmpeg with the basic set of libraries (@00lex please correct me if I’m wrong). You should choose the most appropriate Git branch for your scenario altering the --branch release/6.0 option from the git clone command:
I get an error on configure step ERROR: libfdk_aac not found
I removed line
–enable-libfdk-aac \
from configure command and all done successfully. I don’t know if it important.
Also ldconfig should be run with sudo.
After that pip3.11 install --upgrade ha-av
done successfully.
Thank you for brief instruction!
Logger: haffmpeg.core
Source: /srv/homeassistant/lib/python3.11/site-packages/haffmpeg/core.py:139
First occurred: 12:08:06 (1 occurrences)
Last logged: 12:08:06
FFmpeg fails [Errno 2] No such file or directory: '/usr/bin/ffmpeg'