Join the community today
Become a Member

[Solved] Unable to install FFMPEG PHP extension

Discussion in 'Bug Reports' started by Guneyd, Sep 30, 2014.

  1. RoldanLT

    RoldanLT Well-Known Member

    3,882
    947
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,291
    Local Time:
    3:22 PM
    1.11
    10.2
    But with Yum Repo, you will have the old version.
    Plus XMG just don't really need it.
    XMG only need that single binary, which is the static build.
     
  2. eva2000

    eva2000 Administrator Staff Member

    29,732
    6,713
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,023
    Local Time:
    5:22 PM
    Nginx 1.13.x
    MariaDB 5.5
    yeah Xenforo XMG doesn't need full FFMPEG stuff

    but yeah need to check that YUM Check it should of installed ATrpms.. will double check (busy playing with letsencrypt right now heh)
     
  3. eva2000

    eva2000 Administrator Staff Member

    29,732
    6,713
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,023
    Local Time:
    5:22 PM
    Nginx 1.13.x
    MariaDB 5.5
  4. jeffwidman

    jeffwidman Active Member

    152
    27
    28
    Dec 3, 2014
    Ratings:
    +51
    Local Time:
    12:22 AM
    64 bit, using Ramnode CentOS 7 minimal with all latest yum upgrades.

    If you want access to one of them, let me know I can add your SSH key. BTW, I checked here: https://github.com/centminmod.keys but looks like you don't currently have a key with Github? How are you pushing code up?
     
  5. eva2000

    eva2000 Administrator Staff Member

    29,732
    6,713
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,023
    Local Time:
    5:22 PM
    Nginx 1.13.x
    MariaDB 5.5
    private (non-public) key only :)

    FYI, everytime you do a yum check install it should have a log at /root/centminlogs/centminmod_yumtimes_TIMESTAMP.log
     
  6. jeffwidman

    jeffwidman Active Member

    152
    27
    28
    Dec 3, 2014
    Ratings:
    +51
    Local Time:
    12:22 AM
    Thanks. I checked and nothing looks amiss in the log. No unexpected errors. Searched within vim, matching on partial words, and no mention of 'atr' or 'ffm' which would match anything resembling 'atrpm' or 'ffmpeg'.
     
  7. eva2000

    eva2000 Administrator Staff Member

    29,732
    6,713
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,023
    Local Time:
    5:22 PM
    Nginx 1.13.x
    MariaDB 5.5
    • Informative Informative x 1
  8. jeffwidman

    jeffwidman Active Member

    152
    27
    28
    Dec 3, 2014
    Ratings:
    +51
    Local Time:
    12:22 AM
    FYI--booted a fresh KVM CentOS 7 node and experienced this same error when I tried to install ffmpeg. For some reason even on this fresh install it's not getting the ATrpms installed.
     
  9. eva2000

    eva2000 Administrator Staff Member

    29,732
    6,713
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,023
    Local Time:
    5:22 PM
    Nginx 1.13.x
    MariaDB 5.5
    could be atrpms is down as i can't even reach their web site at atrpms.net

    and fresh install hangs at
    Code:
    Error: atrpms-repo-6-7.el6.x86_64.rpm not found !!! Downloading now......
    Code:
    Error: atrpms-repo-6-7.el6.x86_64.rpm not found !!! Downloading now......
    Read error (Connection reset by peer) in headers.
    Error: atrpms-repo-6-7.el6.x86_64.rpm download failed.
    .
     
  10. eva2000

    eva2000 Administrator Staff Member

    29,732
    6,713
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,023
    Local Time:
    5:22 PM
    Nginx 1.13.x
    MariaDB 5.5
    Looks like atrpms.net is still down :( So will need to come up with an alternative

    seems there'a alternative download for rpm itself for atrpms.net but whether the actual downloads work needs testing

    centos 6
    Code:
    ftp://ftp.pbone.net/mirror/atrpms.net/el6-x86_64/atrpms/stable/atrpms-repo-6-7.el6.x86_64.rpm
    centos 7
    Code:
    ftp://ftp.pbone.net/mirror/atrpms.net/el7-x86_64/atrpms/stable/atrpms-repo-7-7.el7.x86_64.rpm
    or
    Code:
    ftp://ftp.pbone.net/mirror/atrpms.net/el7-x86_64/atrpms/stable/atrpms-repo-7-7.el6_90.x86_64.rpm
    centos 6 one downloads but centos 7 ones hang on download and eventually timeout
    Code:
    --2015-09-11 23:09:43--  ftp://ftp.pbone.net/mirror/atrpms.net/el7-x86_64/atrpms/stable/atrpms-repo-7-7.el6_90.x86_64.rpm
      (try: 2) => 'atrpms-repo-7-7.el6_90.x86_64.rpm'
    Connecting to ftp.pbone.net (ftp.pbone.net)|85.14.85.4|:21... connected.
    Logging in as anonymous ... Logged in!
    ==> SYST ... done.    ==> PWD ... done.
    ==> TYPE I ... done.  ==> CWD (1) /mirror/atrpms.net/el7-x86_64/atrpms/stable ... done.
    ==> SIZE atrpms-repo-7-7.el6_90.x86_64.rpm ... 8172
    ==> PASV ... couldn't connect to 85.14.85.4 port 15865: Connection timed out
    Retrying.
    for now have disabled ATrpms from install disable ATrpms YUM repo · centminmod/centminmod@bb39e84 · GitHub
     
    Last edited: Sep 12, 2015
  11. jeffwidman

    jeffwidman Active Member

    152
    27
    28
    Dec 3, 2014
    Ratings:
    +51
    Local Time:
    12:22 AM
    That's a bummer. I'm having the same issues with not reaching their server. :(

    Now, whenever I run 'nprestart' I get:
    Code:
    Starting php-fpm [12-Sep-2015 00:54:32] NOTICE: PHP message: 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
    
    It still appears to start, but is there a way to disable this? Do I just recompile PHP using #5 from centmin.sh?
     
  12. eva2000

    eva2000 Administrator Staff Member

    29,732
    6,713
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,023
    Local Time:
    5:22 PM
    Nginx 1.13.x
    MariaDB 5.5
    type
    Code:
    php --ini
    find the ffmpeg.ini path and delete it and restart php-fpm

    i am working on a ffmpeg source install addon instead so testing that :)
     
    • Informative Informative x 1
  13. eva2000

    eva2000 Administrator Staff Member

    29,732
    6,713
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,023
    Local Time:
    5:22 PM
    Nginx 1.13.x
    MariaDB 5.5
    also looking at static builds, while static builds will work for Xenforo XMG usage as it only uses ffmpeg binary, it won't work to compile FFMPEG php extesnion so that other php apps can use FFMPEG php extension as static builds do not include the headers required for php extension usage
     
    • Informative Informative x 1
  14. eva2000

    eva2000 Administrator Staff Member

    29,732
    6,713
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,023
    Local Time:
    5:22 PM
    Nginx 1.13.x
    MariaDB 5.5
    first attempt at FFMPEG source compile - takes alot longer to install but latest versions and no more reliance on buggy YUM repos !

    Code:
     /opt/bin/ffmpeg
    ffmpeg version git-2015-09-11-4b66274 Copyright (c) 2000-2015 the FFmpeg developers
      built with gcc 4.8.3 (GCC) 20140911 (Red Hat 4.8.3-9)
      configuration: --prefix=/opt/ffmpeg --extra-cflags=-I/opt/ffmpeg/include --extra-ldflags=-L/opt/ffmpeg/lib --bindir=/opt/bin --pkg-config-flags=--static --enable-gpl --enable-nonfree --enable-libfdk_aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265
      libavutil      55.  2.100 / 55.  2.100
      libavcodec     57.  1.100 / 57.  1.100
      libavformat    57.  0.100 / 57.  0.100
      libavdevice    57.  0.100 / 57.  0.100
      libavfilter     6.  1.100 /  6.  1.100
      libswscale      4.  0.100 /  4.  0.100
      libswresample   2.  0.100 /  2.  0.100
      libpostproc    54.  0.100 / 54.  0.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'
     
    • Winner Winner x 1
  15. eva2000

    eva2000 Administrator Staff Member

    29,732
    6,713
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,023
    Local Time:
    5:22 PM
    Nginx 1.13.x
    MariaDB 5.5
    hmm unfortunately seems the ffmpeg php extension isn't updated enough to work with latest source compiled ffmpeg heh :(

    Code:
    /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_codec_name’:
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c:918:41: error: ‘CODEC_ID_MPEG2TS’ undeclared (first use in this function)
         } else if (decoder_ctx->codec_id == CODEC_ID_MPEG2TS) {
                                             ^
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c:918:41: note: each undeclared identifier is reported only once for each function it appears in
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c:921:5: warning: ‘codec_name’ is deprecated (declared at /opt/ffmpeg/include/libavcodec/avcodec.h:1483) [-Wdeprecated-declarations]
         } else if (decoder_ctx->codec_name[0] != '\0') {
         ^
    /svr-setup/ffmpeg-php-git/ffmpeg_movie.c:922:9: warning: ‘codec_name’ is deprecated (declared at /opt/ffmpeg/include/libavcodec/avcodec.h:1483) [-Wdeprecated-declarations]
             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: 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();
                                ^
    make: *** [ffmpeg_movie.lo] Error 1   
     
    Last edited: Sep 12, 2015
  16. eva2000

    eva2000 Administrator Staff Member

    29,732
    6,713
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,023
    Local Time:
    5:22 PM
    Nginx 1.13.x
    MariaDB 5.5
  17. jeffwidman

    jeffwidman Active Member

    152
    27
    28
    Dec 3, 2014
    Ratings:
    +51
    Local Time:
    12:22 AM
    I haven't verified myself, but someone posted to the CentOS list that the NUX repo has FFMPEG:
    [CentOS] Is ATRPMs dead?
     
  18. eva2000

    eva2000 Administrator Staff Member

    29,732
    6,713
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,023
    Local Time:
    5:22 PM
    Nginx 1.13.x
    MariaDB 5.5
    • Informative Informative x 1
  19. Tracy Perry

    Tracy Perry Active Member

    188
    81
    28
    Aug 24, 2014
    Texas
    Ratings:
    +130
    Local Time:
    2:22 AM
    1.11.5
    MariaDB 10.0.28
    Apparently it also needs the PHP PECL to do some transcoding. @TJA has an issue that the webm video uploads apparently don't get transcoded into the correct format. It works fine with .mp4 and some others. I didn't do an extensive test on what the static ones support since I don't use it - but for sure it won't convert .webm ones. He's running on a CentOS 6.5 setup since the virtual mail configuration on CentOS 7 is a "tad" different.
    Maybe @eva2000 can get it figured out.
     
    • Informative Informative x 1
  20. eva2000

    eva2000 Administrator Staff Member

    29,732
    6,713
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,023
    Local Time:
    5:22 PM
    Nginx 1.13.x
    MariaDB 5.5
    Ah so would seem need to figure out YUM repo for suitable working FFMPEG and FFMPEG PHP extension.. one person did post there's a ATRPM yum mirror which has FFMPEG FFMPEG/ FFMPEG-PHP install no longer works · Issue #44 · centminmod/centminmod · GitHub Might need to test it, but looks like it's just a mirror with no updates, so not sure if that is a long term solution either.

    Would really love to know where atrpm.net went.. heh so if anyone comes across any info :)

    edit: yum - Is atrpms dead? - Unix & Linux Stack Exchange