MG 2.2 MP4 thumbnail not generated

Joao Prates

Member
Hi,

When adding a video into a media gallery via upload of a local file (MP4) we don't get any thumbnail for it in the album.
If we do it via YouTube url then we get the thumbnail with no problem whatsoever:

1606753275889.png

I would also submit the idea that just showing the image (or lack thereof) is not good enough for a user to figure out what's in store behind it, it's bad interface design.
Showing the name of the media at the very least should be the minimum requirement. As it stands we have to hoover the mouse pointer over it to find out what it is.
Now if we have an algum with dozens of movies that's going to be an absolutely nightmare to manage.

so:
1) Why aren't we getting the thumbnail (I tried both Imagemagick and default PHP GD methods)
and
2) How to pin the media name and/or description to its thumbnail?
 

Mike

XenForo developer
Staff member
To generate video thumbnails, you need FFmpeg to be installed on the server and then you need to point XFMG to it. This can be done via the "Enable FFmpeg features" option. (You can use the control panel search to jump directly to it.)

In terms of displaying the media info in all cases, you could try this CSS:
Code:
.itemList-itemOverlay { bottom: 0; }
(You should be able to add it to extra.less.)
 

Joao Prates

Member
Thanks Mike!

1606839975459.png

I already installed ffmpeg and set it up in the control panel (see above), but still thumbnails are missing (see below):

1606840025744.png

Also did a "XFMG: Rebuild media thumbnails" and still nothing appears.

What else do I need?
 

Mike

XenForo developer
Staff member
So I think that should be sufficient and rebuilding XFMG's media thumbnails should indeed rebuild existing media items. I grabbed one of the videos uploaded to your site and tested it locally, and I got a thumbnail as expected.

So at this point, I'm wondering if there's an ffmpeg issue. We do try to check a number of things to ensure that it has also the components we expect, but perhaps something isn't working as expected. As a first check, can you run this via the command line on your server?

Code:
/bin/ffmpeg -version

Can you show me what that returns?
 

Joao Prates

Member
First of all thanks a lot for supporting my request, since apparently it is being caused by something wrong locally, I greatly appreciate your efforts!

Here is the version info I got:

Code:
$ /bin/ffmpeg -version
ffmpeg version 2.7.1 Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.9.3 (crosstool-NG 1.20.0) 20150311 (prerelease)
configuration: --prefix=/usr --incdir='${prefix}/include/ffmpeg' --arch=i686 --target-os=linux --cross-prefix=/usr/local/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu- --enable-cross-compile --enable-optimizations --enable-pic --enable-gpl --enable-shared --disable-static --enable-version3 --enable-nonfree --enable-libfaac --enable-encoders --enable-pthreads --disable-bzlib --disable-protocol=rtp --disable-muxer=image2 --disable-muxer=image2pipe --disable-swscale-alpha --disable-ffserver --disable-ffplay --disable-devices --disable-bzlib --disable-altivec --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libmp3lame --disable-vaapi --disable-decoder=amrnb --disable-decoder=ac3 --disable-decoder=ac3_fixed --disable-encoder=zmbv --disable-encoder=dca --disable-encoder=ac3 --disable-encoder=ac3_fixed --disable-encoder=eac3 --disable-decoder=dca --disable-decoder=eac3 --disable-decoder=truehd --cc=/usr/local/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-ccache-gcc --enable-yasm --enable-libx264 --enable-encoder=libx264
libavutil      54. 27.100 / 54. 27.100
libavcodec     56. 41.100 / 56. 41.100
libavformat    56. 36.100 / 56. 36.100
libavdevice    56.  4.100 / 56.  4.100
libavfilter     5. 16.101 /  5. 16.101
libswscale      3.  1.101 /  3.  1.101
libswresample   1.  2.100 /  1.  2.100
libpostproc    53.  3.100 / 53.  3.100
 

Mike

XenForo developer
Staff member
So the most notable thing may be that this is a very old FFmpeg build from 2015. That isn't necessarily known to be a specific problem -- we have code that blocks pre-2013 versions due to issues -- though it's possible there's been a regression in our code.

I don't know if it's viable to swap to a newer version. One nice thing is that there are static builds made available which are essentially just dropping a precompiled binary in place and pointing XFMG at it. Those can be downloaded here:


If you're not comfortable with that (or it's not vaible), if you submit a ticket with FTP or similar access along with XF control panel access, I can try to do a bit of debugging to more specifically determine what the issue.
 

Joao Prates

Member
As it is often the case in this type of discussions, sometimes we find out the problem just by systematically thinking about it in order to explain it to the other person :)

I was about to tell you that something is fishy because I had just installed ffmpeg from a recent package and it would not make any sense for it to be so old. Then I realized that maybe the "which" command did not return the latest package installed and... bingo... the most recent one was on another location.

This is the correct ffmpeg version, for which I already updated the correct path in the ACP and the thumbnails got generated fine:

Code:
ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 4.9.3 (crosstool-NG 1.20.0) 20150311 (prerelease)
configuration: --target-os=linux --cross-prefix=/home/spksrc/git-master/spksrc/toolchains/syno-x64-6.1/work/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu- --prefix=/var/packages/ffmpeg/target --extra-cflags=-I/home/spksrc/git-master/spksrc/spk/ffmpeg/work-x64-6.1/install/var/packages/ffmpeg/target/include --extra-ldflags=-L/home/spksrc/git-master/spksrc/spk/ffmpeg/work-x64-6.1/install/var/packages/ffmpeg/target/lib --extra-libs='-lxml2 -ldl' --pkg-config=/usr/bin/pkg-config --ranlib=/home/spksrc/git-master/spksrc/toolchains/syno-x64-6.1/work/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-ranlib --enable-cross-compile --enable-rpath --enable-pic --enable-shared --enable-gpl --enable-version3 --enable-fontconfig --enable-libass --enable-libbluray --enable-avresample --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-libopus --enable-libsoxr --enable-libtheora --enable-libvorbis --enable-libspeex --enable-libx264 --enable-libx265 --enable-gnutls --enable-libopencore-amrnb --enable-libopencore-amrwb --disable-debug --disable-doc --disable-static --enable-debug=1 --enable-libfdk-aac --enable-nonfree --extra-cflags=-DSYNO_VIDEOSTATION --extra-cflags=-fno-if-conversion --extra-cflags=-O3 --extra-cflags=-Wno-deprecated-declarations --enable-libvpx --enable-libzmq --enable-libshine --enable-libaom --enable-libsvtav1 --arch=x86_64 --enable-vaapi --enable-libmfx --enable-libsvthevc
libavutil      56. 51.100 / 56. 51.100
libavcodec     58. 91.100 / 58. 91.100
libavformat    58. 45.100 / 58. 45.100
libavdevice    58. 10.100 / 58. 10.100
libavfilter     7. 85.100 /  7. 85.100
libavresample   4.  0.  0 /  4.  0.  0
libswscale      5.  7.100 /  5.  7.100
libswresample   3.  7.100 /  3.  7.100
libpostproc    55.  7.100 / 55.  7.100

Thanks for your help, I could not have gotten here without your assistance!
 
Top