dirkvdb / ffmpegthumbnailer

Lightweight video thumbnailer that can be used by file managers to create thumbnails for video files
GNU General Public License v2.0
517 stars 72 forks source link

Can't build using Amazon Linux #156

Closed ccoffey closed 7 years ago

ccoffey commented 7 years ago

I've been struggling to build ffmpegthumbnailer on Amazon Linux for the past hour and I'm looking for some help. Below is the beginning of a set of steps.

Amazon Linux has cmake version 2.8.12.2 installed by default, we need a newer version.

  1. Get newest version of cmake
wget https://cmake.org/files/v3.9/cmake-3.9.1-Linux-x86_64.sh
sh ./cmake-3.9.1-Linux-x86_64.sh
  1. Clone ffmpegthumbnailer
git clone https://github.com/dirkvdb/ffmpegthumbnailer.git
cd ffmpegthumbnailer/
  1. Attempt to build
/home/ec2-user/cmake-3.9.1-Linux-x86_64/bin/cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_GIO=ON -DENABLE_THUMBNAILER=ON .

-- The C compiler identification is GNU 4.8.3 -- The CXX compiler identification is GNU 4.8.3 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found JPEG: /usr/lib64/libjpeg.so -- Found ZLIB: /usr/lib64/libz.so (found version "1.2.8") -- Could NOT find PNG (missing: PNG_LIBRARY PNG_PNG_INCLUDE_DIR) -- Found PkgConfig: /usr/bin/pkg-config (found version "0.27.1") -- Checking for module 'libavcodec' -- No package 'libavcodec' found CMake Error at /home/ec2-user/cmake-3.9.1-Linux-x86_64/share/cmake-3.9/Modules/FindPkgConfig.cmake:412 (message): A required package was not found Call Stack (most recent call first): /home/ec2-user/cmake-3.9.1-Linux-x86_64/share/cmake-3.9/Modules/FindPkgConfig.cmake:588 (_pkg_check_modules_internal) CMakeLists.txt:56 (PKG_CHECK_MODULES)

-- Configuring incomplete, errors occurred! See also "/home/ec2-user/ffmpegthumbnailer/CMakeFiles/CMakeOutput.log".

dirkvdb commented 7 years ago

It cannot find the ffmpeg libraries. Check the .travis.yml in the root of the archive on how to install ffmpeg yourself if needed: line 28-30

ccoffey commented 7 years ago

Thanks for your help @dirkvdb but I must be still doing something wrong! Before step 3 above, lets call it step 2.1 I did as you suggested and this step passed without any errors. However when I subsequently attempt to build ffmpegthumbnailer I still get an error about libavcodec.

2.1. Install ffmpeg libraries

wget http://ffmpeg.org/releases/ffmpeg-3.1.3.tar.bz2
tar xf ffmpeg-3.1.3.tar.bz2
cd ffmpeg-3.1.3 && ./configure --prefix=/usr --disable-static --enable-shared --disable-avdevice --disable-doc --disable-htmlpages --disable-manpages --disable-programs --disable-encoders --disable-muxers --enable-swscale --disable-yasm --enable-protocol=file --enable-protocol=http --enable-iconv  && make -j4 && sudo make install
  1. Attempt to build
/home/ec2-user/cmake-3.9.1-Linux-x86_64/bin/cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_GIO=ON -DENABLE_THUMBNAILER=ON .

-- Could NOT find PNG (missing: PNG_LIBRARY PNG_PNG_INCLUDE_DIR) -- Checking for module 'libavcodec' -- No package 'libavcodec' found CMake Error at /home/ec2-user/cmake-3.9.1-Linux-x86_64/share/cmake-3.9/Modules/FindPkgConfig.cmake:412 (message): A required package was not found Call Stack (most recent call first): /home/ec2-user/cmake-3.9.1-Linux-x86_64/share/cmake-3.9/Modules/FindPkgConfig.cmake:588 (_pkg_check_modules_internal) CMakeLists.txt:56 (PKG_CHECK_MODULES)

-- Configuring incomplete, errors occurred! See also "/home/ec2-user/ffmpegthumbnailer/CMakeFiles/CMakeOutput.log".

dirkvdb commented 7 years ago

