【问题标题】:Laradock FFMpeg in php-fpm containerphp-fpm 容器中的 Laradock FFMpeg
【发布时间】:2019-08-08 07:38:39
【问题描述】:

按照文档在 laradock 中安装 FFMpeg。似乎可以在工作区中正常工作,但是按照 php-fpm 的说明不能。

起初我认为这是许可的事情,但是当我查看容器时它还没有安装。手动安装,一切正常(从 php 访问二进制文件)。

关于如何让 Laradock 使用 FFmpeg 配置容器而不每次都破解它的任何想法?

谢谢!

【问题讨论】:

    标签: ffmpeg ffprobe laradock


    【解决方案1】:

    要在 php-fpm 中启用 FFmpeg,请在您的 .env 配置文件中启用它:

    PHP_FPM_FFMPEG=true

    使用docker-compose build 构建后,它将安装在 php-fpm 容器中。 Docker-compose 在构建时只执行apt-get -y install ffmpeg

    用最新的 laradock 验证(19 年 11 月)

    $ docker-compose up -d php-fpm
    $ docker-compose exec php-fpm bash
    root@d12d797c08da:/var/www# ffmpeg
    ffmpeg version 4.1.4-1~deb10u1 Copyright (c) 2000-2019 the FFmpeg developers
      built with gcc 8 (Debian 8.3.0-6)
      configuration: --prefix=/usr --extra-version='1~deb10u1' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
      libavutil      56. 22.100 / 56. 22.100
      libavcodec     58. 35.100 / 58. 35.100
      libavformat    58. 20.100 / 58. 20.100
      libavdevice    58.  5.100 / 58.  5.100
      libavfilter     7. 40.101 /  7. 40.101
      libavresample   4.  0.  0 /  4.  0.  0
      libswscale      5.  3.100 /  5.  3.100
      libswresample   3.  3.100 /  3.  3.100
      libpostproc    55.  3.100 / 55.  3.100
    Hyper fast Audio and Video encoder
    usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
    
    Use -h to get full help or, even better, run 'man ffmpeg'
    root@d12d797c08da:/var/www# 
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-08-21
      • 1970-01-01
      • 2021-02-23
      • 2021-04-08
      • 1970-01-01
      • 1970-01-01
      • 2018-07-17
      相关资源
      最近更新 更多