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

Beta Branch update addons/ffmpeg.sh in 123.09beta01

Discussion in 'Centmin Mod Github Commits' started by eva2000, Dec 31, 2017.

Tags:
  1. eva2000

    eva2000 Administrator Staff Member

    31,638
    7,029
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,634
    Local Time:
    1:20 AM
    Nginx 1.13.x
    MariaDB 5.5
    update addons/ffmpeg.sh in 123.09beta01

    - broken ffmpeg dependency install fixes PHP-FPM - FFMPEG-PHP
    - nasm 2.13 is installed via official yum repo http://www.nasm.us/nasm.repo at /etc/yum.repos.d/nasm.repo instead of yum distro provided nasm version
    - this update fixes ffmpeg binary source installation at /opt/bin/ffmpeg however, ffmpeg-php extension is now broken and outdated with latest ffmpeg binary and as ffmpeg-php developer tony2001 (Antony Dovgal) · GitHub has abandoned development, there doesn't seem any change of ffmpeg-php extension working so remove the ffmpeg-php extension's ini settings file /etc/centminmod/php.d/ffmpeg.ini and restart php-fpm service to remove ffmpeg-php extension

    working ffmpeg binary

    Code (Text):
    /opt/bin/ffmpeg -version
    ffmpeg version git-2017-12-30-903be5e Copyright (c) 2000-2017 the FFmpeg developers
    built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-16)
    configuration: --prefix=/opt/ffmpeg --extra-cflags=-I/opt/ffmpeg/include --extra-ldflags=-L/opt/ffmpeg/lib --bindir=/opt/bin --pkg-config-flags=--static --extra-libs=-lpthread --extra-libs=-lm --enable-gpl --enable-nonfree --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-swscale --enable-shared
    libavutil      56.  7.100 / 56.  7.100
    libavcodec     58.  9.100 / 58.  9.100
    libavformat    58.  3.100 / 58.  3.100
    libavdevice    58.  0.100 / 58.  0.100
    libavfilter     7.  8.100 /  7.  8.100
    libswscale      5.  0.101 /  5.  0.101
    libswresample   3.  0.101 /  3.  0.101
    libpostproc    55.  0.100 / 55.  0.100
    


    Continue reading...

    123.09beta01 branch
     
    • Like Like x 1
  2. eva2000

    eva2000 Administrator Staff Member

    31,638
    7,029
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,634
    Local Time:
    1:20 AM
    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