Do you have sudo rights on the machine, did you actually install the libraries in /usr? Verify that /usr/lib contains the libavcodec/libavutil/... libraries

ccoffey commented 7 years ago

Yes I have sudo rights on the machine.

Here is what I executed

cd ffmpeg-3.1.3
./configure --prefix=/usr --disable-static --enable-shared --disable-avdevice --disable-doc --disable-htmlpages --disable-manpages --disable-programs --disable-encoders --disable-muxers --enable-swscale --disable-yasm --enable-protocol=file --enable-protocol=http --enable-iconv  && make -j4 && sudo make install

and the output that I got was

install prefix /usr source path . C compiler gcc C library glibc ARCH x86 (generic) big-endian no runtime cpu detection yes yasm no MMX enabled yes MMXEXT enabled yes 3DNow! enabled yes 3DNow! extended enabled yes SSE enabled yes SSSE3 enabled yes AESNI enabled yes AVX enabled yes XOP enabled yes FMA3 enabled yes FMA4 enabled yes i686 features enabled yes CMOV is fast yes EBX available yes EBP available yes debug symbols yes strip symbols yes optimize for size no optimizations yes static no shared yes postprocessing support no new filter support yes network support yes threading support pthreads safe bitstream reader yes SDL support no opencl enabled no JNI support no texi2html enabled no perl enabled yes pod2man enabled yes makeinfo enabled no makeinfo supports HTML no

Enabled programs:

External libraries: bzlib libxcb_shape lzma iconv libxcb_shm xlib libxcb libxcb_xfixes zlib

External libraries providing hardware acceleration:

Libraries: avcodec avformat swresample avfilter avutil swscale

Enabled decoders: aac avrn fic aac_fixed avrp flac aac_latm avs flashsv aasc avui flashsv2 ac3 ayuv flic ac3_fixed bethsoftvid flv adpcm_4xm bfi fourxm adpcm_adx bink fraps adpcm_afc binkaudio_dct frwu adpcm_aica binkaudio_rdft g2m adpcm_ct bintext g723_1 adpcm_dtk bmp g729 adpcm_ea bmv_audio gif adpcm_ea_maxis_xa bmv_video gsm adpcm_ea_r1 brender_pix gsm_ms adpcm_ea_r2 c93 h261 adpcm_ea_r3 cavs h263 adpcm_ea_xas ccaption h263i adpcm_g722 cdgraphics h263p adpcm_g726 cdxl h264 adpcm_g726le cfhd hap adpcm_ima_amv cinepak hevc adpcm_ima_apc cljr hnm4_video adpcm_ima_dat4 cllc hq_hqa adpcm_ima_dk3 comfortnoise hqx adpcm_ima_dk4 cook huffyuv adpcm_ima_ea_eacs cpia iac adpcm_ima_ea_sead cscd idcin adpcm_ima_iss cyuv idf adpcm_ima_oki dca iff_ilbm adpcm_ima_qt dds imc adpcm_ima_rad dfa indeo2 adpcm_ima_smjpeg dirac indeo3 adpcm_ima_wav dnxhd indeo4 adpcm_ima_ws dpx indeo5 adpcm_ms dsd_lsbf interplay_acm adpcm_mtaf dsd_lsbf_planar interplay_dpcm adpcm_psx dsd_msbf interplay_video adpcm_sbpro_2 dsd_msbf_planar jacosub adpcm_sbpro_3 dsicinaudio jpeg2000 adpcm_sbpro_4 dsicinvideo jpegls adpcm_swf dss_sp jv adpcm_thp dst kgv1 adpcm_thp_le dvaudio kmvc adpcm_vima dvbsub lagarith adpcm_xa dvdsub loco adpcm_yamaha dvvideo m101 aic dxa mace3 alac dxtory mace6 alias_pix dxv magicyuv als eac3 mdec amrnb eacmv metasound amrwb eamad microdvd amv eatgq mimic anm eatgv mjpeg ansi eatqi mjpegb ape eightbps mlp apng eightsvx_exp mmvideo ass eightsvx_fib motionpixels asv1 escape124 movtext asv2 escape130 mp1 atrac1 evrc mp1float atrac3 exr mp2 atrac3p ffv1 mp2float aura ffvhuff mp3 aura2 ffwavesynth mp3adu mp3adufloat pictor truemotion1 mp3float pjs truemotion2 mp3on4 png truemotion2rt mp3on4float ppm truespeech mpc7 prores tscc mpc8 prores_lgpl tscc2 mpeg1video ptx tta mpeg2video qcelp twinvq mpeg4 qdm2 txd mpegvideo qdraw ulti mpl2 qpeg utvideo msa1 qtrle v210 msmpeg4v1 r10k v210x msmpeg4v2 r210 v308 msmpeg4v3 ra_144 v408 msrle ra_288 v410 mss1 ralf vb mss2 rawvideo vble msvideo1 realtext vc1 mszh rl2 vc1image mts2 roq vcr1 mvc1 roq_dpcm vmdaudio mvc2 rpza vmdvideo mxpeg rscc vmnc nellymoser rv10 vorbis nuv rv20 vp3 on2avc rv30 vp5 opus rv40 vp6 paf_audio s302m vp6a paf_video sami vp6f pam sanm vp7 pbm screenpresso vp8 pcm_alaw sdx2_dpcm vp9 pcm_bluray sgi vplayer pcm_dvd sgirle vqa pcm_f32be sheervideo wavpack pcm_f32le shorten webp pcm_f64be sipr webvtt pcm_f64le smackaud wmalossless pcm_lxf smacker wmapro pcm_mulaw smc wmav1 pcm_s16be smvjpeg wmav2 pcm_s16be_planar snow wmavoice pcm_s16le sol_dpcm wmv1 pcm_s16le_planar sonic wmv2 pcm_s24be sp5x wmv3 pcm_s24daud srt wmv3image pcm_s24le ssa wnv1 pcm_s24le_planar stl ws_snd1 pcm_s32be subrip xan_dpcm pcm_s32le subviewer xan_wc3 pcm_s32le_planar subviewer1 xan_wc4 pcm_s8 sunrast xbin pcm_s8_planar svq1 xbm pcm_u16be svq3 xface pcm_u16le tak xl pcm_u24be targa xma1 pcm_u24le targa_y216 xma2 pcm_u32be tdsc xsub pcm_u32le text xwd pcm_u8 theora y41p pcm_zork thp ylc pcx tiertexseqvideo yop pgm tiff yuv4 pgmyuv tmv zero12v pgssub truehd zerocodec zlib zmbv

