PyAV 8.1.0 wheel fails to open a x11grab device
Created by: relent95
Overview
In PyAV 8.1.0 wheel, av.open() fails when a x11grab device is opened.
Expected behavior
It should succeed.
Actual behavior
A ValueError saying "no container format 'x11grab'" is raised.
Traceback:
Traceback (most recent call last):
File "t.py", line 4, in <module>
con = av.open(os.environ['DISPLAY'] + '.0', mode = 'r', format = 'x11grab',
File "av/container/core.pyx", line 354, in av.container.core.open
File "av/container/core.pyx", line 132, in av.container.core.Container.__cinit__
File "av/format.pyx", line 90, in av.format.ContainerFormat.__cinit__
ValueError: no container format 'x11grab'
Investigation
It worked at least on PyAV 8.0.2. I guess that ffmpeg libraries(libavformat, libavdevice, ...) included in the wheel was not compiled with x11grab support. I noticed that python3 -m av --version
says explicitly --disable-libxcb
. I wonder if that's an intentional one. If it is, IMHO it would be better to be mentioned on the installation instruction.
Reproduction
Run the following test code.
import os
import av
con = av.open(os.environ['DISPLAY'] + '.0', mode = 'r', format = 'x11grab',
options = {'video_size': '640x480', 'framerate': '30'})
Versions
- OS: Ubuntu 20.04
- PyAV runtime:
PyAV v8.1.0
git origin: git@github.com:PyAV-Org/PyAV
git commit: v8.1.0
library configuration: --disable-doc --disable-libxcb --disable-static --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libwavpack --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-shared --enable-version3 --enable-zlib --prefix=/tmp/vendor
library license: GPL version 3 or later
libavcodec 58. 91.100
libavdevice 58. 10.100
libavfilter 7. 85.100
libavformat 58. 45.100
libavutil 56. 51.100
libswresample 3. 7.100
libswscale 5. 7.100
- PyAV build:
N/A(wheel binary)
- FFmpeg:
N/A(wheel binary)
Research
N/A
Additional context
N/A