New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regression in support of MPEG video after coder name-change to "video" #181
Comments
We could not reproduce this issue with the latest release of ImageMagick version 6 (6.9.12-54) or 7 (7.1.0-39). Upgrade your release and you should get expected results. |
The problem doesn't exist in latest 7, but I do still reproduce in 6. Built from current main branch:
The 7 codebase contains code registering the MPEG format with the video coder that is absent in 6. |
Looking more closely, what happened here is that the 6 version of the change to the "video" coder made a (presumed) mistake that the 7 version did not: it changed the MPEG format registration to VIDEO as well. So if you look at 6 vs 7, 6 now has a VIDEO format in I linked to a line in the 7 codebase in my last comment. Note that the corresponding line in 6 registers the format VIDEO where 7 (and old versions of 6) register MPEG. |
Recompiling with this change applied resolves the issue. A simpler version that just changes the string on video.c's line 282 from "VIDEO" back to "MPEG" would also do it, though would be a possible issue for anyone having come to rely on the presence of the VIDEO format, since it has now existed in 6 for a while. |
Thanks for the problem report. We can reproduce it and will have a patch to fix it in the GIT main branch @ https://github.com/ImageMagick/ImageMagick later today. The patch will be available in the beta releases of ImageMagick @ https://imagemagick.org/download/beta/ by sometime tomorrow. |
ImageMagick version
6.9.11-60
Operating system
Linux
Operating system, version and so on
Ubuntu 22.04
Description
The new "video" coder doesn't declare an "MPEG" format anymore, but there's several leftovers in the code referring to it, i.e.:
ImageMagick6/coders/video.c
Line 375 in 3b18a98
ImageMagick6/magick/coder.c
Line 190 in 78395b3
ImageMagick6/magick/magic.c
Line 148 in 78395b3
The result is that IM detects MPEG-1 ".mpeg/.mpg" video files as the
MPEG
format but doesn't know what to do from there. You can work around it by explicitly specifying the format of any of the video formats that are registered, but by default it will "magic" detect the format MPEG and fail (and of course manually specifying the formatMPEG
also fails).I assume that this was just a bit of a mistake/confusion since MPEG used to be the generic coder name before it was changed to VIDEO.
Steps to Reproduce
From IM 6.9.11-60:
While IM 6.9.10-23 works. As does
identify "MP4:test.mpg"
on 6.9.11.Images
No response
The text was updated successfully, but these errors were encountered: