Git Product home page Git Product logo

nginx-video-thumbextractor-module's People

Contributors

flavioribeiro avatar fsouza avatar wandenberg avatar whatvn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nginx-video-thumbextractor-module's Issues

Error building nginx with --add-module=nginx-video-thumbextractor-module

The make error is:

/usr/bin/ld: cannot find -lMagickWand

I've compiled ImageMagick froum latest source on Debian Wheezy X86_64. Nginx and module are latest from git.
For workaround I use:
sed -i -e "s~-lMagickWand(-6.Q16)?-lMagickWand-6.Q16" ~/src/nginx-modules/nginx-video-thumbextractor-module/config

Crop_Ctx issue

Hi , i have a this errors.

cc -c -pipe -O -Wall -Wextra -Wpointer-arith -Wconditional-uninitialized -Wno-unused-parameter -Werror -g -I/usr/local/include -I src/core -I src/event -I src/event/modules -I src/os/unix -I ../modules/nginx-rtmp-module-master -I ../modules/nginx-video-thumbextractor-module-master/src -I ../modules/nginx-video-thumbextractor-module-master/include -I /usr/local/include/libxml2 -I /usr/local/include -I objs -I src/http -I src/http/modules -I src/http/v2 -I src/mail -I src/stream -o objs/addon/src/ngx_http_video_thumbextractor_module.o ../modules/nginx-video-thumbextractor-module-master/src/ngx_http_video_thumbextractor_module.c
In file included from ../modules/nginx-video-thumbextractor-module-master/src/ngx_http_video_thumbextractor_module.c:28:
../modules/nginx-video-thumbextractor-module-master/src/ngx_http_video_thumbextractor_module_utils.c:566:55: error: variable 'crop_ctx' may be uninitialized when used here
[-Werror,-Wconditional-uninitialized]
if (rc >= 0) rc = avfilter_link(scale_ctx, 0, crop_ctx, 0);
^~~~~~~~
../modules/nginx-video-thumbextractor-module-master/src/ngx_http_video_thumbextractor_module_utils.c:429:30: note: initialize the variable 'crop_ctx' to silence this
warning
AVFilterContext *crop_ctx;
^
= NULL
../modules/nginx-video-thumbextractor-module-master/src/ngx_http_video_thumbextractor_module_utils.c:554:47: error: variable 'transpose_ctx' may be uninitialized when used
here [-Werror,-Wconditional-uninitialized]
rc = avfilter_link(*buffersrc_ctx, 0, transpose_ctx, 0);
^~~~~~~~~~~~~
../modules/nginx-video-thumbextractor-module-master/src/ngx_http_video_thumbextractor_module_utils.c:426:35: note: initialize the variable 'transpose_ctx' to silence this
warning
AVFilterContext *transpose_ctx;
^
= NULL
../modules/nginx-video-thumbextractor-module-master/src/ngx_http_video_thumbextractor_module_utils.c:556:63: error: variable 'transpose_cw_ctx' may be uninitialized when
used here [-Werror,-Wconditional-uninitialized]
if (rc >= 0) rc = avfilter_link(transpose_ctx, 0, transpose_cw_ctx, 0);
^~~~~~~~~~~~~~~~
../modules/nginx-video-thumbextractor-module-master/src/ngx_http_video_thumbextractor_module_utils.c:427:38: note: initialize the variable 'transpose_cw_ctx' to silence
this warning
AVFilterContext *transpose_cw_ctx;
^
= NULL
3 errors generated.
*** Error code 1

Stop.
make[1]: stopped in /root/nginx-1.12.1
*** Error code 1

Stop.
make: stopped in /root/nginx-1.12.1

