[英]Laradock FFMpeg in php-fpm container
Followed the docs to install FFMpeg in laradock.按照文档在 laradock 中安装 FFMpeg。 Seems to work fine with the workspace, however following the instructions for php-fpm does not.
似乎在工作区中工作正常,但是按照 php-fpm 的说明进行操作则不然。
At first I thought it was permission thing however when I looked in the container it had not been installed.起初我认为这是许可的事情,但是当我查看尚未安装的容器时。 A manual install and everything works as it should (access binary from php).
手动安装,一切正常(从 php 访问二进制文件)。
Any ideas on how to get Laradock to provision the container with FFmpeg without hacking it each time?关于如何让 Laradock 使用 FFmpeg 配置容器而不每次都破解它的任何想法?
Thanks!谢谢!
To enable FFmpeg in php-fpm, enable it in your .env config file :要在 php-fpm 中启用 FFmpeg,请在您的 .env 配置文件中启用它:
PHP_FPM_FFMPEG=true
After building with docker-compose build
it will be installed within the php-fpm container.使用
docker-compose build
,它将安装在 php-fpm 容器中。 Docker-compose just executes apt-get -y install ffmpeg
when building. Docker-compose 在构建时只执行
apt-get -y install ffmpeg
。
Verified with latest laradock (Nov'19)用最新的 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#
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.