core: Stream component does not work. (Component error: stream - Requirements for stream not found: [‘av == 6.1.2’])
Home Assistant release with the issue:
arch - armv7 dev - false docker - false hassio - false os name - Linux python version - 3.7.3 version - 0.98.5 virtualenv - true
Operating environment (Hass.io/Docker/Windows/etc.): Home assistant virtualenv (Raspberry PI)
Description of problem: Hello. I have problems with the stream component. I have never used it and want to configure it. I include this component in the configuration file. I do a configuration check. I have such an error:
“Configuration invalid Component error: stream - Requirements for stream not found: [‘av == 6.1.2’]”.
The ffmpeg component is installed. The cameras are work:
$ ffmpeg -i INPUT -an -f null -
ffmpeg version N-94610-g9bcb1cb6ed Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 8 (Raspbian 8.3.0-6 + rpi1)
configuration: --arch = armel --target-os = linux --enable-gpl --enable-libx264 --enable-nonfree
libavutil 56.33.100 / 56.33.100
libavcodec 58. 55.100 / 58. 55.100
libavformat 58.31.101 / 58.31.101
libavdevice 58.9.100 / 58.9.100
libavfilter 7. 58.100 / 7. 58.100
libswscale 5. 6.100 / 5. 6.100
libswresample 3. 6.100 / 3. 6.100
libpostproc 55.6.100 / 55.600
INPUT: No such file or directory
All dependencies are installed In the log the following error:
2019-09-18 08:28:11 ERROR (SyncWorker_5) [homeassistant.util.package] Unable to install package av == 6.1.2: Failed building wheel for av
Command “/ srv / homeassistant / bin / python3 -u -c” import setuptools, tokenize; __ file __ = ‘/ tmp / pip-install-55s03uo5 / av / setup.py’; f = getattr (tokenize, ‘open’, open ) (__ file __); code = f.read (). replace (’\ r \ n’, ‘\ n’); f.close (); exec (compile (code, file, ‘exec’)) "install - -record /tmp/pip-record-lzi8uto4/install-record.txt --single-version-externally-managed
–compile --install-headers /srv/homeassistant/include/site/python3.7/av "failed with error code 1 in / tmp / pip-install-55s03uo5 / av /`
**I switched the Python version from 2 to 3. The problem is not resolved.**
`~ $ python --version
Python 3.7.3
I executed the following command, and that’s what I got:
(homeassistant) homeassistant@raspberrypi:/home/pi $ pip3 install --upgrade av==6.1.2
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting av==6.1.2
Using cached https://files.pythonhosted.org/packages/05/e4/205b787753d25da5d927b59b7cf59c0b7563e3d18f35d228101658792c05/av-6.1.2.tar.gz
Building wheels for collected packages: av
Running setup.py bdist_wheel for av ... error
Complete output from command /srv/homeassistant/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-c75qlob2/av/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-uclg7cwl --python-tag cp37:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-armv7l-3.7
creating build/lib.linux-armv7l-3.7/av
copying av/datasets.py -> build/lib.linux-armv7l-3.7/av
copying av/__main__.py -> build/lib.linux-armv7l-3.7/av
copying av/__init__.py -> build/lib.linux-armv7l-3.7/av
copying av/deprecation.py -> build/lib.linux-armv7l-3.7/av
creating build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/cctx_encode.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/merge-filmstrip.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/glproxy.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/encode_frames.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/remux.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/decode_threads.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/second_seek_example.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/encode.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/qtproxy.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/audio_player.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/show_frames_opencv.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/average.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/decode.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/save_subtitles.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/cctx_decode.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/graph.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/player.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/filmstrip.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/__init__.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/audio.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/dump_format.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/experimental.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/frame_seek_example.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/resource_use.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/seekmany.py -> build/lib.linux-armv7l-3.7/scratchpad
creating build/lib.linux-armv7l-3.7/av/audio
copying av/audio/__init__.py -> build/lib.linux-armv7l-3.7/av/audio
creating build/lib.linux-armv7l-3.7/av/container
copying av/container/__init__.py -> build/lib.linux-armv7l-3.7/av/container
creating build/lib.linux-armv7l-3.7/av/codec
copying av/codec/__init__.py -> build/lib.linux-armv7l-3.7/av/codec
creating build/lib.linux-armv7l-3.7/av/data
copying av/data/__init__.py -> build/lib.linux-armv7l-3.7/av/data
creating build/lib.linux-armv7l-3.7/av/video
copying av/video/__init__.py -> build/lib.linux-armv7l-3.7/av/video
creating build/lib.linux-armv7l-3.7/av/filter
copying av/filter/__init__.py -> build/lib.linux-armv7l-3.7/av/filter
creating build/lib.linux-armv7l-3.7/av/subtitles
copying av/subtitles/__init__.py -> build/lib.linux-armv7l-3.7/av/subtitles
running build_ext
running config
pkg-config returned flags we don't understand: -pthread -pthread
Failed building wheel for av
Running setup.py clean for av
Failed to build av
Installing collected packages: av
Running setup.py install for av ... error
Complete output from command /srv/homeassistant/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-c75qlob2/av/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-1i_gtkhp/install-record.txt --single-version-externally-managed --compile --install-headers /srv/homeassistant/include/site/python3.7/av:
running install
running build
running build_py
creating build
creating build/lib.linux-armv7l-3.7
creating build/lib.linux-armv7l-3.7/av
copying av/datasets.py -> build/lib.linux-armv7l-3.7/av
copying av/__main__.py -> build/lib.linux-armv7l-3.7/av
copying av/__init__.py -> build/lib.linux-armv7l-3.7/av
copying av/deprecation.py -> build/lib.linux-armv7l-3.7/av
creating build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/cctx_encode.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/merge-filmstrip.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/glproxy.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/encode_frames.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/remux.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/decode_threads.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/second_seek_example.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/encode.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/qtproxy.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/audio_player.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/show_frames_opencv.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/average.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/decode.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/save_subtitles.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/cctx_decode.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/graph.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/player.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/filmstrip.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/__init__.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/audio.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/dump_format.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/experimental.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/frame_seek_example.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/resource_use.py -> build/lib.linux-armv7l-3.7/scratchpad
copying scratchpad/seekmany.py -> build/lib.linux-armv7l-3.7/scratchpad
creating build/lib.linux-armv7l-3.7/av/audio
copying av/audio/__init__.py -> build/lib.linux-armv7l-3.7/av/audio
creating build/lib.linux-armv7l-3.7/av/container
copying av/container/__init__.py -> build/lib.linux-armv7l-3.7/av/container
creating build/lib.linux-armv7l-3.7/av/codec
copying av/codec/__init__.py -> build/lib.linux-armv7l-3.7/av/codec
creating build/lib.linux-armv7l-3.7/av/data
copying av/data/__init__.py -> build/lib.linux-armv7l-3.7/av/data
creating build/lib.linux-armv7l-3.7/av/video
copying av/video/__init__.py -> build/lib.linux-armv7l-3.7/av/video
creating build/lib.linux-armv7l-3.7/av/filter
copying av/filter/__init__.py -> build/lib.linux-armv7l-3.7/av/filter
creating build/lib.linux-armv7l-3.7/av/subtitles
copying av/subtitles/__init__.py -> build/lib.linux-armv7l-3.7/av/subtitles
running build_ext
running config
pkg-config returned flags we don't understand: -pthread -pthread
Command "/srv/homeassistant/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-c75qlob2/av/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-1i_gtkhp/install-record.txt --single-version-externally-managed --compile --install-headers /srv/homeassistant/include/site/python3.7/av" failed with error code 1 in /tmp/pip-install-c75qlob2/av/
I tried uninstalling ffmpeg and reinstalling. I used RPI hardware acceleration by compiling and following most of the instructions here This solved the problem with the stream component. But the video stopped working. When you click on a preview image, the video stream does not play. Moreover, the ffmpeg has disappeared from the folder /usr/bin/ffmpeg. And in the folder /usr/local/bin/ffmpeg did not work. And I restored everything back. Help me please, what else can I do to make the component work?
Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):
stream:
ffmpeg:
ffmpeg_bin: /usr/bin/ffmpeg
Traceback (if applicable):
Additional information:
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 3
- Comments: 40 (8 by maintainers)
I did the following:
cd /home/pi/sudo apt-get install libomxil-bellagio-dev –ygit clone https://github.com/FFmpeg/FFmpeg.gitcd FFmpegsudo ./configure --enable-gpl --enable-nonfree --enable-mmal --enable-omx --enable-omx-rpi --disable-static --enable-shared --disable-docsudo make -j4sudo make installsudo rebootI started having this error after the update to HA 0.101.3. My configuration didn’t change, just updated from 0.101.2 to 0.101.3.
Configuration Entry:
This is clearly not a PyAV issue, as has been make clear by the newer posts about upgrade. This is an unforeseen upgrade problem. I don’t have access to the codebase right at this moment, but this must be an issue with a change to the stream component, so a diff on that between the 2 version would be the next step.
I get the same error, when I try to update from 0.100.2 to 0.101.3. No configuration changes. Not using the
streamcomponent.