Error Ha AV with 2023.04

Hi! I recently updated my HA Core to 2023.04. Its running inside a Penv 3.11 but it produces this error.

Ive tried to manually update FFmpeg, had to manually install 5.1.3 which is now running but its still errors out.

cant pip install av or pip install ha-av either. produces the same error. Any pointers?

2nd error, SOCO has been resolved using the text provided.

Logger: homeassistant.util.package
Source: util/package.py:107
First occurred: 15:29:04 (6 occurrences)
Last logged: 15:31:48

Unable to install package ha-av==10.0.0: error: subprocess-exited-with-error × Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> [2 lines of output] pkg-config returned flags we don't understand: -pthread -pthread -pthread Building PyAV against static FFmpeg libraries is not supported. [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error × Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> See above for output. note: This error originates from a subprocess, and is likely not a problem with pip.
Unable to install package soco==0.29.1: error: subprocess-exited-with-error × python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [3 lines of output] Building lxml version 4.9.2. Building without Cython. Error: Please make sure the libxml2 and libxslt development packages are installed. [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed × Encountered error while generating package metadata. ╰─> See above for output. note: This is an issue with the package mentioned above, not pip. hint: See above for details.

What output do you get if you try to install ha-av==10.0.0 manually?

pip install --upgrade ha-av==10.0.0

Same error. Ive spent the afternoon trying to apt install ffmpeg higher then the standard 4.3 but i cant find any way since i found a website saying ha va requires ffmpeg 5.0 or higher. But now HA is crashing he system.

Right, but what error do you get? Trying to install it manually should give you a lot more output.

the error is attached below, and by manual install you mean pip install ha-av?

since yesterday i´ve switched out my manual installation that had zero config flags with the john van sickle prepackaged ffmpeg. version now return 6.3 or something like that.

it returns the same basic error. I´ve downgraded back to HA 2023.3.6 since 2023.4 kept crashing my RPI

(venv_3.11.0) homeassistant@raspberrypi:/home/kexan $ pip install ha-av
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting ha-av
  Using cached ha-av-10.0.1.tar.gz (2.5 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [2 lines of output]
      pkg-config returned flags we don't understand: -pthread -pthread -pthread
      Building PyAV against static FFmpeg libraries is not supported.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

this is what ffmpeg returns on -version

(venv_3.11.0) homeassistant@raspberrypi:/home/kexan $ ffmpeg -version
ffmpeg version N-65014-g7c130d6911-static https://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2023 the FFmpeg developers
built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516
configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libfribidi --enable-libass --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libxml2 --enable-libxvid --enable-libzimg
libavutil      58.  3.100 / 58.  3.100
libavcodec     60.  6.101 / 60.  6.101
libavformat    60.  4.100 / 60.  4.100
libavdevice    60.  2.100 / 60.  2.100
libavfilter     9.  4.100 /  9.  4.100
libswscale      7.  2.100 /  7.  2.100
libswresample   4. 11.100 /  4. 11.100
libpostproc    57.  2.100 / 57.  2.100

this issue applies:

Building PyAV against static FFmpeg libraries is not supported

so, i should rebuild ffmpeg using the config flags shown in the end? the shared one?

im struggling to get it to work, ive gotten it to build my own but its lacking config flags.

i just realised the HA AV req is above 4.3 but support for 5.0 , not 5.1 as i installed. trying --disable-static and --enable-shared for a compilation of 4.4 and hopefully that will work.

I have the same problem. Did this solve your problem and can your provide a few more details, what you did?

Try

sudo apt-get install libavcodec-dev libavformat-dev libavfilter-dev libavdevice-dev

this fixed my issue.

download ffmpeg 4.4 and follow the guide to prepare it. Use the options --disable-static --enable-shared and then comple and it install. It worked for me as i remember. I tired the next day of all the issues with a venv solution and bought a used Intel nuc for hassio.

I have the same problem but I don’t undenstand the procedure to solve it

Collecting ha-av

Using cached ha-av-10.1.0.tar.gz (2.5 MB)

Installing build dependencies … done

Getting requirements to build wheel … error

error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.

│ exit code: 1

╰─> [2 lines of output]

pkg-config returned flags we don’t understand: -pthread -pthread -pthread

Building PyAV against static FFmpeg libraries is not supported.

[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.

error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.

│ exit code: 1

╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

Hi @Maury77, follow the solution here:

I try It but OS don’t compile for problem with mmal module not find…

i know its the worst kind of advice but spending a little to get a dedicated server to run it on is golden. really makes everything a ton easier.