Get the most out of your Centmin Mod LEMP stack
Become a Member

PHP-FPM FFMPEG-PHP

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by Webzero, Dec 31, 2017.

  1. Webzero

    Webzero New Member

    7
    0
    1
    Dec 31, 2017
    Ratings:
    +0
    Local Time:
    4:53 PM
    Please can someone help me to install this id.. script which above what i work more than 3 days without result
    I have Centos 6 and Centos 7 server
    but can't install ffmpeg-php on php 5.6 not in centos 6 or 7.
    on centminmod 123.09beta i get error on php -v cmd
    PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20131226/ffmpeg.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20131226/ffmpeg.so: cannot open shared object file: No such file or directory in Unknown on line 0
    but ffmpeg cmd gives
    FFmpeg version 0.6.5, Copyright (c) 2000-2010 the FFmpeg developers
    built on Jan 29 2012 17:52:15 with gcc 4.4.5 20110214 (Red Hat 4.4.5-6)
    configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --incdir=/usr/include --disable-avisynth --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC' --enable-avfilter --enable-avfilter-lavf --enable-libdc1394 --enable-libdirac --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-vdpau --enable-version3 --enable-x11grab
    libavutil 50.15. 1 / 50.15. 1
    libavcodec 52.72. 2 / 52.72. 2
    libavformat 52.64. 2 / 52.64. 2
    libavdevice 52. 2. 0 / 52. 2. 0
    libavfilter 1.19. 0 / 1.19. 0
    libswscale 0.11. 0 / 0.11. 0
    libpostproc 51. 2. 0 / 51. 2. 0
    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'

    on centminmod 123.08stable
    when i write php -v i get
    bash: php: command not found
    but on cetmnimod installed php 5.5 version
    So can someone help me to resolve this problem
    i just need any ffmpeg-php on php 5.6 and higher
    I do not have any money left so I can not hire administrators so plz

     
  2. pamamolf

    pamamolf Well-Known Member

    2,903
    261
    83
    May 31, 2014
    Ratings:
    +464
    Local Time:
    2:53 PM
    Nginx-1.13.x
    MariaDB 10.1.x
    It will be much better to use Centminmod 123.09 and test it there :)
     
  3. Webzero

    Webzero New Member

    7
    0
    1
    Dec 31, 2017
    Ratings:
    +0
    Local Time:
    4:53 PM
    i used on both
    i get error from Centminmod 123.09 php-v cmd
    PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20131226/ffmpeg.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20131226/ffmpeg.so: cannot open shared object file: No such file or directory in Unknown on line 0
     
  4. Webzero

    Webzero New Member

    7
    0
    1
    Dec 31, 2017
    Ratings:
    +0
    Local Time:
    4:53 PM
    i used on both
    i get error from Centminmod 123.09 php-v cmd
    PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20131226/ffmpeg.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20131226/ffmpeg.so: cannot open shared object file: No such file or directory in Unknown on line 0
    and why is not installed ffmpeg 0.7 ..
     
  5. Webzero

    Webzero New Member

    7
    0
    1
    Dec 31, 2017
    Ratings:
    +0
    Local Time:
    4:53 PM
    i ready to reinstall it from null
    can someone provide fully work guide?
    on any centos on any mod
     
  6. pamamolf

    pamamolf Well-Known Member

    2,903
    261
    83
    May 31, 2014
    Ratings:
    +464
    Local Time:
    2:53 PM
    Nginx-1.13.x
    MariaDB 10.1.x
    After installing the ffmpeg script you must install the related php extension also from Centminmod menu:

    Code:
    19). Install FFMPEG and FFMPEG PHP Extension
     
  7. Webzero

    Webzero New Member

    7
    0
    1
    Dec 31, 2017
    Ratings:
    +0
    Local Time:
    4:53 PM
    I did this 3 times .with Centminmod 123.09beta and with Centminmod 123.08stable
    Also i tried Centos 7 too for it
    something missed on script maybe
    becasue i just install it from null then from centmin menu used 19 option and installed ffmpeg.but no php 5.6 is not see it.
     
  8. Webzero

    Webzero New Member

    7
    0
    1
    Dec 31, 2017
    Ratings:
    +0
    Local Time:
    4:53 PM
  9. eva2000

    eva2000 Administrator Staff Member

    31,657
    7,032
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,639
    Local Time:
    10:53 PM
    Nginx 1.13.x
    MariaDB 5.5
    Quite possible that the ffmpeg php extension is broken again as from that thread you can see the developer of the extensions no longer updates the code for ffmpeg php extension. To see what error it has during install need to troubleshoot.

    Each centmin.sh menu option auto logs it runs to a log file in /root/centminlogs directory so find one related ti ffmpeg-php run from centmin.sh menu option 19 and copy and paste the contents of the log to a pastebin.com or gist.github.com entry and provide the link to the entry

    Also what web apps are you using ffmpeg for as you nay not need ffmpeg-php extension and only require ffmpeg itself which centmin.sh menu option 19 would install ok.

    Xenforo + FFMPEG Requirements



    If you only need FFMPEG for Xenforo XMG usage, then using FFMPEG static binaries without FFMPEG php extension compiled is okay. See Xenforo - Xenforo Media Gallery & FFMPEG Binary | Centmin Mod Community
     
    • Informative Informative x 1
  10. Webzero

    Webzero New Member

    7
    0
    1
    Dec 31, 2017
    Ratings:
    +0
    Local Time:
    4:53 PM
    ffmpeg - Pastebin.com
    ffmpeg-php extension log here where i get error
    No i need ffmpeg-php extension for script which work onlys with php 5.6 and higher.....
     
  11. eva2000

    eva2000 Administrator Staff Member

    31,657
    7,032
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,639
    Local Time:
    10:53 PM
    Nginx 1.13.x
    MariaDB 5.5
    looks like maybe not related entirely to ffmpeg-php extension but failed failed ffmpeg binary install due to failed dependency installs as some of addons/ffmpeg.sh download urls needed updated and version requirements have been raised i.e. nasm 2.13 is required while centos 7 yum only has nasm 2.10.

    I am working on updating addons/ffmpeg.sh so give me 24-72hrs to test a few things out and see if I can update stuff.
     
  12. eva2000

    eva2000 Administrator Staff Member

    31,657
    7,032
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,639
    Local Time:
    10:53 PM
    Nginx 1.13.x
    MariaDB 5.5
    @Webzero

    in Centmin Mod 123.09beta01 latest updated code managed to fix ffmpeg binary install routine but ffmpeg-php extension is no more it seems it fails to compile with latest ffmpeg binary as ffmpeg-php developer has abandoned updates :(

    relevant updates
    so update to latest 123.09beta01 before re-running centmin.sh menu option 19 submenu option 1

    Upgrading Centmin Mod Code to Latest Version



    Getting Started Guide step 19 outlines also how to keep Centmin Mod code updated or how to switch version branches or you can run cmupdate command that was recently added.

    Centmin Mod LEMP stack's script code is constantly updated for improvements, bug fixes and security fixes so keeping the Centmin Mod code up to date is important. With Centmin Mod 1.2.3-eva2000.08) (123.08stable) and higher releases, a newly added centmin.sh menu option 23 allows much easier code updates and version branch swicthing via Git backed environment you can setup. For full details read the following links:
    Upgrading Centmin Mod involves 2 parts.
    1. Upgrading the actual Centmin Mod code outlined at Upgrade Centmin Mod. This is heart of Centmin Mod where the code is the engine that runs centmin.sh shell based menu and all the automation you're accustomed to. You can easily update within a Centmin Mod version branch or switch version branches via centmin.sh menu option 23 outlined here.
    2. Upgrade software that Centmin Mod installed or manages. For this part following outline at How to upgrade Centmin Mod software installed on your server.
     
  13. eva2000

    eva2000 Administrator Staff Member

    31,657
    7,032
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,639
    Local Time:
    10:53 PM
    Nginx 1.13.x
    MariaDB 5.5
    FYI, here's actual ffmpeg-php extension compilation errors if anyone was curious and/or has the coding chops to fork the ffmpeg-php extension code at tony2001 (Antony Dovgal) · GitHub and code fixes/updates to work with latest ffmpeg binaries.
    Code (Text):
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c: In function ‘_php_get_stream_index’:
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c:146:17: warning: ‘codec’ is deprecated (declared at /opt/ffmpeg/include/libavformat/avformat.h:876) [-Wdeprecated-declarations]
                     GET_CODEC_FIELD(fmt_ctx->streams[i]->codec, codec_type) == type) {
                     ^
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c: In function ‘_php_get_decoder_context’:
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c:479:9: warning: ‘codec’ is deprecated (declared at /opt/ffmpeg/include/libavformat/avformat.h:876) [-Wdeprecated-declarations]
             decoder = avcodec_find_decoder(GET_CODEC_FIELD(
             ^
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c:490:13: warning: ‘codec’ is deprecated (declared at /opt/ffmpeg/include/libavformat/avformat.h:876) [-Wdeprecated-declarations]
                 GET_CODEC_PTR(ffmovie_ctx->fmt_ctx->streams[stream_index]->codec);
                 ^
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c: In function ‘_php_get_framerate’:
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c:638:5: warning: ‘codec’ is deprecated (declared at /opt/ffmpeg/include/libavformat/avformat.h:876) [-Wdeprecated-declarations]
         if (GET_CODEC_FIELD(st->codec, codec_type) == AVMEDIA_TYPE_VIDEO){
         ^
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c:642:13: warning: ‘codec’ is deprecated (declared at /opt/ffmpeg/include/libavformat/avformat.h:876) [-Wdeprecated-declarations]
                 rate = 1 / av_q2d(GET_CODEC_FIELD(st->codec, time_base));
                 ^
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c: In function ‘_php_get_framewidth’:
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c:718:5: warning: ‘codec’ is deprecated (declared at /opt/ffmpeg/include/libavformat/avformat.h:876) [-Wdeprecated-declarations]
         return GET_CODEC_FIELD(st->codec, width);
         ^
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c: In function ‘_php_get_frameheight’:
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c:746:5: warning: ‘codec’ is deprecated (declared at /opt/ffmpeg/include/libavformat/avformat.h:876) [-Wdeprecated-declarations]
         return GET_CODEC_FIELD(st->codec, height);
         ^
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c: In function ‘_php_get_codec_name’:
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c:921:27: error: ‘AVCodecContext’ has no member named ‘codec_name’
         } else if (decoder_ctx->codec_name[0] != '\0') {
                               ^
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c:922:33: error: ‘AVCodecContext’ has no member named ‘codec_name’
             codec_name = decoder_ctx->codec_name;
                                     ^
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c: In function ‘_php_read_av_frame’:
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c:1171:11: warning: assignment makes pointer from integer without a cast [enabled by default]
         frame = avcodec_alloc_frame();
               ^
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c:1177:13: warning: ‘avcodec_decode_video2’ is deprecated (declared at /opt/ffmpeg/include/libavcodec/avcodec.h:4664) [-Wdeprecated-declarations]
                 avcodec_decode_video2(decoder_ctx, frame, &got_frame, &packet);
                 ^
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c:1182:17: warning: ‘av_free_packet’ is deprecated (declared at /opt/ffmpeg/include/libavcodec/avcodec.h:4336) [-Wdeprecated-declarations]
                     av_free_packet(&packet);
                     ^
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c:1188:9: warning: ‘av_free_packet’ is deprecated (declared at /opt/ffmpeg/include/libavcodec/avcodec.h:4336) [-Wdeprecated-declarations]
             av_free_packet(&packet);
             ^
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c: In function ‘_php_get_ff_frame’:
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c:1294:28: warning: assignment makes pointer from integer without a cast [enabled by default]
             ff_frame->av_frame = avcodec_alloc_frame();
                                ^
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c:1295:9: warning: ‘avpicture_alloc’ is deprecated (declared at /opt/ffmpeg/include/libavcodec/avcodec.h:5303) [-Wdeprecated-declarations]
             avpicture_alloc((AVPicture*)ff_frame->av_frame, ff_frame->pixel_format,
             ^
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c:1301:9: warning: ‘av_picture_copy’ is deprecated (declared at /opt/ffmpeg/include/libavcodec/avcodec.h:5336) [-Wdeprecated-declarations]
             av_picture_copy((AVPicture*)ff_frame->av_frame,
             ^
    /svr-setup/ffmpeg-php-git/ffmpeg_frame.c: In function ‘_php_convert_frame’:
    /svr-setup/ffmpeg-php-git/ffmpeg_frame.c:215:5: warning: ‘avpicture_alloc’ is deprecated (declared at /opt/ffmpeg/include/libavcodec/avcodec.h:5303) [-Wdeprecated-declarations]
         avpicture_alloc((AVPicture*)dst_frame, dst_fmt, ff_frame->width,
         ^
    /svr-setup/ffmpeg-php-git/ffmpeg_frame.c: In function ‘_php_resample_frame’:
    /svr-setup/ffmpeg-php-git/ffmpeg_frame.c:515:5: warning: ‘avpicture_alloc’ is deprecated (declared at /opt/ffmpeg/include/libavcodec/avcodec.h:5303) [-Wdeprecated-declarations]
         avpicture_alloc((AVPicture*)resampled_frame, AV_PIX_FMT_YUV420P,
         ^
    make: *** [ffmpeg_movie.lo] Error 1
    make: *** Waiting for unfinished jobs....
    /bin/sh /svr-setup/ffmpeg-php-git/libtool --mode=compile ccache gcc  -I. -I/svr-setup/ffmpeg-php-git -DPHP_ATOM_INC -I/svr-setup/ffmpeg-php-git/include -I/svr-setup/ffmpeg-php-git/main -I/svr-setup/ffmpeg-php-git -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib  -I/opt/ffmpeg/include -DHAVE_CONFIG_H  -g -O2   -c /svr-setup/ffmpeg-php-git/ffmpeg_movie.c -o ffmpeg_movie.lo 
     ccache gcc -I. -I/svr-setup/ffmpeg-php-git -DPHP_ATOM_INC -I/svr-setup/ffmpeg-php-git/include -I/svr-setup/ffmpeg-php-git/main -I/svr-setup/ffmpeg-php-git -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/opt/ffmpeg/include -DHAVE_CONFIG_H -g -O2 -c /svr-setup/ffmpeg-php-git/ffmpeg_movie.c  -fPIC -DPIC -o .libs/ffmpeg_movie.o
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c: In function ‘_php_get_stream_index’:
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c:146:17: warning: ‘codec’ is deprecated (declared at /opt/ffmpeg/include/libavformat/avformat.h:876) [-Wdeprecated-declarations]
                     GET_CODEC_FIELD(fmt_ctx->streams[i]->codec, codec_type) == type) {
                     ^
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c: In function ‘_php_get_decoder_context’:
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c:479:9: warning: ‘codec’ is deprecated (declared at /opt/ffmpeg/include/libavformat/avformat.h:876) [-Wdeprecated-declarations]
             decoder = avcodec_find_decoder(GET_CODEC_FIELD(
             ^
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c:490:13: warning: ‘codec’ is deprecated (declared at /opt/ffmpeg/include/libavformat/avformat.h:876) [-Wdeprecated-declarations]
                 GET_CODEC_PTR(ffmovie_ctx->fmt_ctx->streams[stream_index]->codec);
                 ^
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c: In function ‘_php_get_framerate’:
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c:638:5: warning: ‘codec’ is deprecated (declared at /opt/ffmpeg/include/libavformat/avformat.h:876) [-Wdeprecated-declarations]
         if (GET_CODEC_FIELD(st->codec, codec_type) == AVMEDIA_TYPE_VIDEO){
         ^
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c:642:13: warning: ‘codec’ is deprecated (declared at /opt/ffmpeg/include/libavformat/avformat.h:876) [-Wdeprecated-declarations]
                 rate = 1 / av_q2d(GET_CODEC_FIELD(st->codec, time_base));
                 ^
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c: In function ‘_php_get_framewidth’:
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c:718:5: warning: ‘codec’ is deprecated (declared at /opt/ffmpeg/include/libavformat/avformat.h:876) [-Wdeprecated-declarations]
         return GET_CODEC_FIELD(st->codec, width);
         ^
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c: In function ‘_php_get_frameheight’:
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c:746:5: warning: ‘codec’ is deprecated (declared at /opt/ffmpeg/include/libavformat/avformat.h:876) [-Wdeprecated-declarations]
         return GET_CODEC_FIELD(st->codec, height);
         ^
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c: In function ‘_php_get_codec_name’:
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c:921:27: error: ‘AVCodecContext’ has no member named ‘codec_name’
         } else if (decoder_ctx->codec_name[0] != '\0') {
                               ^
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c:922:33: error: ‘AVCodecContext’ has no member named ‘codec_name’
             codec_name = decoder_ctx->codec_name;
                                     ^
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c: In function ‘_php_read_av_frame’:
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c:1171:11: warning: assignment makes pointer from integer without a cast [enabled by default]
         frame = avcodec_alloc_frame();
               ^
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c:1177:13: warning: ‘avcodec_decode_video2’ is deprecated (declared at /opt/ffmpeg/include/libavcodec/avcodec.h:4664) [-Wdeprecated-declarations]
                 avcodec_decode_video2(decoder_ctx, frame, &got_frame, &packet);
                 ^
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c:1182:17: warning: ‘av_free_packet’ is deprecated (declared at /opt/ffmpeg/include/libavcodec/avcodec.h:4336) [-Wdeprecated-declarations]
                     av_free_packet(&packet);
                     ^
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c:1188:9: warning: ‘av_free_packet’ is deprecated (declared at /opt/ffmpeg/include/libavcodec/avcodec.h:4336) [-Wdeprecated-declarations]
             av_free_packet(&packet);
             ^
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c: In function ‘_php_get_ff_frame’:
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c:1294:28: warning: assignment makes pointer from integer without a cast [enabled by default]
             ff_frame->av_frame = avcodec_alloc_frame();
                                ^
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c:1295:9: warning: ‘avpicture_alloc’ is deprecated (declared at /opt/ffmpeg/include/libavcodec/avcodec.h:5303) [-Wdeprecated-declarations]
             avpicture_alloc((AVPicture*)ff_frame->av_frame, ff_frame->pixel_format,
             ^
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c:1301:9: warning: ‘av_picture_copy’ is deprecated (declared at /opt/ffmpeg/include/libavcodec/avcodec.h:5336) [-Wdeprecated-declarations]
             av_picture_copy((AVPicture*)ff_frame->av_frame,
             ^
    make: *** [ffmpeg_movie.lo] Error 1
    grep: /etc/centminmod/php.d/ffmpeg.ini: No such file or directory