Ops!
Thanks for testing then. Since I'm already coding, I can take charge of
doing further tests and updating the documentation/code where needed.
Just one comment regarding the VIDEO vs MPEG issue: it's not version
6.9.11 exactly, it's 6.9.11-31 (6.9.11-30 still uses the MPEG format
name :)).
Thanks!
Abel
El 17/11/2023 a las 16:46, Steli Vali escribió:
> Hi Abel,
>
> tested again, and even if we change the format to MPEG, an error still
> occurs:
> InvalidImageIndex (for any index as I tried with 1, 10, 100 and still
> get that error)
>
> It is also a Bug reported about something similar here: IM7: subimage
> specification returns no images - Legacy ImageMagick Discussions Archive
> <
https://legacy.imagemagick.org/discourse-server/viewtopic.php?t=35435>
>
https://github.com/ImageMagick/ImageMagick6/commit/4872c693299802cfe6677742867098f64440d9aa <
https://github.com/ImageMagick/ImageMagick6/commit/4872c693299802cfe6677742867098f64440d9aa>).
>
> Thus, I'm pretty confident that (assuming ImageMagick has
> enough resources) the following command will indeed work
> (notice the MPEG vs VIDEO format):
>
> convert -size 640x480 MPEG:./video.tmp[100] thumb.jpg
>
> Thus, I'm also pretty confident that changing "VIDEO" to
> "MPEG" in line 66 in file
> `dspace-api/src/main/java/org/dspace/app/mediafilter/ImageMagickVideoThumbnailFilter.java` (see
https://github.com/DSpace/DSpace/blob/50b47b707ccc4f0d7ed3887f08f0a88a39686f29/dspace-api/src/main/java/org/dspace/app/mediafilter/ImageMagickVideoThumbnailFilter.java#L66 <
https://github.com/DSpace/DSpace/blob/50b47b707ccc4f0d7ed3887f08f0a88a39686f29/dspace-api/src/main/java/org/dspace/app/mediafilter/ImageMagickVideoThumbnailFilter.java#L66>) would also make this filter work in older ImageMagick/Linux distributions (such as ubuntu 20.04).
>
https://biblioteca.sistedes.es/bitstreams/a81773f8-aa61-45b5-90f0-ba53a8cf8378/download <
https://biblioteca.sistedes.es/bitstreams/a81773f8-aa61-45b5-90f0-ba53a8cf8378/download> -q -O video.tmp
> root@debian11:~# convert -size 640x480
> VIDEO:./video.tmp[100] thumb.jpg
> root@debian11:~# ll -h thumb.jpg
> -rw-r--r-- 1 root root 183K Nov 17 13:36 thumb.jpg
> ```
>
> But fails in Ubuntu 20.04 with an error similar to
> the one you reported:
>
> ```
> root@UBUNTU20:~# wget
>
https://biblioteca.sistedes.es/bitstreams/a81773f8-aa61-45b5-90f0-ba53a8cf8378/download <
https://biblioteca.sistedes.es/bitstreams/a81773f8-aa61-45b5-90f0-ba53a8cf8378/download> -q -O video.tmp
> root@UBUNTU20:~# convert -size 640x480
> VIDEO:./video.tmp[100] thumb.jpg
> convert-im6.q16: unable to open image
> `VIDEO:./video.tmp[100]': No such file or directory
> @ error/blob.c/OpenBlob/2874.
> convert-im6.q16: no decode delegate for this image
> format `TMP' @ error/constitute.c/ReadImage/572.
> convert-im6.q16: no images defined `thumb.jpg' @
> error/convert.c/ConvertImageCommand/3258.
> root@UBUNTU20:~#
> ```
>
> Thus, it seems is something related to the Ubuntu
> distribution rather than DSpace.
>
> In any case, I'll investigate the root cause to see
> if we can improve the documentation at
>
https://wiki.lyrasis.org/display/DSDOC7x/ImageMagick+Media+Filters#ImageMagickMediaFilters-PossibleErrors/Issues <
https://wiki.lyrasis.org/display/DSDOC7x/ImageMagick+Media+Filters#ImageMagickMediaFilters-PossibleErrors/Issues>
>
> I feel kind of responsible since I contributed this
> video filter :)
>
> Cheers,
>
> Abel
>
> El viernes, 17 de noviembre de 2023 a las 13:00:02
> UTC+1, Steli Vali escribió:
>
> Hi Abel,
>
> sorry for the late reply, I had some problems
> with the ORCID in DSpace and prioritesed that.
> I have tested with you file and the same error:
> convert-im6.q16: unable to open image
> `VIDEO:/tmp/imthumb12321.tmp[100]': No such file
> or directory @ error/blob.c/OpenBlob/2874
>
> Also get the same error when I try to execute it
> directly in terminal: convert -size 640x480
> -depth 8 VIDEO:/home/dspace/FAUDSpace.mp4
> vidthumb.png
> Error: convert-im6.q16: unable to open image
> `VIDEO:/home/dspace/FAUDSpace.mp4': No such file
> or directory @ error/blob.c/OpenBlob/2874
>
> What I noticed is that here
>
https://imagemagick.org/script/command-line-processing.php#input <
https://imagemagick.org/script/command-line-processing.php#input> the comand is not convert but magick. When I try this command I get "Command 'magick' not found".
>
https://imagemagick.org/script/command-line-processing.php#input <
https://imagemagick.org/script/command-line-processing.php#input>), and the VIDEO type is specified in the supported file formats list (see
https://imagemagick.org/script/formats.php#supported <
https://imagemagick.org/script/formats.php#supported>).
> <
https://hdl.handle.net/11705/SEM/SEM024>?
> --
> All messages to this mailing list should adhere to the Code of Conduct:
>
https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
> <
https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx>
> ---
> You received this message because you are subscribed to the Google
> Groups "DSpace Technical Support" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
dspace-tech...@googlegroups.com
> <mailto:
dspace-tech...@googlegroups.com>.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/dspace-tech/bca19427-0cbe-48a3-9763-c8945c804e1cn%40googlegroups.com <
https://groups.google.com/d/msgid/dspace-tech/bca19427-0cbe-48a3-9763-c8945c804e1cn%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
Abel Gómez Llana, PhD
ab...@gomez.llana.me
https://abel.gomez.llana.me