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

"Unknown file format" when using stdin for AVIF on Linux #107

Closed
ndren opened this issue Sep 4, 2022 · 8 comments
Closed

"Unknown file format" when using stdin for AVIF on Linux #107

ndren opened this issue Sep 4, 2022 · 8 comments
Labels
bug Not working as advertised compatibility Compatibility (e.g. terminal quirks)
Milestone

Comments

@ndren
Copy link

ndren commented Sep 4, 2022

Running the following works:
chafa lisa.avif
cat lisa.avif | chafa /dev/stdin # this is a bashism
The following does not work:
cat lisa.avif | chafa
cat lisa.avif | chafa -
This is not because of the file extension itself as removing it makes no difference.
lisa.avif.tar.gz

@hpjansson
Copy link
Owner

Hi, thanks for reporting this.

AVIF is handled by the generic ImageMagick-based loader, and it needs a workaround to handle situations where chafa already processed stdin looking for headers etc. Since ImageMagick support is going away soon, I'm a little torn on whether this is worth doing. It'd be better to add a native AVIF loader instead.

@clort81
Copy link

clort81 commented Jan 29, 2023

I'm interested in avif as it is excellent for small files.
I've been using heifg-enc and avifenc. Cannot decide which is better. Both generate files that chafa loads with wrong colors btw .

@hpjansson
Copy link
Owner

I'll see if I can prioritize an AVIF loader. I'd love to have a test case or two that come up with wrong colors currently.

@hpjansson hpjansson added bug Not working as advertised compatibility Compatibility (e.g. terminal quirks) labels Jul 14, 2023
@hpjansson
Copy link
Owner

(A native AVIF loader will also solve the stdin problem).

@ploum
Copy link

ploum commented Dec 22, 2023

I have it this chafa limitation when browsing on https://arne.me/articles/emacs-from-scratch-part-one-foundations/ with offpunk.

@hpjansson
Copy link
Owner

Ok. Will have to do this for the next milestone.

@hpjansson hpjansson added this to the 1.16 milestone Dec 23, 2023
@ploum
Copy link

ploum commented Dec 23, 2023 via email

@hpjansson hpjansson modified the milestones: 1.16, 1.14 Dec 29, 2023
@hpjansson
Copy link
Owner

Just realized I already added native AVIF support (see #157), but overlooked this issue. It works for me on master, fix will be in 1.14.0!

stevenwalton added a commit to stevenwalton/homebrew-core that referenced this issue Sep 26, 2024
Current formula does not support viewing AVIF (AV1) files nor does it
support JPEG-XL files.
This is resolved by adding dependencies for libavif and jpeg-xl.

Native AVIF format has been supported since version 1.14.0, wherein
ImageMagick was removed. Details in chafa 107 and 157
hpjansson/chafa#107
hpjansson/chafa#157
carlocab pushed a commit to stevenwalton/homebrew-core that referenced this issue Sep 26, 2024
Current formula does not support viewing AVIF (AV1) files nor does it
support JPEG-XL files.
This is resolved by adding dependencies for libavif and jpeg-xl.

Native AVIF format has been supported since version 1.14.0, wherein
ImageMagick was removed. Details in chafa 107 and 157
hpjansson/chafa#107
hpjansson/chafa#157
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Not working as advertised compatibility Compatibility (e.g. terminal quirks)
Projects
None yet
Development

No branches or pull requests

4 participants