Home Assistant release with the issue:
0.90.2
Last working Home Assistant release (if known):
none
Operating environment (Hass.io/Docker/Windows/etc.):
ubuntu 16.04, python virtenv
Component/platform:
stream
Description of problem:
Installing av==6.1.2 fails:
2019-03-28 16:00:45 ERROR (SyncWorker_31) [homeassistant.util.package] Unable to install package av==6.1.2: Failed building wheel for av
Command "/srv/homeassistant/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-cavwaujl/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-9d9v9fnh/install-record.txt --single-version-externally-managed --compile --install-headers /srv/homeassistant/include/site/python3.6/av" failed with error code 1 in /tmp/pip-install-cavwaujl/av/
2019-03-28 16:00:45 ERROR (MainThread) [homeassistant.requirements] Not initializing stream because could not install requirement av==6.1.2
2019-03-28 16:00:45 ERROR (MainThread) [homeassistant.setup] Setup failed for stream: Could not install all requirements.
manually installing:
walaj@JonLabNUC:/home/homeassistant/.homeassistant$ sudo -u homeassistant -H -s
homeassistant@JonLabNUC:~/.homeassistant$ source /srv/homeassistant/bin/activate
(homeassistant) homeassistant@JonLabNUC:~/.homeassistant$ pip3 install --upgrade av==6.1.2
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
Building wheel for av (setup.py) ... error
Complete output from command /srv/homeassistant/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-k4cfi7rb/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-jw90trfp --python-tag cp36:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/av
copying av/datasets.py -> build/lib.linux-x86_64-3.6/av
copying av/__main__.py -> build/lib.linux-x86_64-3.6/av
copying av/__init__.py -> build/lib.linux-x86_64-3.6/av
copying av/deprecation.py -> build/lib.linux-x86_64-3.6/av
creating build/lib.linux-x86_64-3.6/scratchpad
copying scratchpad/cctx_decode.py -> build/lib.linux-x86_64-3.6/scratchpad
copying scratchpad/show_frames_opencv.py -> build/lib.linux-x86_64-3.6/scratchpad
copying scratchpad/filmstrip.py -> build/lib.linux-x86_64-3.6/scratchpad
copying scratchpad/frame_seek_example.py -> build/lib.linux-x86_64-3.6/scratchpad
copying scratchpad/average.py -> build/lib.linux-x86_64-3.6/scratchpad
copying scratchpad/cctx_encode.py -> build/lib.linux-x86_64-3.6/scratchpad
copying scratchpad/second_seek_example.py -> build/lib.linux-x86_64-3.6/scratchpad
copying scratchpad/save_subtitles.py -> build/lib.linux-x86_64-3.6/scratchpad
copying scratchpad/player.py -> build/lib.linux-x86_64-3.6/scratchpad
copying scratchpad/experimental.py -> build/lib.linux-x86_64-3.6/scratchpad
copying scratchpad/resource_use.py -> build/lib.linux-x86_64-3.6/scratchpad
copying scratchpad/seekmany.py -> build/lib.linux-x86_64-3.6/scratchpad
copying scratchpad/graph.py -> build/lib.linux-x86_64-3.6/scratchpad
copying scratchpad/encode.py -> build/lib.linux-x86_64-3.6/scratchpad
copying scratchpad/__init__.py -> build/lib.linux-x86_64-3.6/scratchpad
copying scratchpad/merge-filmstrip.py -> build/lib.linux-x86_64-3.6/scratchpad
copying scratchpad/glproxy.py -> build/lib.linux-x86_64-3.6/scratchpad
copying scratchpad/qtproxy.py -> build/lib.linux-x86_64-3.6/scratchpad
copying scratchpad/encode_frames.py -> build/lib.linux-x86_64-3.6/scratchpad
copying scratchpad/audio.py -> build/lib.linux-x86_64-3.6/scratchpad
copying scratchpad/remux.py -> build/lib.linux-x86_64-3.6/scratchpad
copying scratchpad/audio_player.py -> build/lib.linux-x86_64-3.6/scratchpad
copying scratchpad/decode.py -> build/lib.linux-x86_64-3.6/scratchpad
copying scratchpad/decode_threads.py -> build/lib.linux-x86_64-3.6/scratchpad
copying scratchpad/dump_format.py -> build/lib.linux-x86_64-3.6/scratchpad
creating build/lib.linux-x86_64-3.6/av/data
copying av/data/__init__.py -> build/lib.linux-x86_64-3.6/av/data
creating build/lib.linux-x86_64-3.6/av/container
copying av/container/__init__.py -> build/lib.linux-x86_64-3.6/av/container
creating build/lib.linux-x86_64-3.6/av/subtitles
copying av/subtitles/__init__.py -> build/lib.linux-x86_64-3.6/av/subtitles
creating build/lib.linux-x86_64-3.6/av/filter
copying av/filter/__init__.py -> build/lib.linux-x86_64-3.6/av/filter
creating build/lib.linux-x86_64-3.6/av/video
copying av/video/__init__.py -> build/lib.linux-x86_64-3.6/av/video
creating build/lib.linux-x86_64-3.6/av/audio
copying av/audio/__init__.py -> build/lib.linux-x86_64-3.6/av/audio
creating build/lib.linux-x86_64-3.6/av/codec
copying av/codec/__init__.py -> build/lib.linux-x86_64-3.6/av/codec
running build_ext
running config
writing build/temp.linux-x86_64-3.6/include/pyav/config.h
running cythonize
building 'av.stream' extension
creating build/temp.linux-x86_64-3.6/src
creating build/temp.linux-x86_64-3.6/src/av
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/x86_64-linux-gnu -Iinclude -I/usr/include/python3.6m -I/srv/homeassistant/include -Ibuild/temp.linux-x86_64-3.6/include -I/srv/homeassistant/include -I/usr/include/python3.6m -Ibuild/temp.linux-x86_64-3.6/include -c src/av/stream.c -o build/temp.linux-x86_64-3.6/src/av/stream.o
In file included from src/av/stream.c:678:0:
include/libavcodec/avcodec.pyav.h:4:6: error: #error FFmpeg 3.2 or higher is required
#error FFmpeg 3.2 or higher is required
^
src/av/stream.c: In function ‘__pyx_f_2av_6stream_6Stream__init’:
src/av/stream.c:2930:15: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
__pyx_t_7 = __pyx_v_self->_codec_context->codec;
^
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
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.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-k4cfi7rb/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-3e2qg8l6/install-record.txt --single-version-externally-managed --compile --install-headers /srv/homeassistant/include/site/python3.6/av:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/av
copying av/datasets.py -> build/lib.linux-x86_64-3.6/av
copying av/__main__.py -> build/lib.linux-x86_64-3.6/av
copying av/__init__.py -> build/lib.linux-x86_64-3.6/av
copying av/deprecation.py -> build/lib.linux-x86_64-3.6/av
creating build/lib.linux-x86_64-3.6/scratchpad
copying scratchpad/cctx_decode.py -> build/lib.linux-x86_64-3.6/scratchpad
copying scratchpad/show_frames_opencv.py -> build/lib.linux-x86_64-3.6/scratchpad
copying scratchpad/filmstrip.py -> build/lib.linux-x86_64-3.6/scratchpad
copying scratchpad/frame_seek_example.py -> build/lib.linux-x86_64-3.6/scratchpad
copying scratchpad/average.py -> build/lib.linux-x86_64-3.6/scratchpad
copying scratchpad/cctx_encode.py -> build/lib.linux-x86_64-3.6/scratchpad
copying scratchpad/second_seek_example.py -> build/lib.linux-x86_64-3.6/scratchpad
copying scratchpad/save_subtitles.py -> build/lib.linux-x86_64-3.6/scratchpad
copying scratchpad/player.py -> build/lib.linux-x86_64-3.6/scratchpad
copying scratchpad/experimental.py -> build/lib.linux-x86_64-3.6/scratchpad
copying scratchpad/resource_use.py -> build/lib.linux-x86_64-3.6/scratchpad
copying scratchpad/seekmany.py -> build/lib.linux-x86_64-3.6/scratchpad
copying scratchpad/graph.py -> build/lib.linux-x86_64-3.6/scratchpad
copying scratchpad/encode.py -> build/lib.linux-x86_64-3.6/scratchpad
copying scratchpad/__init__.py -> build/lib.linux-x86_64-3.6/scratchpad
copying scratchpad/merge-filmstrip.py -> build/lib.linux-x86_64-3.6/scratchpad
copying scratchpad/glproxy.py -> build/lib.linux-x86_64-3.6/scratchpad
copying scratchpad/qtproxy.py -> build/lib.linux-x86_64-3.6/scratchpad
copying scratchpad/encode_frames.py -> build/lib.linux-x86_64-3.6/scratchpad
copying scratchpad/audio.py -> build/lib.linux-x86_64-3.6/scratchpad
copying scratchpad/remux.py -> build/lib.linux-x86_64-3.6/scratchpad
copying scratchpad/audio_player.py -> build/lib.linux-x86_64-3.6/scratchpad
copying scratchpad/decode.py -> build/lib.linux-x86_64-3.6/scratchpad
copying scratchpad/decode_threads.py -> build/lib.linux-x86_64-3.6/scratchpad
copying scratchpad/dump_format.py -> build/lib.linux-x86_64-3.6/scratchpad
creating build/lib.linux-x86_64-3.6/av/data
copying av/data/__init__.py -> build/lib.linux-x86_64-3.6/av/data
creating build/lib.linux-x86_64-3.6/av/container
copying av/container/__init__.py -> build/lib.linux-x86_64-3.6/av/container
creating build/lib.linux-x86_64-3.6/av/subtitles
copying av/subtitles/__init__.py -> build/lib.linux-x86_64-3.6/av/subtitles
creating build/lib.linux-x86_64-3.6/av/filter
copying av/filter/__init__.py -> build/lib.linux-x86_64-3.6/av/filter
creating build/lib.linux-x86_64-3.6/av/video
copying av/video/__init__.py -> build/lib.linux-x86_64-3.6/av/video
creating build/lib.linux-x86_64-3.6/av/audio
copying av/audio/__init__.py -> build/lib.linux-x86_64-3.6/av/audio
creating build/lib.linux-x86_64-3.6/av/codec
copying av/codec/__init__.py -> build/lib.linux-x86_64-3.6/av/codec
running build_ext
running config
writing build/temp.linux-x86_64-3.6/include/pyav/config.h
running cythonize
building 'av.stream' extension
creating build/temp.linux-x86_64-3.6/src
creating build/temp.linux-x86_64-3.6/src/av
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/x86_64-linux-gnu -Iinclude -I/srv/homeassistant/include -I/usr/include/python3.6m -Ibuild/temp.linux-x86_64-3.6/include -I/srv/homeassistant/include -I/usr/include/python3.6m -Ibuild/temp.linux-x86_64-3.6/include -c src/av/stream.c -o build/temp.linux-x86_64-3.6/src/av/stream.o
In file included from src/av/stream.c:678:0:
include/libavcodec/avcodec.pyav.h:4:6: error: #error FFmpeg 3.2 or higher is required
#error FFmpeg 3.2 or higher is required
^
src/av/stream.c: In function ‘__pyx_f_2av_6stream_6Stream__init’:
src/av/stream.c:2930:15: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
__pyx_t_7 = __pyx_v_self->_codec_context->codec;
^
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "/srv/homeassistant/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-k4cfi7rb/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-3e2qg8l6/install-record.txt --single-version-externally-managed --compile --install-headers /srv/homeassistant/include/site/python3.6/av" failed with error code 1 in /tmp/pip-install-k4cfi7rb/av/
Actual version of ffmpeg installed is 2.8.15
```
more details at https://docs.mikeboers.com/pyav/develop/installation.html
Make sure you check out the docs and follow the troubleshooting section for the component:
https://www.home-assistant.io/components/stream/#troubleshooting
The error log clearly state
FFmpeg 3.2 or higher is required
You find a simple guide here to install ffmpeg https://www.home-assistant.io/components/ffmpeg
Make sure you check out the docs and follow the troubleshooting section for the component:
Which doesn't tell you that you need ffmpeg >= 3.2 - hence my logging it here.
You find a simple guide here to install ffmpeg https://www.home-assistant.io/components/ffmpeg
for rpi. yes. For ubuntu 16.04, nope. But https://docs.mikeboers.com/pyav/develop/installation.html itself tells you what is required. Maybe this needs to be added to the Stream docs?
@jonwaland if you can run those steps, then update the docs here: https://www.home-assistant.io/components/stream
i have same error. Please help! i follow https://www.home-assistant.io/components/stream/#troubleshooting install success but still error
019-04-24 16:25:28 ERROR (SyncWorker_1) [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-pg3_z0gs/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-vlfw9xvw/install-record.txt --single-version-externally-managed --compile --install-headers /srv/homeassistant/include/site/python3.6/av" failed with error code 1 in /tmp/pip-install-pg3_z0gs/av/
2019-04-24 16:25:28 ERROR (MainThread) [homeassistant.requirements] Not initializing stream because could not install requirement av==6.1.2
2019-04-24 16:25:28 ERROR (MainThread) [homeassistant.setup] Setup failed for stream: Could not install all requirements.
@hoatienii - take a look at https://docs.mikeboers.com/pyav/develop/installation.html
@hoatienii - take a look at https://docs.mikeboers.com/pyav/develop/installation.html
Thanks you much your reply, it work now!
Most helpful comment
@hoatienii - take a look at https://docs.mikeboers.com/pyav/develop/installation.html