Enabled encoders:

Enabled hwaccels:

Enabled parsers: aac dvd_nav mpegvideo aac_latm dvdsub opus ac3 flac png adx g729 pnm bmp gsm rv30 cavsvideo h261 rv40 cook h263 tak dca h264 vc1 dirac hevc vorbis dnxhd mjpeg vp3 dpx mlp vp8 dvaudio mpeg4video vp9 dvbsub mpegaudio

Enabled demuxers: aa flic mjpeg aac flv mlp ac3 fourxm mlv acm frm mm act fsb mmf adf g722 mov adp g723_1 mp3 ads g729 mpc adx genh mpc8 aea gif mpegps afc gsm mpegts aiff gxf mpegtsraw aix h261 mpegvideo amr h263 mpjpeg anm h264 mpl2 apc hevc mpsub ape hls msf apng hnm msnwc_tcp aqtitle ico mtaf asf idcin mtv asf_o idf musx ass iff mv ast ilbc mvi au image2 mxf avi image2_alias_pix mxg avr image2_brender_pix nc avs image2pipe nistsphere bethsoftvid image_bmp_pipe nsv bfi image_dds_pipe nut bfstm image_dpx_pipe nuv bink image_exr_pipe ogg bintext image_j2k_pipe oma bit image_jpeg_pipe paf bmv image_jpegls_pipe pcm_alaw boa image_pam_pipe pcm_f32be brstm image_pbm_pipe pcm_f32le c93 image_pcx_pipe pcm_f64be caf image_pgm_pipe pcm_f64le cavsvideo image_pgmyuv_pipe pcm_mulaw cdg image_pictor_pipe pcm_s16be cdxl image_png_pipe pcm_s16le cine image_ppm_pipe pcm_s24be concat image_qdraw_pipe pcm_s24le data image_sgi_pipe pcm_s32be daud image_sunrast_pipe pcm_s32le dcstr image_tiff_pipe pcm_s8 dfa image_webp_pipe pcm_u16be dirac ingenient pcm_u16le dnxhd ipmovie pcm_u24be dsf ircam pcm_u24le dsicin iss pcm_u32be dss iv8 pcm_u32le dts ivf pcm_u8 dtshd ivr pjs dv jacosub pmp dvbsub jv pva dvbtxt live_flv pvf dxa lmlm4 qcp ea loas r3d ea_cdata lrc rawvideo eac3 lvf realtext epaf lxf redspark ffm m4v rl2 ffmetadata matroska rm filmstrip mgsts roq flac microdvd rpl rsd subviewer1 voc rso sup vpk rtp svag vplayer rtsp swf vqf sami tak w64 sap tedcaptions wav sbg thp wc3 sdp threedostr webm_dash_manifest sdr2 tiertexseq webvtt segafilm tmv wsaud shorten truehd wsd siff tta wsvqa sln tty wtv smacker txd wv smjpeg v210 wve smush v210x xa sol vag xbin sox vc1 xmv spdif vc1t xvag srt vivo xwma stl vmd yop str vobsub yuv4mpegpipe subviewer

