Closed arty777 closed 9 years ago
did you install ffmpeg and other required library: libx264, libfdk_aac? The error above show that you don't have ffmpeg installed.
yes , ofcourse i install ffmpeg . Ok i try investigate this issue
root@:/usr/local/nginx/ngx_http_estreaming_module-master# dpkg -l |grep -i libswresample rc libswresample0 7:0.10.12-1~precise1 FFmpeg video software resampling library
root@strana:/usr/local/nginx/nginx-1.7.12# locate libswresample /usr/lib/x86_64-linux-gnu/libswresample.so.0 /usr/lib/x86_64-linux-gnu/libswresample.so.0.6.100 /usr/share/doc/libswresample0 /usr/share/lintian/overrides/libswresample0 /var/cache/apt/archives/libswresample0_7%3a0.10.12-1~precise1_amd64.deb /var/lib/dpkg/info/libswresample0:amd64.list /var/lib/dpkg/info/libswresample0:amd64.md5sums /var/lib/dpkg/info/libswresample0:amd64.postinst /var/lib/dpkg/info/libswresample0:amd64.postrm /var/lib/dpkg/info/libswresample0:amd64.shlibs
where nginx try to find libs like libswresample?
hello,
the step to install on centos should be:
it should work.
ubuntu apt-get install ffmpeg -OK apt-get install ffmpeg-dev - ubuntu have no this pkg... apt-get install x264 -OK apt-get install libx264-dev -OK apt-get install libresample-dev -OK
no normal way to work in ubuntu with libswresample ..... https://www.google.com.ua/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=libswresample%2Fswresample.h:+No+such+file+or+directory
any ideas ? Ubuntu very common OS compilation instruction for ubuntu will be big plus :)
Ok I dont have Ubuntu here, but had some experience with it, so the steps you should take is:
Let me know if you need help.
@arty777 : I just noticed that libavresample is not need, latest commit should work on your machine now. Sorry for that.
Step I use to compile ffmpeg and this module on ubuntu, on Centos and others should be similar: mkdir sources cd sources/ wget http://ffmpeg.org/releases/ffmpeg-2.6.2.tar.bz2 wget -O fdk-aac.zip https://github.com/mstorsjo/fdk-aac/zipball/master wget http://download.videolan.org/pub/x264/snapshots/last_x264.tar.bz2 apt-get install yasm unzip fdk-aac.zip cd mstorsjo-fdk-aac-83ac4a9/ autoreconf -fiv ./configure make && make install cd .. tar xjvf last_x264.tar.bz2 cd x264-snapshot-20141218-2245/ ./configure --enable-shared --enable-static make make install cd .. tar xjvf ffmpeg-2.6.2.tar.bz2 cd ffmpeg-2.6.2 ls ./configure --enable-libx264 --enable-static --disable-opencl --extra-ldflags='-L/usr/local/lib -lx264 -lpthread -lm' --enable-gpl --enable-libfdk-aac --enable-nonfree --enable-shared make make install ldconfig
then get source nginx + this module, install with --add-module
new : /usr/local/nginx/ngx_http_estreaming_module-master/src/ngx_http_estreaming_module.c /usr/local/nginx/ngx_http_estreaming_module-master/src/ngx_http_estreaming_module.c: In function ‘ngx_estreaming_handler’: /usr/local/nginx/ngx_http_estreaming_module-master/src/ngx_http_estreaming_module.c:181:9: error: request for member ‘log_level’ in something not a structure or union /usr/local/nginx/ngx_http_estreaming_module-master/src/ngx_http_estreaming_module.c:181:9: error: passing argument 2 of ‘ngx_log_error_core’ from incompatible pointer type [-Werror] src/core/ngx_log.h:88:6: note: expected ‘struct ngx_logt ’ but argument is of type ‘double (_)(double)’ cc1: all warnings being treated as errors make[1]: *\ [objs/addon/src/ngx_http_estreaming_module.o] Error 1
Strange, in my setup which use 1.6.2 compile withou error. could you please test if latest commit 82925a1abc6c4ac8623f51a2a2c7839ed6cc7732 can fix it?
after fix minus ngx_log_debug1(NGX_LOG_DEBUG_HTTP, log, 0, minus "examine mp4 filename: \"%V\"", &path); plus ngx_log_debug1(NGX_LOG_DEBUG, log, 0, plus "examine mp4 filename: \"%s\"", &path.data);
i have: /usr/local/nginx/ngx_http_estreaming_module-master/src/ngx_http_estreaming_module.c /usr/local/nginx/ngx_http_estreaming_module-master/src/ngx_http_estreaming_module.c: In function ‘ngx_estreaming_handler’: /usr/local/nginx/ngx_http_estreaming_module-master/src/ngx_http_estreaming_module.c:181:5: error: request for member ‘log_level’ in something not a structure or union /usr/local/nginx/ngx_http_estreaming_module-master/src/ngx_http_estreaming_module.c:181:5: error: passing argument 2 of ‘ngx_log_error_core’ from incompatible pointer type [-Werror] src/core/ngx_log.h:88:6: note: expected ‘struct ngx_logt ’ but argument is of type ‘double (_)(double)’ cc1: all warnings being treated as errors make[1]: * [objs/addon/src/ngx_http_estreaming_module.o] Error 1 make[1]: Leaving directory `/usr/local/nginx/nginx-1.7.12' make: * [build] Error 2
1.6.3 with/without last commit https://github.com/whatvn/ngx_http_estreaming_module/commit/82925a1abc6c4ac8623f51a2a2c7839ed6cc7732
/usr/local/nginx/ngx_http_estreaming_module-master/src/ngx_http_estreaming_module.c: In function ‘ngx_estreaming_handler’: /usr/local/nginx/ngx_http_estreaming_module-master/src/ngx_http_estreaming_module.c:181:9: error: request for member ‘log_level’ in something not a structure or union /usr/local/nginx/ngx_http_estreaming_module-master/src/ngx_http_estreaming_module.c:181:9: error: passing argument 2 of ‘ngx_log_error_core’ from incompatible pointer type [-Werror] src/core/ngx_log.h:81:6: note: expected ‘struct ngx_logt ’ but argument is of type ‘double (_)(double)’ cc1: all warnings being treated as errors make[1]: * [objs/addon/src/ngx_http_estreaming_module.o] Error 1 make[1]: Leaving directory `/usr/local/nginx/nginx-1.6.3' make: * [build] Error 2
my config ./configure --prefix=/usr/local/nginx/work/nginx1 --sbin-path=/usr/local/nginx/work/nginx1/sbin/nginx1 --conf-path=/usr/local/nginx/work/nginx1/conf/nginx.conf --pid-path=/usr/local/nginx/work/nginx1/nginx1.pid --error-log-path=/usr/local/nginx/work/nginx1/log/error.log --lock-path=/usr/local/nginx/work/nginx1/nginx.lock --http-log-path=/usr/local/nginx/work/nginx1/log/access.log --http-client-body-temp-path=/usr/local/nginx/work/nginx1/temp/client --http-proxy-temp-path=/usr/local/nginx/work/nginx1/temp/proxy --http-fastcgi-temp-path=/usr/local/nginx/work/nginx1/temp/fastcgi --http-uwsgi-temp-path=/usr/local/nginx/work/nginx1/temp/uwsgi --http-scgi-temp-path=/usr/local/nginx/work/nginx1/temp/scgi --with-file-aio --without-http_autoindex_module --without-http_browser_module --without-http_fastcgi_module --without-http_geo_module --without-http_empty_gif_module --without-http_memcached_module --without-http_ssi_module --without-http_userid_module --without-http_gzip_module --with-http_perl_module --with-debug --with-http_secure_link_module --with-http_stub_status_module --add-module=/usr/local/nginx/ngx_http_estreaming_module-master
in line 181, please change second parameter from log to nlog or use the latest commit b16b7f2bdf2ca27c70354291f8f79013db5dcc04 . My bad :-1:
/usr/bin/ld: cannot find -lavresample collect2: ld returned 1 exit status make[1]: * [objs/nginx] Error 1 make[1]: Leaving directory `/usr/local/nginx/nginx-1.7.12' make: * [build] Error 2
root@strana:/usr/local/nginx/ngx_http_estreaming_module-master# ffmpeg -V ffmpeg version 2.6.2 Copyright (c) 2000-2015 the FFmpeg developers built with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5) configuration: --enable-libx264 --enable-static --disable-opencl --enable-gpl --enable-libfdk-aac --enable-nonfree libavutil 54. 20.100 / 54. 20.100 libavcodec 56. 26.100 / 56. 26.100 libavformat 56. 25.101 / 56. 25.101 libavdevice 56. 4.100 / 56. 4.100 libavfilter 5. 11.102 / 5. 11.102 libswscale 3. 1.101 / 3. 1.101 libswresample 1. 1.100 / 1. 1.100 libpostproc 53. 3.100 / 53. 3.100
when i install ffmpeg : cd ffmpeg-2.6.2 ./configure --enable-libx264 --enable-static --disable-opencl --enable-gpl --enable-libfdk-aac --enable-nonfree
make && make install
what if you change config file, line 1, remove -lavresample and change to -lswresample. Sorry my development machine is too much different from your, so I can not debug exactly.
-lpthread -lcrypt -lavformat -lavcodec -lavutil -lavcodec -lswresample -lavfilter -lrt -lswscale -lz -lm -lbz2 -lfdk-aac -lx264 -lpcre -lcrypto -lcrypto \
-Wl,-E -fstack-protector -L/usr/local/lib -L/usr/lib/perl/5.14/CORE -lperl -ldl -lm -lpthread -lc -lcrypt
/usr/local/lib/libavfilter.a(avf_showcqt.o): In function plot_cqt': /usr/local/nginx/ffmpeg-2.6.2/libavfilter/avf_showcqt.c:545: undefined reference to
av_fft_permute'
/usr/local/nginx/ffmpeg-2.6.2/libavfilter/avf_showcqt.c:546: undefined reference to av_fft_calc' /usr/local/lib/libavfilter.a(avf_showcqt.o): In function
config_output':
/usr/local/nginx/ffmpeg-2.6.2/libavfilter/avf_showcqt.c:350: undefined reference to av_fft_init' /usr/local/nginx/ffmpeg-2.6.2/libavfilter/avf_showcqt.c:464: undefined reference to
av_fft_permute'
/usr/local/nginx/ffmpeg-2.6.2/libavfilter/avf_showcqt.c:465: undefined reference to av_fft_calc' /usr/local/lib/libavfilter.a(avf_showcqt.o): In function
uninit':
/usr/local/nginx/ffmpeg-2.6.2/libavfilter/avf_showcqt.c:123: undefined reference to av_fft_end' /usr/local/lib/libavfilter.a(avf_showspectrum.o): In function
config_output':
/usr/local/nginx/ffmpeg-2.6.2/libavfilter/avf_showspectrum.c:178: undefined reference to av_rdft_end' /usr/local/nginx/ffmpeg-2.6.2/libavfilter/avf_showspectrum.c:179: undefined reference to
av_rdft_init'
/usr/local/lib/libavfilter.a(avf_showspectrum.o): In function plot_spectrum_column': /usr/local/nginx/ffmpeg-2.6.2/libavfilter/avf_showspectrum.c:328: undefined reference to
av_rdft_calc'
/usr/local/lib/libavfilter.a(avf_showspectrum.o): In function uninit': /usr/local/nginx/ffmpeg-2.6.2/libavfilter/avf_showspectrum.c:114: undefined reference to
av_rdft_end'
/usr/local/lib/libavfilter.a(f_select.o): In function config_input': /usr/local/nginx/ffmpeg-2.6.2/libavfilter/f_select.c:238: undefined reference to
av_pixelutils_get_sad_fn'
/usr/local/lib/libavfilter.a(vf_deshake.o): In function init': /usr/local/nginx/ffmpeg-2.6.2/libavfilter/vf_deshake.c:349: undefined reference to
av_pixelutils_get_sad_fn'
/usr/local/lib/libavfilter.a(vf_mpdecimate.o): In function init': /usr/local/nginx/ffmpeg-2.6.2/libavfilter/vf_mpdecimate.c:134: undefined reference to
av_pixelutils_get_sad_fn'
/usr/local/lib/libavfilter.a(vf_pp.o): In function pp_filter_frame': /usr/local/nginx/ffmpeg-2.6.2/libavfilter/vf_pp.c:139: undefined reference to
pp_postprocess'
/usr/local/lib/libavfilter.a(vf_pp.o): In function pp_config_props': /usr/local/nginx/ffmpeg-2.6.2/libavfilter/vf_pp.c:112: undefined reference to
pp_get_context'
/usr/local/lib/libavfilter.a(vf_pp.o): In function pp_uninit': /usr/local/nginx/ffmpeg-2.6.2/libavfilter/vf_pp.c:158: undefined reference to
pp_free_mode'
/usr/local/lib/libavfilter.a(vf_pp.o): In function pp_init': /usr/local/nginx/ffmpeg-2.6.2/libavfilter/vf_pp.c:56: undefined reference to
pp_get_mode_by_name_and_quality'
/usr/local/lib/libavfilter.a(vf_pp.o): In function pp_uninit': /usr/local/nginx/ffmpeg-2.6.2/libavfilter/vf_pp.c:160: undefined reference to
pp_free_context'
/usr/local/lib/libavfilter.a(vf_spp.o): In function config_input': /usr/local/nginx/ffmpeg-2.6.2/libavfilter/vf_spp.c:334: undefined reference to
avcodec_dct_init'
/usr/local/lib/libavfilter.a(vf_spp.o): In function child_class_next': /usr/local/nginx/ffmpeg-2.6.2/libavfilter/vf_spp.c:49: undefined reference to
avcodec_dct_get_class'
/usr/local/lib/libavfilter.a(vf_spp.o): In function init_dict': /usr/local/nginx/ffmpeg-2.6.2/libavfilter/vf_spp.c:460: undefined reference to
avcodec_dct_alloc'
/usr/local/lib/libavfilter.a(af_atempo.o): In function yae_release_buffers': /usr/local/nginx/ffmpeg-2.6.2/libavfilter/af_atempo.c:229: undefined reference to
av_rdft_end'
/usr/local/nginx/ffmpeg-2.6.2/libavfilter/af_atempo.c:232: undefined reference to av_rdft_end' /usr/local/lib/libavfilter.a(af_atempo.o): In function
yae_reset':
/usr/local/nginx/ffmpeg-2.6.2/libavfilter/af_atempo.c:286: undefined reference to av_rdft_end' /usr/local/nginx/ffmpeg-2.6.2/libavfilter/af_atempo.c:289: undefined reference to
av_rdft_end'
/usr/local/nginx/ffmpeg-2.6.2/libavfilter/af_atempo.c:292: undefined reference to av_rdft_init' /usr/local/nginx/ffmpeg-2.6.2/libavfilter/af_atempo.c:298: undefined reference to
av_rdft_init'
/usr/local/lib/libavfilter.a(af_atempo.o): In function yae_xcorr_via_rdft': /usr/local/nginx/ffmpeg-2.6.2/libavfilter/af_atempo.c:631: undefined reference to
av_rdft_calc'
/usr/local/lib/libavfilter.a(af_atempo.o): In function yae_flush': /usr/local/nginx/ffmpeg-2.6.2/libavfilter/af_atempo.c:932: undefined reference to
av_rdft_calc'
/usr/local/lib/libavfilter.a(af_atempo.o): In function yae_apply': /usr/local/nginx/ffmpeg-2.6.2/libavfilter/af_atempo.c:841: undefined reference to
av_rdft_calc'
/usr/local/nginx/ffmpeg-2.6.2/libavfilter/af_atempo.c:873: undefined reference to av_rdft_calc' /usr/local/lib/libavcodec.a(vaapi.o): In function
ff_vaapi_commit_slices':
/usr/local/nginx/ffmpeg-2.6.2/libavcodec/vaapi.c:101: undefined reference to vaCreateBuffer' /usr/local/nginx/ffmpeg-2.6.2/libavcodec/vaapi.c:110: undefined reference to
vaCreateBuffer'
/usr/local/lib/libavcodec.a(vaapi.o): In function ff_vaapi_render_picture': /usr/local/nginx/ffmpeg-2.6.2/libavcodec/vaapi.c:52: undefined reference to
vaUnmapBuffer'
/usr/local/nginx/ffmpeg-2.6.2/libavcodec/vaapi.c:65: undefined reference to vaBeginPicture' /usr/local/nginx/ffmpeg-2.6.2/libavcodec/vaapi.c:69: undefined reference to
vaRenderPicture'
/usr/local/nginx/ffmpeg-2.6.2/libavcodec/vaapi.c:73: undefined reference to vaRenderPicture' /usr/local/nginx/ffmpeg-2.6.2/libavcodec/vaapi.c:78: undefined reference to
vaEndPicture'
/usr/local/nginx/ffmpeg-2.6.2/libavcodec/vaapi.c:56: undefined reference to vaUnmapBuffer' /usr/local/nginx/ffmpeg-2.6.2/libavcodec/vaapi.c:61: undefined reference to
vaUnmapBuffer'
/usr/local/lib/libavcodec.a(vaapi.o): In function alloc_buffer': /usr/local/nginx/ffmpeg-2.6.2/libavcodec/vaapi.c:129: undefined reference to
vaCreateBuffer'
/usr/local/nginx/ffmpeg-2.6.2/libavcodec/vaapi.c:131: undefined reference to vaMapBuffer' /usr/local/nginx/ffmpeg-2.6.2/libavcodec/vaapi.c:129: undefined reference to
vaCreateBuffer'
/usr/local/nginx/ffmpeg-2.6.2/libavcodec/vaapi.c:131: undefined reference to vaMapBuffer' /usr/local/nginx/ffmpeg-2.6.2/libavcodec/vaapi.c:129: undefined reference to
vaCreateBuffer'
/usr/local/nginx/ffmpeg-2.6.2/libavcodec/vaapi.c:131: undefined reference to vaMapBuffer' /usr/local/lib/libavcodec.a(vaapi.o): In function
destroy_buffers':
/usr/local/nginx/ffmpeg-2.6.2/libavcodec/vaapi.c:38: undefined reference to vaDestroyBuffer' /usr/local/nginx/ffmpeg-2.6.2/libavcodec/vaapi.c:38: undefined reference to
vaDestroyBuffer'
/usr/local/nginx/ffmpeg-2.6.2/libavcodec/vaapi.c:38: undefined reference to vaDestroyBuffer' /usr/local/nginx/ffmpeg-2.6.2/libavcodec/vaapi.c:38: undefined reference to
vaDestroyBuffer'
collect2: ld returned 1 exit status
make[1]: * [objs/nginx] Error 1
make[1]: Leaving directory `/usr/local/nginx/nginx-1.7.12'
make: * [build] Error 2
hmm, did you follow steps I posted above. The error shows that you are using static module of ffmpeg, which has suffix .a instead of dynamic loading module which has suffix .so.
Please recompile ffmpeg with
/configure --enable-libx264 --enable-static --disable-opencl --enable-gpl --enable-libfdk-aac --enable-nonfree --enable-shared
all fine after /configure --enable-libx264 --enable-static --disable-opencl --enable-gpl --enable-libfdk-aac --enable-nonfree --enable-shared
before i configure with this opt: ./configure --enable-libx264 --enable-static --disable-opencl --enable-gpl --enable-libfdk-aac --enable-nonfree
I close this issue, if you have another problem, we will open it later :)
i try to compile with nginx-1.7.12
i get this issue /usr/local/nginx/ngx_http_estreaming_module-master/src/ngx_http_estreaming_module.c In file included from /usr/local/nginx/ngx_http_estreaming_module-master/src/ngx_http_estreaming_module.c:14:0: /usr/local/nginx/ngx_http_estreaming_module-master/src/ngx_http_adaptive_streaming.h:15:38: fatal error: libswresample/swresample.h: No such file or directory compilation terminated. make[1]: * [objs/addon/src/ngx_http_estreaming_module.o] Error 1 make[1]: Leaving directory `/usr/local/nginx/nginx-1.7.12' make: * [build] Error 2