Closed jajm closed 2 years ago
Can you share what version of ImageMagick you're using? It would be good to know if this is something that's version-specific.
I'm using the debian package for bullseye (https://packages.debian.org/bullseye/imagemagick, 8:6.9.11.60+dfsg-1.3)
convert --version
says:
Version: ImageMagick 6.9.11-60 Q16 x86_64 2021-01-25 https://imagemagick.org
Copyright: (C) 1999-2021 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC Modules OpenMP(4.5)
Delegates (built-in): bzlib djvu fftw fontconfig freetype heic jbig jng jp2 jpeg lcms lqr ltdl lzma openexr pangocairo png tiff webp wmf x xml zlib
OK, thanks.
It looks like where other versions I'm familiar with have listed "mpeg" as the name of the generic video support, this Debian one has "video." From some poking around, it looks like this is something they changed in ImageMagick 6.9.11-31.
Does setting the "prefix" to video
also work for you? I think it should.
Using "mp4" or something similar is probably the best approach for the time being... it looks like it should work fine for both versions, we'll just have to do some testing to confirm on the older ones where "mpeg" is currently working.
Does setting the "prefix" to
video
also work for you? I think it should.
Yes it does
I'll do some more investigation but I believe the root of this issue is just that there's actually a bug with the "mpeg" format specifically in your newer version, such that using "mp4" where we previously used "mpeg" is actually a viable solution here.
Including the extension with the temp filename is an option as well but would require more in the way of changes.
If I try to upload an MP4 video file, the thumbnails are not created.
These errors appear in log file:
Here is a short video for testing: https://user-images.githubusercontent.com/306836/167829151-008771ae-adaa-400f-a170-387f8a47a83b.mp4
If I change
mpeg:
tomp4:
inapplication/src/File/Thumbnailer/ImageMagick.php
and re-upload the file, then the thumbnail creation works.Of course changing the "prefix" in thumbnailer code is not a practical solution. But maybe if the temporary file kept the extension of the original file, there will be no need for the prefix at all ?