Enabled muxers:

Enabled protocols: async hls rtmpt cache http rtp concat httpproxy srtp crypto icecast subfile data md5 tcp ffrtmphttp mmsh udp file mmst udplite ftp pipe unix gopher rtmp

Enabled filters: abench chromakey interleave acompressor ciescope join acrossfade codecview lenscorrection adelay color life adrawgraph colorbalance loop aecho colorchannelmixer lowpass aemphasis colorkey lut aeval colorlevels lut3d aevalsrc colorspace lutrgb afade compand lutyuv afftfilt compensationdelay mandelbrot aformat concat maskedmerge agate convolution mergeplanes ahistogram copy metadata ainterleave crop movie alimiter curves negate allpass datascope noformat allrgb dcshift noise allyuv dctdnoiz null aloop deband nullsink alphaextract decimate nullsrc alphamerge deflate overlay amerge dejudder pad ametadata deshake palettegen amix detelecine paletteuse amovie dilation pan anequalizer displace perms anoisesrc drawbox pixdesctest anull drawgraph psnr anullsink drawgrid qp anullsrc dynaudnorm random apad earwax readvitc aperms edgedetect realtime aphasemeter elbg remap aphaser equalizer removegrain apulsator erosion removelogo arealtime extractplanes replaygain aresample extrastereo reverse areverse fade rgbtestsrc aselect fftfilt rotate asendcmd field scale asetnsamples fieldhint scale2ref asetpts fieldmatch select asetrate fieldorder selectivecolor asettb firequalizer sendcmd ashowinfo flanger separatefields asplit format setdar astats fps setfield astreamselect framepack setpts atadenoise framerate setsar atempo framestep settb atrim gradfun showcqt avectorscope haldclut showfreqs bandpass haldclutsrc showinfo bandreject hdcd showpalette bass hflip showspectrum bbox highpass showspectrumpic bench histogram showvolume biquad hqx showwaves blackdetect hstack showwavespic blend hue shuffleframes bwdif hwdownload shuffleplanes cellauto hwupload sidechaincompress channelmap idet sidechaingate channelsplit il signalstats chorus inflate silencedetect silenceremove tblend vflip sine telecine vibrato smptebars testsrc vignette smptehdbars testsrc2 volume spectrumsynth thumbnail volumedetect split tile vstack ssim transpose w3fdif stereotools treble waveform stereowiden tremolo xbr streamselect trim yadif swaprect unsharp zoompan swapuv vectorscope

Enabled bsfs: aac_adtstoasc imx_dump_header mpeg4_unpack_bframes chomp mjpeg2jpeg noise dca_core mjpega_dump_header remove_extradata dump_extradata mov2textsub text2movsub h264_mp4toannexb mp3_header_decompress vp9_superframe hevc_mp4toannexb

Enabled indevs:

Enabled outdevs:

License: LGPL version 2.1 or later Creating config.mak, config.h, and doc/config.texi... config.h is unchanged libavutil/avconfig.h is unchanged libavcodec/bsf_list.c is unchanged libavformat/protocol_list.c is unchanged INSTALL libavfilter/libavfilter.so STRIP install-libavfilter-shared INSTALL libavformat/libavformat.so STRIP install-libavformat-shared INSTALL libavcodec/libavcodec.so STRIP install-libavcodec-shared INSTALL libswresample/libswresample.so STRIP install-libswresample-shared INSTALL libswscale/libswscale.so STRIP install-libswscale-shared INSTALL libavutil/libavutil.so STRIP install-libavutil-shared INSTALL libavfilter/avfilter.h INSTALL libavfilter/avfiltergraph.h INSTALL libavfilter/buffersink.h INSTALL libavfilter/buffersrc.h INSTALL libavfilter/version.h INSTALL libavfilter/libavfilter.pc INSTALL libavformat/avformat.h INSTALL libavformat/avio.h INSTALL libavformat/version.h INSTALL libavformat/libavformat.pc INSTALL libavcodec/avcodec.h INSTALL libavcodec/avdct.h INSTALL libavcodec/avfft.h INSTALL libavcodec/d3d11va.h INSTALL libavcodec/dirac.h INSTALL libavcodec/dv_profile.h INSTALL libavcodec/dxva2.h INSTALL libavcodec/jni.h INSTALL libavcodec/qsv.h INSTALL libavcodec/vaapi.h INSTALL libavcodec/vda.h INSTALL libavcodec/vdpau.h INSTALL libavcodec/version.h INSTALL libavcodec/videotoolbox.h INSTALL libavcodec/vorbis_parser.h INSTALL libavcodec/xvmc.h INSTALL libavcodec/libavcodec.pc INSTALL libswresample/swresample.h INSTALL libswresample/version.h INSTALL libswresample/libswresample.pc INSTALL libswscale/swscale.h INSTALL libswscale/version.h INSTALL libswscale/libswscale.pc INSTALL libavutil/adler32.h INSTALL libavutil/aes.h INSTALL libavutil/aes_ctr.h INSTALL libavutil/attributes.h INSTALL libavutil/audio_fifo.h INSTALL libavutil/avassert.h INSTALL libavutil/avstring.h INSTALL libavutil/avutil.h INSTALL libavutil/base64.h INSTALL libavutil/blowfish.h INSTALL libavutil/bprint.h INSTALL libavutil/bswap.h INSTALL libavutil/buffer.h INSTALL libavutil/cast5.h INSTALL libavutil/camellia.h INSTALL libavutil/channel_layout.h INSTALL libavutil/common.h INSTALL libavutil/cpu.h INSTALL libavutil/crc.h INSTALL libavutil/des.h INSTALL libavutil/dict.h INSTALL libavutil/display.h INSTALL libavutil/downmix_info.h INSTALL libavutil/error.h INSTALL libavutil/eval.h INSTALL libavutil/fifo.h INSTALL libavutil/file.h INSTALL libavutil/frame.h INSTALL libavutil/hash.h INSTALL libavutil/hmac.h INSTALL libavutil/hwcontext.h INSTALL libavutil/hwcontext_cuda.h INSTALL libavutil/hwcontext_dxva2.h INSTALL libavutil/hwcontext_vaapi.h INSTALL libavutil/hwcontext_vdpau.h INSTALL libavutil/imgutils.h INSTALL libavutil/intfloat.h INSTALL libavutil/intreadwrite.h INSTALL libavutil/lfg.h INSTALL libavutil/log.h INSTALL libavutil/macros.h INSTALL libavutil/mathematics.h INSTALL libavutil/mastering_display_metadata.h INSTALL libavutil/md5.h INSTALL libavutil/mem.h INSTALL libavutil/motion_vector.h INSTALL libavutil/murmur3.h INSTALL libavutil/opt.h INSTALL libavutil/parseutils.h INSTALL libavutil/pixdesc.h INSTALL libavutil/pixelutils.h INSTALL libavutil/pixfmt.h INSTALL libavutil/random_seed.h INSTALL libavutil/rc4.h INSTALL libavutil/rational.h INSTALL libavutil/replaygain.h INSTALL libavutil/ripemd.h INSTALL libavutil/samplefmt.h INSTALL libavutil/sha.h INSTALL libavutil/sha512.h INSTALL libavutil/stereo3d.h INSTALL libavutil/threadmessage.h INSTALL libavutil/time.h INSTALL libavutil/timecode.h INSTALL libavutil/timestamp.h INSTALL libavutil/tree.h INSTALL libavutil/twofish.h INSTALL libavutil/version.h INSTALL libavutil/xtea.h INSTALL libavutil/tea.h INSTALL libavutil/lzo.h INSTALL libavutil/avconfig.h INSTALL libavutil/ffversion.h INSTALL libavutil/libavutil.pc