ffmpeg version 3.3.2 Copyright (c) 2000-2017 the FFmpeg developers
built with FreeBSD clang version 3.8.0 (tags/RELEASE_380/final 262564) (based on LLVM 3.8.0)
configuration: --prefix=/usr/local --mandir=/usr/local/man --datadir=/usr/local/share/ffmpeg --pkgconfigdir=/usr/local/libdata/pkgconfig --enable-shared --enable-pic --enable-gpl --enable-postproc --enable-avfilter --enable-avresample --enable-pthreads --cc=cc --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libass --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcelt --disable-chromaprint --enable-libdc1394 --disable-stripping --enable-htmlpages --enable-libfdk-aac --enable-ffserver --enable-libflite --enable-fontconfig --enable-libfreetype --enable-frei0r --enable-libfribidi --enable-libgme --enable-libgsm --enable-iconv --enable-libilbc --enable-libkvazaar --enable-ladspa --enable-libmp3lame --enable-libbluray --enable-mmx --enable-libmodplug --enable-netcdf --enable-openal --enable-opencl --enable-libopencv --enable-opengl --enable-libopenh264 --enable-libopenjpeg --enable-optimizations --enable-libopus --enable-libpulse --enable-runtime-cpudetect --enable-librubberband --enable-libschroedinger --enable-ffplay --disable-libsmbclient --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-sse --disable-libssh --enable-libtesseract --enable-libtheora --enable-libtwolame --enable-libv4l2 --enable-vaapi --enable-vdpau --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --disable-gcrypt --disable-gmp --enable-librtmp --disable-gnutls --enable-openssl --enable-version3 --enable-nonfree
libavutil 55. 58.100 / 55. 58.100
libavcodec 57. 89.100 / 57. 89.100
libavformat 57. 71.100 / 57. 71.100
libavdevice 57. 6.100 / 57. 6.100
libavfilter 6. 82.100 / 6. 82.100
libavresample 3. 5. 0 / 3. 5. 0
libswscale 4. 6.100 / 4. 6.100
libswresample 2. 7.100 / 2. 7.100
libpostproc 54. 5.100 / 54. 5.100

build error

../../module/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:570:55: error: variable 'crop_ctx' may be uninitialized when used here [-Werror,-Wconditional-uninitialized]
        if (rc >= 0) rc = avfilter_link(scale_ctx, 0, crop_ctx, 0);
                                                      ^~~~~~~~
../../module/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:433:30: note: initialize the variable 'crop_ctx' to silence this warning
    AVFilterContext *crop_ctx;
                             ^
                              = NULL
../../module/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:558:47: error: variable 'transpose_ctx' may be uninitialized when used here
      [-Werror,-Wconditional-uninitialized]
        rc = avfilter_link(*buffersrc_ctx, 0, transpose_ctx, 0);
                                              ^~~~~~~~~~~~~
../../module/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:430:35: note: initialize the variable 'transpose_ctx' to silence this warning
    AVFilterContext *transpose_ctx;
                                  ^
                                   = NULL
../../module/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:560:63: error: variable 'transpose_cw_ctx' may be uninitialized when used here
      [-Werror,-Wconditional-uninitialized]
            if (rc >= 0) rc = avfilter_link(transpose_ctx, 0, transpose_cw_ctx, 0);
                                                              ^~~~~~~~~~~~~~~~
../../module/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:431:38: note: initialize the variable 'transpose_cw_ctx' to silence this warning
    AVFilterContext *transpose_cw_ctx;

Generate "storyboard" of a given video

I took a look at Youtube thumbs preview and could notice that they create a single image with frames concatenated, like the image below:

image

This leads to a more fluid seekbar navigation since the frames appear faster (just changing the visible window in css, in case the seekbar is made by DOM elements, for example). I'm wondering if it's possible to create this feature inside the module itself, what do you think?

on windows

does nginx-video-thumbextractor-module support on windows platform?

video thumb extractor module: Seek to an invalid time while sending to client, client

my config

location ~ /api/videos/(\d+)/(\d+)/(\d+)(/.*)$ {
root /home/dev/apps/itsplenty-services/media;

	add_header Content-Disposition 'attachment';
            proxy_set_header Accept-Encoding "deflate, gzip";
            proxy_set_header Accept "*/*";
            proxy_http_version 1.1;
            proxy_method GET;
            proxy_pass_request_body off;
            proxy_set_header Content-Length "";
           
        video_thumbextractor;
        video_thumbextractor_video_filename $4;
	video_thumbextractor_video_second      $3;
        video_thumbextractor_image_width       $1;
        video_thumbextractor_image_height      $2;

	add_header Content-Disposition 'attachment';
            error_page   415 = /empty;

	 }

Support for older FFMPEG or FFMPEG in LTS distributions

Hi,

it is not handy to create modules that depends on latest source code of FFMPEG. This means that we have to compile manually FFMPEG first before this module can be used.

Is it possible to support Ubuntu LTS versions? That means using an older ffmpeg and containing libraries? I can not imagine that the code to extract thumbnails uses that exotic code. Now we have the following error:

cc -c -g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Wdate-time -D_FORTIFY_SOURCE=2 -DNDK_SET_VAR -I/home/joshua/Desktop/nginx-JS-modules/tmp.gbbXO8iyal/nginx-1.12.1/debian/modules/nginx_rtmp_module -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/http/modules/perl -I /home/joshua/Desktop/nginx-JS-modules/tmp.gbbXO8iyal/nginx-1.12.1/debian/modules/nginx-development-kit/objs -I objs/addon/ndk -I /home/joshua/Desktop/nginx-JS-modules/tmp.gbbXO8iyal/nginx-1.12.1/debian/modules/nginx-development-kit/src -I /home/joshua/Desktop/nginx-JS-modules/tmp.gbbXO8iyal/nginx-1.12.1/debian/modules/nginx-development-kit/objs -I objs/addon/ndk -I /home/joshua/Desktop/nginx-JS-modules/tmp.gbbXO8iyal/nginx-1.12.1/debian/modules/nchan/src -I /home/joshua/Desktop/nginx-JS-modules/tmp.gbbXO8iyal/nginx-1.12.1/debian/modules/nginx-lua/src/api -I /usr/include/luajit-2.0 -I /home/joshua/Desktop/nginx-JS-modules/tmp.gbbXO8iyal/nginx-1.12.1/debian/modules/nginx_video_thumbextractor_module/src -I /home/joshua/Desktop/nginx-JS-modules/tmp.gbbXO8iyal/nginx-1.12.1/debian/modules/nginx_video_thumbextractor_module/include -I /usr/include/libxml2 -I /home/joshua/Desktop/nginx-JS-modules/tmp.gbbXO8iyal/nginx-1.12.1/debian/modules/nginx_rtmp_module -I /usr/include/libxml2 -I objs -I src/http -I src/http/modules -I src/http/v2 -I /home/joshua/Desktop/nginx-JS-modules/tmp.gbbXO8iyal/nginx-1.12.1/debian/modules/nginx-development-kit/src -I src/mail -I src/stream \ -o objs/addon/src/ngx_http_video_thumbextractor_module.o \ /home/joshua/Desktop/nginx-JS-modules/tmp.gbbXO8iyal/nginx-1.12.1/debian/modules/nginx_video_thumbextractor_module/src/ngx_http_video_thumbextractor_module.c In file included from /home/joshua/Desktop/nginx-JS-modules/tmp.gbbXO8iyal/nginx-1.12.1/debian/modules/nginx_video_thumbextractor_module/src/ngx_http_video_thumbextractor_module.c:28:0: /home/joshua/Desktop/nginx-JS-modules/tmp.gbbXO8iyal/nginx-1.12.1/debian/modules/nginx_video_thumbextractor_module/src/ngx_http_video_thumbextractor_module_utils.c: In function ‘ngx_http_video_thumbextractor_get_thumb’: /home/joshua/Desktop/nginx-JS-modules/tmp.gbbXO8iyal/nginx-1.12.1/debian/modules/nginx_video_thumbextractor_module/src/ngx_http_video_thumbextractor_module_utils.c:164:5: warning: implicit declaration of function ‘avcodec_parameters_to_context’ [-Wimplicit-function-declaration] avcodec_parameters_to_context(pCodecCtx, pFormatCtx->streams[videoStream]->codecpar); ^ /home/joshua/Desktop/nginx-JS-modules/tmp.gbbXO8iyal/nginx-1.12.1/debian/modules/nginx_video_thumbextractor_module/src/ngx_http_video_thumbextractor_module_utils.c:164:78: error: ‘AVStream {aka struct AVStream}’ has no member named ‘codecpar’ avcodec_parameters_to_context(pCodecCtx, pFormatCtx->streams[videoStream]->codecpar); ^ /home/joshua/Desktop/nginx-JS-modules/tmp.gbbXO8iyal/nginx-1.12.1/debian/modules/nginx_video_thumbextractor_module/src/ngx_http_video_thumbextractor_module_utils.c: In function ‘get_frame’: /home/joshua/Desktop/nginx-JS-modules/tmp.gbbXO8iyal/nginx-1.12.1/debian/modules/nginx_video_thumbextractor_module/src/ngx_http_video_thumbextractor_module_utils.c:632:17: warning: implicit declaration of function ‘avcodec_send_packet’ [-Wimplicit-function-declaration] if (avcodec_send_packet(pCodecCtx, &packet) == AVERROR(EAGAIN)) continue; ^ /home/joshua/Desktop/nginx-JS-modules/tmp.gbbXO8iyal/nginx-1.12.1/debian/modules/nginx_video_thumbextractor_module/src/ngx_http_video_thumbextractor_module_utils.c:633:33: warning: implicit declaration of function ‘avcodec_receive_frame’ [-Wimplicit-function-declaration] if ((decodeStatus = avcodec_receive_frame(pCodecCtx, pFrame)) == AVERROR(EAGAIN)) continue; ^ objs/Makefile:1464: recipe for target 'objs/addon/src/ngx_http_video_thumbextractor_module.o' failed make[3]: *** [objs/addon/src/ngx_http_video_thumbextractor_module.o] Error 1 make[3]: Leaving directory '/home/joshua/Desktop/nginx-JS-modules/tmp.gbbXO8iyal/nginx-1.12.1/debian/build-extras' Makefile:8: recipe for target 'build' failed make[2]: *** [build] Error 2 make[2]: Leaving directory '/home/joshua/Desktop/nginx-JS-modules/tmp.gbbXO8iyal/nginx-1.12.1/debian/build-extras' debian/rules:169: recipe for target 'build.arch.extras' failed make[1]: *** [build.arch.extras] Error 2 make[1]: Leaving directory '/home/joshua/Desktop/nginx-JS-modules/tmp.gbbXO8iyal/nginx-1.12.1' debian/rules:147: recipe for target 'build' failed make: *** [build] Error 2 dpkg-buildpackage: error: debian/rules build gave error exit status 2

Got errors when make install

Hello there,

I have got some errors when trying to install this module.

/tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module.c In file included from /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module.c:28: /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:27:34: error: libavformat/avformat.h: No such file or directory /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:28:32: error: libswscale/swscale.h: No such file or directory /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:29:34: error: libavfilter/avfilter.h: No such file or directory /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:30:36: error: libavfilter/buffersink.h: No such file or directory /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:31:35: error: libavfilter/buffersrc.h: No such file or directory /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:32:21: error: jpeglib.h: No such file or directory In file included from /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module.c:28: /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:39: error: expected ‘)’ before ‘cinfo’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:41: error: expected declaration specifiers or ‘...’ before ‘AVFormatContext’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:41: error: expected declaration specifiers or ‘...’ before ‘AVCodecContext’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:42: error: expected declaration specifiers or ‘...’ before ‘AVFormatContext’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:42: error: expected declaration specifiers or ‘...’ before ‘AVCodecContext’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:42: error: expected declaration specifiers or ‘...’ before ‘AVFilterGraph’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:42: error: expected declaration specifiers or ‘...’ before ‘AVFilterContext’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:42: error: expected declaration specifiers or ‘...’ before ‘AVFilterContext’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:43: error: expected ‘)’ before ‘*’ token /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:44: error: expected declaration specifiers or ‘...’ before ‘AVFormatContext’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:44: error: expected declaration specifiers or ‘...’ before ‘AVCodecContext’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:44: error: expected declaration specifiers or ‘...’ before ‘AVFrame’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c: In function ‘ngx_http_video_thumbextractor_seek_data_from_file’: /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:50: error: ‘AVSEEK_SIZE’ undeclared (first use in this function) /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:50: error: (Each undeclared identifier is reported only once /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:50: error: for each function it appears in.) cc1: warnings being treated as errors /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c: In function ‘ngx_http_video_thumbextractor_read_data_from_file’: /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:69: error: implicit declaration of function ‘AVERROR’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c: In function ‘ngx_http_video_thumbextractor_get_thumb’: /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:83: error: ‘AVFormatContext’ undeclared (first use in this function) /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:83: error: ‘pFormatCtx’ undeclared (first use in this function) /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:84: error: ‘AVCodecContext’ undeclared (first use in this function) /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:84: error: ‘pCodecCtx’ undeclared (first use in this function) /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:85: error: ‘AVCodec’ undeclared (first use in this function) /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:85: error: ‘pCodec’ undeclared (first use in this function) /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:86: error: ‘AVFrame’ undeclared (first use in this function) /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:86: error: ‘pFrame’ undeclared (first use in this function) /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:89: error: ‘AVIOContext’ undeclared (first use in this function) /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:89: error: ‘pAVIOCtx’ undeclared (first use in this function) /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:92: error: ‘AVFilterContext’ undeclared (first use in this function) /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:92: error: ‘buffersink_ctx’ undeclared (first use in this function) /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:93: error: ‘buffersrc_ctx’ undeclared (first use in this function) /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:94: error: ‘AVFilterGraph’ undeclared (first use in this function) /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:94: error: ‘filter_graph’ undeclared (first use in this function) /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:121: error: implicit declaration of function ‘avformat_alloc_context’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:122: error: implicit declaration of function ‘av_malloc’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:122: error: cast to pointer from integer of different size /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:128: error: implicit declaration of function ‘avio_alloc_context’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:137: error: implicit declaration of function ‘avformat_open_input’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:144: error: implicit declaration of function ‘avformat_find_stream_info’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:149: error: ‘float_t’ undeclared (first use in this function) /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:149: error: expected ‘)’ before ‘pFormatCtx’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:156: error: implicit declaration of function ‘av_find_best_stream’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:156: error: ‘AVMEDIA_TYPE_VIDEO’ undeclared (first use in this function) /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:163: error: implicit declaration of function ‘avcodec_alloc_context3’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:164: error: implicit declaration of function ‘avcodec_parameters_to_context’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:166: error: ‘AVDictionary’ undeclared (first use in this function) /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:166: error: ‘dict’ undeclared (first use in this function) /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:168: error: implicit declaration of function ‘av_dict_set’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:171: error: implicit declaration of function ‘avcodec_open2’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:176: error: too many arguments to function ‘setup_parameters’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:178: error: too many arguments to function ‘setup_filters’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:183: error: implicit declaration of function ‘av_frame_alloc’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:190: error: too many arguments to function ‘get_frame’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:191: error: ‘AV_PICTURE_TYPE_NONE’ undeclared (first use in this function) /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:196: error: implicit declaration of function ‘filter_frame’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:233: error: implicit declaration of function ‘av_frame_free’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:237: error: implicit declaration of function ‘avcodec_close’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:238: error: implicit declaration of function ‘avcodec_free_context’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:242: error: implicit declaration of function ‘avformat_close_input’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:246: error: implicit declaration of function ‘av_freep’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:250: error: implicit declaration of function ‘avfilter_graph_free’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c: In function ‘ngx_http_video_thumbextractor_init_libraries’: /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:260: error: implicit declaration of function ‘av_register_all’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:261: error: implicit declaration of function ‘avfilter_register_all’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:262: error: implicit declaration of function ‘av_log_set_level’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:262: error: ‘AV_LOG_ERROR’ undeclared (first use in this function) /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c: In function ‘ngx_http_video_thumbextractor_jpeg_compress’: /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:269: error: storage size of ‘cinfo’ isn’t known /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:270: error: storage size of ‘jerr’ isn’t known /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:271: error: ‘JSAMPROW’ undeclared (first use in this function) /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:271: error: expected ‘;’ before ‘row_pointer’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:275: error: implicit declaration of function ‘jpeg_std_error’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:276: error: implicit declaration of function ‘jpeg_create_compress’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:277: error: implicit declaration of function ‘ngx_http_video_thumbextractor_jpeg_memory_dest’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:282: error: ‘JCS_RGB’ undeclared (first use in this function) /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:284: error: implicit declaration of function ‘jpeg_set_defaults’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:294: error: implicit declaration of function ‘jpeg_set_quality’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:299: error: implicit declaration of function ‘jpeg_simple_progression’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:302: error: implicit declaration of function ‘jpeg_start_compress’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:305: error: ‘row_pointer’ undeclared (first use in this function) /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:306: error: implicit declaration of function ‘jpeg_write_scanlines’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:309: error: implicit declaration of function ‘jpeg_finish_compress’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:310: error: implicit declaration of function ‘jpeg_destroy_compress’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:270: error: unused variable ‘jerr’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:269: error: unused variable ‘cinfo’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c: At top level: /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:317: error: field ‘pub’ has incomplete type /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:326: error: expected ‘)’ before ‘cinfo’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:337: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘ngx_http_video_thumbextractor_empty_output_buffer’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:355: error: expected ‘)’ before ‘cinfo’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:363: error: expected ‘)’ before ‘cinfo’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:382: error: expected ‘)’ before ‘*’ token /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:389: error: expected ‘)’ before ‘*’ token /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:395: error: expected declaration specifiers or ‘...’ before ‘AVFormatContext’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:395: error: expected declaration specifiers or ‘...’ before ‘AVCodecContext’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c: In function ‘setup_parameters’: /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:397: error: ‘pFormatCtx’ undeclared (first use in this function) /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:397: error: ‘AV_TIME_BASE’ undeclared (first use in this function) /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c: At top level: /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:422: error: expected declaration specifiers or ‘...’ before ‘AVFormatContext’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:422: error: expected declaration specifiers or ‘...’ before ‘AVCodecContext’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:422: error: expected declaration specifiers or ‘...’ before ‘AVFilterGraph’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:422: error: expected declaration specifiers or ‘...’ before ‘AVFilterContext’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:422: error: expected declaration specifiers or ‘...’ before ‘AVFilterContext’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c: In function ‘setup_filters’: /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:424: error: ‘AVFilterGraph’ undeclared (first use in this function) /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:424: error: ‘filter_graph’ undeclared (first use in this function) /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:426: error: ‘AVFilterContext’ undeclared (first use in this function) /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:426: error: ‘transpose_ctx’ undeclared (first use in this function) /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:427: error: ‘transpose_cw_ctx’ undeclared (first use in this function) /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:428: error: ‘scale_ctx’ undeclared (first use in this function) /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:429: error: ‘crop_ctx’ undeclared (first use in this function) /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:430: error: ‘tile_ctx’ undeclared (first use in this function) /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:431: error: ‘format_ctx’ undeclared (first use in this function) /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:443: error: ‘AVDictionaryEntry’ undeclared (first use in this function) /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:443: error: ‘rotate’ undeclared (first use in this function) /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:443: error: implicit declaration of function ‘av_dict_get’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:443: error: ‘pFormatCtx’ undeclared (first use in this function) /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:450: error: implicit declaration of function ‘display_aspect_ratio’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:450: error: ‘pCodecCtx’ undeclared (first use in this function) /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:451: error: implicit declaration of function ‘display_width’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:491: error: ‘fg’ undeclared (first use in this function) /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:491: error: implicit declaration of function ‘avfilter_graph_alloc’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:496: error: ‘AVRational’ undeclared (first use in this function) /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:496: error: expected ‘;’ before ‘time_base’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:500: error: ‘time_base’ undeclared (first use in this function) /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:503: error: implicit declaration of function ‘avfilter_graph_create_filter’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:503: error: ‘buffersrc_ctx’ undeclared (first use in this function) /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:503: error: implicit declaration of function ‘avfilter_get_by_name’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:547: error: ‘buffersink_ctx’ undeclared (first use in this function) /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:554: error: implicit declaration of function ‘avfilter_link’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:580: error: implicit declaration of function ‘avfilter_graph_config’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c: At top level: /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:589: error: expected ‘)’ before ‘*’ token /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:608: error: expected declaration specifiers or ‘...’ before ‘AVFormatContext’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:608: error: expected declaration specifiers or ‘...’ before ‘AVCodecContext’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:608: error: expected declaration specifiers or ‘...’ before ‘AVFrame’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c: In function ‘get_frame’: /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:610: error: ‘AVPacket’ undeclared (first use in this function) /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:610: error: expected ‘;’ before ‘packet’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:615: error: ‘pFormatCtx’ undeclared (first use in this function) /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:617: error: ‘float_t’ undeclared (first use in this function) /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:617: error: expected ‘)’ before ‘pFormatCtx’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:621: error: implicit declaration of function ‘av_seek_frame’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:621: error: ‘AVSEEK_FLAG_BACKWARD’ undeclared (first use in this function) /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:628: error: implicit declaration of function ‘av_read_frame’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:628: error: ‘packet’ undeclared (first use in this function) /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:632: error: implicit declaration of function ‘avcodec_send_packet’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:632: error: ‘pCodecCtx’ undeclared (first use in this function) /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:633: error: implicit declaration of function ‘avcodec_receive_frame’ /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:633: error: ‘pFrame’ undeclared (first use in this function) /tmp/nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:645: error: implicit declaration of function ‘av_packet_unref’ make[1]: *** [objs/addon/src/ngx_http_video_thumbextractor_module.o] Error 1 make[1]: Leaving directory /tmp/nginx-1.10.1'
make: *** [build] Error 2
`

I have installed FFMPEG & libjpeg already.
Here is result when I run ffmpeg -version

`
ffmpeg version N-86909-g4158fba Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-18)
configuration: --prefix=/root/ffmpeg_build --extra-cflags=-I/root/ffmpeg_build/include --extra-ldflags='-L/root/ffmpeg_build/lib -ldl' --bindir=/root/bin --pkg-config-flags=--static --enable-gpl --enable-libfdk_aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree
libavutil 55. 69.100 / 55. 69.100
libavcodec 57.102.100 / 57.102.100
libavformat 57. 76.100 / 57. 76.100
libavdevice 57. 7.100 / 57. 7.100
libavfilter 6. 95.100 / 6. 95.100
libswscale 4. 7.101 / 4. 7.101
libswresample 2. 8.100 / 2. 8.100
libpostproc 54. 6.100 / 54. 6.100

`

problem with libavformat 54. 32.100

Hello, I just ran into this:

cc1: warnings being treated as errors
In file included from ../nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module.c:28:
../nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c: In function ângx_http_video_thumbextractor_get_thumbâ:
../nginx-video-thumbextractor-module/src/ngx_http_video_thumbextractor_module_utils.c:268: error: âav_close_input_fileâ is deprecated (declared at /opt/wat/encoder/include/libavformat/avformat.h:1623)

replacing line 268 with newer ffmpeg function should do the trick:

if (pFormatCtx != NULL) avformat_close_input(&pFormatCtx);

Compatiblity with FFMPEG 5

When trying to compile using FFMPEG 5, the following errors occur:
In file included from /tmp/nginx-thumb-module/src/ngx_http_video_thumbextractor_module.c:28: /tmp/nginx-thumb-module/src/ngx_http_video_thumbextractor_module_utils.c:41:145: error: unknown type name 'AVCodecContext'; did you mean 'AVIODirContext'? 41 | int setup_parameters(ngx_http_video_thumbextractor_loc_conf_t *cf, ngx_http_video_thumbextractor_thumb_ctx_t *ctx, AVFormatContext *pFormatCtx, AVCodecContext *pCodecCtx); | ^~~~~~~~~~~~~~ | AVIODirContext /tmp/nginx-thumb-module/src/ngx_http_video_thumbextractor_module_utils.c:42:96: error: unknown type name 'AVCodecContext'; did you mean 'AVIODirContext'? 42 | int setup_filters(ngx_http_video_thumbextractor_thumb_ctx_t *ctx, AVFormatContext *pFormatCtx, AVCodecContext *pCodecCtx, int videoStream, AVFilterGraph **fg, AVFilterContext **buf_src_ctx, AVFilterContext **buf_sink_ctx, ngx_log_t *log); | ^~~~~~~~~~~~~~ | AVIODirContext /tmp/nginx-thumb-module/src/ngx_http_video_thumbextractor_module_utils.c:44:90: error: unknown type name 'AVCodecContext'; did you mean 'AVIODirContext'? 44 | int get_frame(ngx_http_video_thumbextractor_loc_conf_t *cf, AVFormatContext *pFormatCtx, AVCodecContext *pCodecCtx, AVFrame *pFrame, int videoStream, int64_t second, ngx_log_t *log); | ^~~~~~~~~~~~~~ | AVIODirContext /tmp/nginx-thumb-module/src/ngx_http_video_thumbextractor_module_utils.c: In function 'ngx_http_video_thumbextractor_get_thumb': /tmp/nginx-thumb-module/src/ngx_http_video_thumbextractor_module_utils.c:84:5: error: unknown type name 'AVCodecContext'; use 'struct' keyword to refer to the type 84 | AVCodecContext *pCodecCtx = NULL; | ^~~~~~~~~~~~~~ | struct /tmp/nginx-thumb-module/src/ngx_http_video_thumbextractor_module_utils.c:156:79: warning: passing argument 5 of 'av_find_best_stream' from incompatible pointer type [-Wincompatible-pointer-types] 156 | videoStream = av_find_best_stream(pFormatCtx, AVMEDIA_TYPE_VIDEO, -1, -1, &pCodec, 0); | ^~~~~~~ | | | AVCodec ** In file included from /tmp/nginx-thumb-module/src/ngx_http_video_thumbextractor_module_utils.c:27, from /tmp/nginx-thumb-module/src/ngx_http_video_thumbextractor_module.c:28: /usr/include/libavformat/avformat.h:2165:41: note: expected 'const AVCodec **' but argument is of type 'AVCodec **' 2165 | const AVCodec **decoder_ret, | ~~~~~~~~~~~~~~~~^~~~~~~~~~~ In file included from /tmp/nginx-thumb-module/src/ngx_http_video_thumbextractor_module.c:28: /tmp/nginx-thumb-module/src/ngx_http_video_thumbextractor_module_utils.c:163:17: warning: implicit declaration of function 'avcodec_alloc_context3'; did you mean 'avio_alloc_context'? [-Wimplicit-function-declaration] 163 | pCodecCtx = avcodec_alloc_context3(pCodec); | ^~~~~~~~~~~~~~~~~~~~~~ | avio_alloc_context /tmp/nginx-thumb-module/src/ngx_http_video_thumbextractor_module_utils.c:163:15: warning: assignment to 'int *' from 'int' makes pointer from integer without a cast [-Wint-conversion] 163 | pCodecCtx = avcodec_alloc_context3(pCodec); | ^ /tmp/nginx-thumb-module/src/ngx_http_video_thumbextractor_module_utils.c:164:5: warning: implicit declaration of function 'avcodec_parameters_to_context'; did you mean 'avcodec_parameters_copy'? [-Wimplicit-function-declaration] 164 | avcodec_parameters_to_context(pCodecCtx, pFormatCtx->streams[videoStream]->codecpar); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | avcodec_parameters_copy

Is it possible to make this module compatible with FFMPEG5 ?

Fails to build

With nginx-1.7.10 I get the following error when running make:

/usr/bin/ld: cannot find -lpostproc
collect2: error: ld returned 1 exit status
make[1]: *** [objs/nginx] Error 1
make[1]: Leaving directory `/usr/src/nginx-1.7.10'
make: *** [build] Error 2

Get error when make: "error adding symbols: DSO missing from command line"

The make error is

/usr/bin/ld: warning: libavformat.so.57, needed by //usr/local/lib/libavfilter.so, may conflict with libavformat.so.54
/usr/bin/ld: warning: libavcodec.so.57, needed by //usr/local/lib/libavfilter.so, may conflict with libavcodec.so.54
/usr/bin/ld: objs/addon/src/ngx_http_video_thumbextractor_module.o: undefined reference to symbol 'av_packet_unref@@LIBAVCODEC_57'
//usr/local/lib/libavcodec.so.57: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[1]: *** [objs/nginx] Error 1
make[1]: Leaving directory `/usr/local/nginx-1.12.1'
make: *** [install] Error 2

ffmpeg:

ffmpeg version 3.4 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.3)
  configuration: --enable-libmp3lame --enable-libx264 --enable-gpl --enable-shared
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100

av_register_all is deprecated with ffmpeg 4

When installing nginx-video-thumbextractor-module as part on my Alpine docker image, compilation failsl because av_register_all is deprecated.

In file included from /usr/src/nginx-video-thumbextractor-module-0.9.0/src/ngx_http_video_thumbextractor_module.c:28:
/usr/src/nginx-video-thumbextractor-module-0.9.0/src/ngx_http_video_thumbextractor_module_utils.c: In function 'ngx_http_video_thumbextractor_init_libraries':                                                    
/usr/src/nginx-video-thumbextractor-module-0.9.0/src/ngx_http_video_thumbextractor_module_utils.c:260:5: error: 'av_register_all' is deprecated [-Werror=deprecated-declarations]                                 
     av_register_all();                                                                                                                                                                                           
     ^~~~~~~~~~~~~~~                                                                                                                                                                                              
In file included from /usr/src/nginx-video-thumbextractor-module-0.9.0/src/ngx_http_video_thumbextractor_module_utils.c:27,                                                                                       
                 from /usr/src/nginx-video-thumbextractor-module-0.9.0/src/ngx_http_video_thumbextractor_module.c:28:                                                                                             
/usr/include/libavformat/avformat.h:2025:6: note: declared here                                                                                                                                                   
 void av_register_all(void);                                                                                                                                                                                      
      ^~~~~~~~~~~~~~~                                                                                                                                                                                             
In file included from /usr/src/nginx-video-thumbextractor-module-0.9.0/src/ngx_http_video_thumbextractor_module.c:28:                                                                                             
/usr/src/nginx-video-thumbextractor-module-0.9.0/src/ngx_http_video_thumbextractor_module_utils.c:261:5: error: 'avfilter_register_all' is deprecated [-Werror=deprecated-declarations]                           
     avfilter_register_all();
     ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/src/nginx-video-thumbextractor-module-0.9.0/src/ngx_http_video_thumbextractor_module_utils.c:29,
                 from /usr/src/nginx-video-thumbextractor-module-0.9.0/src/ngx_http_video_thumbextractor_module.c:28:
/usr/include/libavfilter/avfilter.h:714:6: note: declared here
 void avfilter_register_all(void);
      ^~~~~~~~~~~~~~~~~~~~~

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.