Skip to content
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

Replace ImageMagick with FFmpeg? #98

Open
ndren opened this issue Jul 17, 2022 · 4 comments
Open

Replace ImageMagick with FFmpeg? #98

ndren opened this issue Jul 17, 2022 · 4 comments

Comments

@ndren
Copy link

ndren commented Jul 17, 2022

I have seen thoughts on removing ImageMagick for performance reasons floating around. That sounds quite nice! I am thinking about how that would impact the vast array of file formats that chafa supports through it (AVIF comes to mind). Fortunately, FFmpeg does support a lot of these (at least in git), and certainly all that I've used!

Would FFmpeg be of suitable performance? From what I can tell, it can do codec work it can do much more efficiently than ImageMagick, but I'm not sure if that translates well to chafa. What do you think?

For reference:
magick identify -list format
ffmpeg -list-formats

@hpjansson
Copy link
Owner

Yes, ffmpeg would be an improvement over ImageMagick for many reasons. And at this point we have enough direct loaders that ffmpeg could be optional, so you wouldn't be forced to go hunting for devel packages.

Tangentially, I've been trying to get away from big, complex dependencies because they cause problems like the one we currently have with FreeType. It causes a circular dependency (Chafa -> FreeType -> Harfbuzz -> Chafa), which means some distros will build Harfbuzz/hb-view without Chafa support. There are ways to solve this at the distro level, but I don't expect packagers to make a bootstrap build etc. just to accommodate us :-)

So the only long-term solution is to split out the command-line tools from the repository and make a new repository called chafa-util or something like that. Then we can go hog wild with dependencies there.

@hpjansson
Copy link
Owner

hpjansson commented Jul 19, 2022

@ndren By the way, are you using any of the fancy loaders from ImageMagick? AVIF, anything else? Just to get an idea of what's useful.

@ndren
Copy link
Author

ndren commented Jul 21, 2022

@hpjansson No, not really. I thought of webp, but that seems to be already explicitly covered.

@hpjansson
Copy link
Owner

I added AVIF support and removed ImageMagick. Still on the fence re. ffmpeg :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants