Comments (9)
Hi @dhruv-nudge,
Your cmake command line looks correct. I just repeated your steps in a version of Debian Linux. I can't reproduce the cmake errors. I tested the tip of the main branch of libavif.
What version of libavif are you using?
What is the output of cmake --version
?
Note: Unrelated to your cmake problem: I recommend running the ./dav1d.cmd
command in the ext
directory and adding -DAVIF_CODEC_DAV1D=LOCAL
to your cmake command line. The dav1d AV1 decoder is faster than the AV1 decoder in libaom.
from libavif.
hey I am using 1.0.3 like in README
cmake version 3.22.2
when runngin ./libyuv.cmd
, I am getting this in logs
-- Could NOT find JPEG (missing: JPEG_LIBRARY JPEG_INCLUDE_DIR)
and I get this when I run ./libsharpyuv.cmd
fatal: destination path 'libwebp' already exists and is not an empty directory.
HEAD is now at e2c85878 Add an initializer for the SharpYuvOptions struct.
mkdir: cannot create directory ‘build’: File exists
-- Could NOT find OpenGL (missing: OPENGL_opengl_LIBRARY OPENGL_glx_LIBRARY OPENGL_INCLUDE_DIR)
-- Adding -lm flag.
-- Could NOT find PNG (missing: PNG_LIBRARY PNG_PNG_INCLUDE_DIR)
-- Could NOT find JPEG (missing: JPEG_LIBRARY JPEG_INCLUDE_DIR)
-- TIFF is disabled when statically linking.
-- Could NOT find GIF (missing: GIF_LIBRARY GIF_INCLUDE_DIR)
-- Performing Test WEBP_HAVE_FLAG_SSE41
-- Performing Test WEBP_HAVE_FLAG_SSE41 - Failed
-- Performing Test WEBP_HAVE_FLAG_SSE41
-- Performing Test WEBP_HAVE_FLAG_SSE41 - Failed
-- Performing Test HAS_COMPILE_FLAG
-- Performing Test HAS_COMPILE_FLAG - Failed
-- Performing Test WEBP_HAVE_FLAG_SSE2
-- Performing Test WEBP_HAVE_FLAG_SSE2 - Failed
-- Performing Test WEBP_HAVE_FLAG_SSE2
-- Performing Test WEBP_HAVE_FLAG_SSE2 - Failed
-- Performing Test HAS_COMPILE_FLAG
-- Performing Test HAS_COMPILE_FLAG - Failed
-- Performing Test WEBP_HAVE_FLAG_MIPS32
-- Performing Test WEBP_HAVE_FLAG_MIPS32 - Failed
-- Performing Test WEBP_HAVE_FLAG_MIPS32
-- Performing Test WEBP_HAVE_FLAG_MIPS32 - Failed
-- Performing Test WEBP_HAVE_FLAG_MIPS_DSP_R2
-- Performing Test WEBP_HAVE_FLAG_MIPS_DSP_R2 - Failed
-- Performing Test WEBP_HAVE_FLAG_MIPS_DSP_R2
-- Performing Test WEBP_HAVE_FLAG_MIPS_DSP_R2 - Failed
-- Performing Test HAS_COMPILE_FLAG
-- Performing Test HAS_COMPILE_FLAG - Failed
-- Performing Test WEBP_HAVE_FLAG_NEON
-- Performing Test WEBP_HAVE_FLAG_NEON - Success
-- Performing Test WEBP_HAVE_FLAG_MSA
-- Performing Test WEBP_HAVE_FLAG_MSA - Failed
-- Performing Test WEBP_HAVE_FLAG_MSA
-- Performing Test WEBP_HAVE_FLAG_MSA - Failed
-- Performing Test HAS_COMPILE_FLAG
-- Performing Test HAS_COMPILE_FLAG - Failed
-- Could NOT find SDL (missing: SDL_LIBRARY SDL_INCLUDE_DIR)
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ec2-user/libavif/ext/libwebp/build
do we need to install more libraries before following all the steps?
from libavif.
I tried with version 1.0.4 of libavif as well in ubuntu 22, but still getting errors
-- libavif: libyuv not found; libyuv-based fast paths disabled.
-- libavif: libsharpyuv not found
-- libavif: Enabling warnings for GCC
CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find aom (missing: AOM_LIBRARY AOM_LIBRARIES AOM_INCLUDE_DIR)
Call Stack (most recent call first):
/usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
cmake/Modules/Findaom.cmake:32 (find_package_handle_standard_args)
CMakeLists.txt:463 (find_package)
from libavif.
Thanks for the libavif versions. With version 1.0.x, you need to use the old-style options to enable libaom, libyuv, etc. The README file you read is apparently from the tip of the main branch, so it describes the new-style options. This unfortunate discrepancy will be fixed when we create the 1.1.0 release.
When using version 1.0.x, change
-DAVIF_CODEC_AOM=LOCAL -DAVIF_LIBYUV=LOCAL -DAVIF_LIBSHARPYUV=LOCAL -DAVIF_JPEG=LOCAL -DAVIF_ZLIBPNG=LOCAL
to
-DAVIF_CODEC_AOM=ON -DAVIF_LOCAL_AOM=ON -DAVIF_LOCAL_LIBYUV=ON -DAVIF_LOCAL_LIBSHARPYUV=ON -DAVIF_LOCAL_JPEG=ON -DAVIF_LOCAL_ZLIBPNG=ON
Note that the old-stype options will continue to be supported for a while.
As for the error (or rather, warning) messages when you ran ./libyuv.cmd
and ./libsharpyuv.cmd
, those libraries are apparently for optional features in libyuv and libsharpyuv. If those libraries are not installed on your system, the optional features are not built. If you can build libavif successfully, it means libavif does not use those optional features of libyuv and libsharpyuv. In that case you can safely ignore those error messages.
Finally, this error message from ./libsharpyuv.cmd
fatal: destination path 'libwebp' already exists and is not an empty directory.
can be fixed by removing the libwebp
directory before you run ./libsharpyuv.cmd
again.
from libavif.
@wantehchang thanks a lot, it worked!
from libavif.
I also wanted to just confirm are those optional libraries important to convert all kinds of images to avif
?
I want to convert all formats (png, jpg, giff, webp, tiff and etc) to avif
. I will not convert from avif to any other format.
from libavif.
Hi @dhruv-nudge
I can only answer the question for libyuv: libavif doesn't use the optional feature of libyuv that requires libjpeg.
The question is harder to answer for libsharpyuv. libsharpyuv is a component of libwebp. I believe we are running the cmake command to configure the enture libwebp, and then only build the libsharpyuv component. Intuitively I would expect that those optional features that require additional libraries to be installed on the system are outside libsharpyuv, but I didn't spend the time verifying that.
from libavif.
Also, the avifenc
command can only convert PNG and JPEG inputs to AVIF. It cannot convert GIF, WebP, and TIFF to AVIF. I think there is a feature request for avifenc
to support additional input image formats. You can look into using ffmpeg
or ImageMagick
to do that.
from libavif.
Intuitively I would expect that those optional features that require additional libraries to be installed on the system are outside libsharpyuv, but I didn't spend the time verifying that.
Yes, that is true. The support libraries (jpeg, tiff, png, gif) are only used by the examples like cwebp and dwebp.
from libavif.
Related Issues (20)
- Sample HDR AVIF decoded to JPG shows incorrect colors HOT 8
- How to build a dynamic library that statically links all dependencies? HOT 1
- Ignore and skip FullBoxes with an unrecognized version
- How to build the.A use of iOS platform? HOT 2
- Make libyuv package-friendly dependency HOT 2
- Roll YCgCo-R out HOT 1
- Add Homebrew install instructions and avifdec/avifenc examples to README HOT 6
- autoconf etc. HOT 1
- avifImageRGBToYUV should set color space to default values HOT 2
- Findrav1e.cmake ignores library dependencies listed in the generated pkgconfig file HOT 5
- [Function Request] avifenc supports svt and rav1e encoder options key-value HOT 2
- MSYS/MinGW32: Linking error, undefined references to Nt file functions HOT 2
- Noticeable color shift HOT 6
- Does CVE-2024-1580 affect libavif with dav1d decoder? HOT 1
- Static build issues on MSYS2 HOT 4
- sharpyuv conversion failed HOT 2
- libavif.a should not be a combined archive library HOT 5
- GIF encodes with wrong frame rate HOT 14
- Avif-alpha is working as expected HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libavif.