Record the process of tossing and WEBP

Source: Internet
Author: User
Tags webp

Recently there are customers who want to deal with the webp of the map, of course, we can not handle the WEBP format of the picture. The matter was given to me to toss and start thinking about using the Swiss Army knife ffmpeg. The result is tossing for almost a day, and then compiled dozens of times ffmpeg source code after the discovery, does not support decode led painting webp .... Hang Daddy. But also familiar with the source code compilation process, basically:

./Configuremake makeinstall

When running configure, you usually need to take some parameters as needed, such as when tossing ffmpeg, because you need to enable some options for WEBP and these options have dependent library files

./configure--extra-cflags=-i/usr/local/include--extra-ldflags=-l/usr/local/lib

The--extra-cflags here is to tell the compiler where to search for the header file,--extra-ldflags is to tell the compiler where to find the library file that needs to be linked, believe me these two parameters are very important ...

FFmpeg after I found Google's own libwebp, download the source code compilation process is very similar, it is worth mentioning that if you want to compile a tool to support a variety of input and output formats and other additional functions, you must require the installation of the appropriate libraries, such as if you want to DWEP tool WEBP Images converted to JPG and PNG require the machine to be libpng. I happen to have this demand, so once again download the source code compilation installation, everything seems smooth. However, when compiling the LIBWEBP itself, it was found that DWEP's PNG support was not turned on, and the Configure printed log found that he had an error calling the Libpng-config script:

/bin/sh^m:bad interpreter:

A face between forced me to search the Internet, found that the reason is that this file is in DOS mode editing, so the line is \ r \ n, so in the Linux environment can not be resolved, but fortunately the solution is very simple, just use vim to open this file input command:

: Set Ff=unix

After saving, re-run configure, found that PNG support has been opened, and finally can be happy to make.

Record the process of tossing and WEBP

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.