conda-forge / ffmpeg-feedstock

A conda-smithy repository for ffmpeg.
BSD 3-Clause "New" or "Revised" License
14 stars 44 forks source link

screen capture codec (x11grab) not working on Linux #84

Open leonyu opened 4 years ago

leonyu commented 4 years ago

Issue: screen capture codec (x11grab) not working on Linux

ffmpeg screen capture command does not appear to be enabled during compilation. When running any of the Linux commands on this page (https://trac.ffmpeg.org/wiki/Capture/Desktop), following error occurs:

ffmpeg version 4.2.3 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 7.5.0 (crosstool-NG 1.24.0.123_1667d2b)
  configuration: --prefix=/home/leonyu/miniconda3/envs/ffmpeg-wrapper --cc=/home/conda/feedstock_root/build_artifacts/ffmpeg_1590573566052/_build_env/bin/x86_64-conda_cos6-linux-gnu-cc --disable-doc --disable-openssl --enable-avresample --enable-gnutls --enable-gpl --enable-hardcoded-tables --enable-libfreetype --enable-libopenh264 --enable-libx264 --enable-pic --enable-pthreads --enable-shared --enable-static --enable-version3 --enable-zlib --enable-libmp3lame
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
Unknown input format: 'x11grab'
exit 1


Environment (conda list):

``` $ conda list # packages in environment at /home/leonyu/miniconda3/envs/ffmpeg-wrapper: # # Name Version Build Channel _libgcc_mutex 0.1 conda_forge conda-forge _openmp_mutex 4.5 0_gnu conda-forge bzip2 1.0.8 h516909a_2 conda-forge ffmpeg 4.2.3 h167e202_0 conda-forge freetype 2.10.2 he06d7ca_0 conda-forge gmp 6.2.0 he1b5a44_2 conda-forge gnutls 3.6.13 h79a8f9a_0 conda-forge lame 3.100 h14c3975_1001 conda-forge libgcc-ng 9.2.0 h24d8f2e_2 conda-forge libgomp 9.2.0 h24d8f2e_2 conda-forge libiconv 1.15 h516909a_1006 conda-forge libpng 1.6.37 hed695b0_1 conda-forge libstdcxx-ng 9.2.0 hdf63c60_2 conda-forge nettle 3.4.1 h1bed415_1002 conda-forge openh264 2.1.1 h8b12597_0 conda-forge x264 1!152.20180806 h14c3975_0 conda-forge zlib 1.2.11 h516909a_1006 conda-forge ```


Details about conda and system ( conda info ):

``` $ conda info active environment : ffmpeg-wrapper active env location : /home/leonyu/miniconda3/envs/ffmpeg-wrapper shell level : 2 user config file : /home/leonyu/.condarc populated config files : conda version : 4.8.2 conda-build version : not installed python version : 3.7.6.final.0 virtual packages : __cuda=10.2 __glibc=2.31 base environment : /home/leonyu/miniconda3 (writable) channel URLs : https://repo.anaconda.com/pkgs/main/linux-64 https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/r/linux-64 https://repo.anaconda.com/pkgs/r/noarch package cache : /home/leonyu/miniconda3/pkgs /home/leonyu/.conda/pkgs envs directories : /home/leonyu/miniconda3/envs /home/leonyu/.conda/envs platform : linux-64 user-agent : conda/4.8.2 requests/2.22.0 CPython/3.7.6 Linux/5.4.0-37-generic ubuntu/20.04 glibc/2.31 UID:GID : 1000:1000 netrc file : None offline mode : False ```
hmaarrfk commented 2 years ago

it is likely that we have to compile with x11grab

We might need to enable it with

  --enable-libxcb          enable X11 grabbing using XCB [autodetect]
  --enable-libxcb-shm      enable X11 grabbing shm communication [autodetect]
  --enable-libxcb-xfixes   enable X11 grabbing mouse rendering [autodetect]
  --enable-libxcb-shape    enable X11 grabbing shape rendering [autodetect]

https://github.com/FFmpeg/FFmpeg/blob/f912cefb8343efc511aa72963b9f66e327ec0b88/configure#L296

hmaarrfk commented 2 years ago

It seems that in recent builds it is enabled, but we aren't including libxcb as a dependency:

2022-05-20T10:37:06.0882540Z WARNING (ffmpeg,lib/libavdevice.so.59.4.100): Needed DSO lib/libxcb.so.1 found in ['libxcb']
2022-05-20T10:37:06.0883795Z WARNING (ffmpeg,lib/libavdevice.so.59.4.100): .. but ['libxcb'] not in reqs/run, (i.e. it is overlinking) (likely) or a missing dependency (less likely)
2022-05-20T10:37:06.0903480Z WARNING (ffmpeg,lib/libavdevice.so.59.4.100): Needed DSO lib/libxcb-shm.so.0 found in ['libxcb']
2022-05-20T10:37:06.0904676Z WARNING (ffmpeg,lib/libavdevice.so.59.4.100): .. but ['libxcb'] not in reqs/run, (i.e. it is overlinking) (likely) or a missing dependency (less likely)
2022-05-20T10:37:06.0921626Z WARNING (ffmpeg,lib/libavdevice.so.59.4.100): Needed DSO lib/libxcb-shape.so.0 found in ['libxcb']
2022-05-20T10:37:06.0922654Z WARNING (ffmpeg,lib/libavdevice.so.59.4.100): .. but ['libxcb'] not in reqs/run, (i.e. it is overlinking) (likely) or a missing dependency (less likely)
2022-05-20T10:37:06.0944032Z WARNING (ffmpeg,lib/libavdevice.so.59.4.100): Needed DSO lib/libxcb-xfixes.so.0 found in ['libxcb']
2022-05-20T10:37:06.0945261Z WARNING (ffmpeg,lib/libavdevice.so.59.4.100): .. but ['libxcb'] not in reqs/run, (i.e. it is overlinking) (likely) or a missing dependency (less likely)

https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=509302&view=logs&j=656edd35-690f-5c53-9ba3-09c10d0bea97&t=e5c8ab1d-8ff9-5cae-b332-e15ae582ed2d