Here are the contents of /usr/lib

ls /usr/lib/ cups java-1.7.0 libavcodec.so libavformat.so.57 libswresample.so.2.1.100 python2.7 dracut java-1.8.0 libavcodec.so.57 libavformat.so.57.41.100 libswscale.so rpm games java-ext libavcodec.so.57.48.101 libavutil.so libswscale.so.4 sendmail gcc jvm libavfilter.so libavutil.so.55 libswscale.so.4.1.100 sendmail.sendmail java jvm-commmon libavfilter.so.6 libavutil.so.55.28.100 locale tmpfiles.d java-1.5.0 jvm-exports libavfilter.so.6.47.100 libswresample.so modprobe.d yum-plugins java-1.6.0 jvm-private libavformat.so libswresample.so.2 pkgconfig

dirkvdb commented 7 years ago

What is the output of pkg-config --cflags libavcodec

ccoffey commented 7 years ago

pkg-config --cflags libavcodec

Package libavcodec was not found in the pkg-config search path. Perhaps you should add the directory containing `libavcodec.pc' to the PKG_CONFIG_PATH environment variable No package 'libavcodec' found

dirkvdb commented 7 years ago

pkg-config is not able to find the ffmpeg library description files, they should be in /usr/lib/pkgconfig

ccoffey commented 7 years ago

ls /usr/lib/pkgconfig

libavcodec.pc libavfilter.pc libavformat.pc libavutil.pc libswresample.pc libswscale.pc

Is there something weird about pkg-config and Amazon Linux?

Is PKG_CONFIG_PATH suppose to be set to something? I'm getting nothing for echo $PKG_CONFIG_PATH

dirkvdb commented 7 years ago

try setting it to /usr/lib/pkgconfig and see if it helps

ccoffey commented 7 years ago

Ok so the following gets me one step further

2.2 Set PKG_CONFIG_PATH on Amazon Linux

export PKG_CONFIG_PATH=/usr/lib/pkgconfig

  1. Attempt to build

/home/ec2-user/cmake-3.9.1-Linux-x86_64/bin/cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_GIO=ON -DENABLE_THUMBNAILER=ON .

/home/ec2-user/cmake-3.9.1-Linux-x86_64/bin/cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_STATIC=ON -DENABLE_SHARED=ON -DENABLE_GIO=ON -DENABLE_THUMBNAILER=ON .
-- Could NOT find PNG (missing: PNG_LIBRARY PNG_PNG_INCLUDE_DIR)
-- Checking for module 'libavcodec'
--   Found libavcodec, version 57.48.101
-- Checking for module 'libavformat'
--   Found libavformat, version 57.41.100
-- Checking for module 'libavutil'
--   Found libavutil, version 55.28.100
-- Checking for module 'libavfilter'
--   Found libavfilter, version 6.47.100
--
-- CONFIGURATION SUMMARY
-- png support          : disabled
-- jpeg support         : enabled
-- gio support          : enabled
-- register thumbnailer : enabled
-- unittests            : enabled
-- debug mode           : disabled
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ec2-user/ffmpegthumbnailer

png support = disabled above looks worrying, I see your script has sudo apt-get install libpng-dev I'm guessing I need to do the equivalent for yum.

dirkvdb commented 7 years ago

you need to have the png development libraries installed yes

ccoffey commented 7 years ago

sudo yum install libpng-devel

So close and yet so far!!!

Loaded plugins: priorities, update-motd, upgrade-helper 2909 packages excluded due to repository priority protections Resolving Dependencies --> Running transaction check ---> Package libpng-devel.x86_64 2:1.2.49-2.el6_7 will be installed --> Processing Dependency: libpng = 2:1.2.49-2.el6_7 for package: 2:libpng-devel-1.2.49-2.el6_7.x86_64 --> Running transaction check ---> Package libpng.i686 2:1.2.49-2.el6_7 will be installed --> Processing Dependency: libz.so.1 for package: 2:libpng-1.2.49-2.el6_7.i686 --> Processing Dependency: libm.so.6(GLIBC_2.0) for package: 2:libpng-1.2.49-2.el6_7.i686 --> Processing Dependency: libm.so.6 for package: 2:libpng-1.2.49-2.el6_7.i686 --> Processing Dependency: libc.so.6(GLIBC_2.4) for package: 2:libpng-1.2.49-2.el6_7.i686 --> Running transaction check ---> Package glibc.i686 0:2.12-1.209.el6_9.2 will be installed --> Processing Dependency: glibc-common = 2.12-1.209.el6_9.2 for package: glibc-2.12-1.209.el6_9.2.i686 --> Processing Dependency: libfreebl3.so(NSSRAWHASH_3.12.3) for package: glibc-2.12-1.209.el6_9.2.i686 --> Processing Dependency: libfreebl3.so for package: glibc-2.12-1.209.el6_9.2.i686 ---> Package zlib.i686 0:1.2.3-29.el6 will be installed --> Running transaction check ---> Package glibc.i686 0:2.12-1.209.el6_9.2 will be installed --> Processing Dependency: glibc-common = 2.12-1.209.el6_9.2 for package: glibc-2.12-1.209.el6_9.2.i686 ---> Package nss-softokn-freebl.i686 0:3.14.3-23.3.el6_8 will be installed --> Finished Dependency Resolution Error: Package: glibc-2.12-1.209.el6_9.2.i686 (updates) Requires: glibc-common = 2.12-1.209.el6_9.2 Installed: glibc-common-2.17-157.170.amzn1.x86_64 (installed) glibc-common = 2.17-157.170.amzn1 Available: glibc-common-2.12-1.209.el6.x86_64 (base) glibc-common = 2.12-1.209.el6 Available: glibc-common-2.12-1.209.el6_9.1.x86_64 (updates) glibc-common = 2.12-1.209.el6_9.1 Available: glibc-common-2.12-1.209.el6_9.2.x86_64 (updates) glibc-common = 2.12-1.209.el6_9.2 You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest

dirkvdb commented 7 years ago

I have never used yum. But make sure your system is updated before trying to install the lib.

ccoffey commented 7 years ago

Ok it looks like I managed to get it working

/home/ec2-user/cmake-3.9.1-Linux-x86_64/bin/cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_GIO=ON -DENABLE_THUMBNAILER=ON .
--
-- CONFIGURATION SUMMARY
-- png support          : enabled
-- jpeg support         : enabled
-- gio support          : enabled
-- register thumbnailer : enabled
-- unittests            : enabled
-- debug mode           : disabled
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ec2-user/ffmpegthumbnailer

Where is the binary tho? I was hoping to do something like bin/ffmpegthumbnailer --version or something to verify that its built correctly and working.

ccoffey commented 7 years ago

Weird

make
sudo make install
ffmpegthumbnailer
ffmpegthumbnailer: error while loading shared libraries: libffmpegthumbnailer.so.4: cannot open shared object file: No such file or directory
ccoffey commented 7 years ago

Not really sure whats wrong here, any ideas?

screen shot 2017-08-20 at 14 43 12
ccoffey commented 7 years ago

Finally got it! I had to do the following!

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib:/usr/local/lib64

Then I can do

ffmpegthumbnailer -v
ffmpegthumbnailer version: 2.2.0
dirkvdb commented 7 years ago

Your system seems to behave weird when it comes to library locations. Setting the LD_LIBRARY_PATH manually will always do the trick. Good to see you git it working.

tanya-an commented 5 years ago

@dirkvdb I'm trying to build ffmpegthumbnailer on Amazon Linux AMI, and I need help. Here are all my steps:

git clone https://github.com/dirkvdb/ffmpegthumbnailer.git
cd ffmpegthumbnailer/
make
sudo make install

ffmpeg version 4.1-static https://johnvansickle.com/ffmpeg/ cmake-3.13.1-Linux-x86_64

ffmpeg1

When I change cmake_install.cmake:50 FILE "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/ffmpegthumbnailer/ffmpegthumbnailer"

ffmpeg2