ffmpeg
ffmpeg copied to clipboard
cwebp has no png support
https://github.com/jrottenberg/ffmpeg/commit/250a2c8d238ac6a3d4fb4c8becad15592658f8ed added webp support but libpng-dev is not available during build which broke it for my case.
Error! Cannot read input picture file 'images-src/author3.png'
PNG support not compiled. Please install the libpng development package before building.
In our case I used the jrottenberg/ffmpeg:4.1-alpine
image for image converting (besides the video one) but now it broke for me since it gets precedence over the one I installed via apk add libwebp-tools
. The system packages has most common format support.
I will post a workaround but I suggest improving the webp part, multi stage build might be an option to avoid bloating the image with build dependencies.
My work around for now is just using the absolute path to the os package cwebp /usr/bin/cwebp
instead of the self compiled /usr/local/bin/cwebp
That makes sense, to use the system package for now and be explicit on the binary , not relying on PATH.
Curious to know what we are missing on the cwebp binary But I can imagine we can tune it a bit ;-)
https://github.com/jrottenberg/ffmpeg/blob/master/templates/Dockerfile-run#L104
@jrottenberg actually the message is quite clear about what is missing. ./configure
should find available development libraries as soon they are installed. If using OS packages it would be libpng-dev
etc. it bloats the image and the package names might be OS/package manager specific. Another option is to download the sources for libpng etc additionally and pass the paths to ./configure
.
No no I get it but if it's missing png support we could miss other , so better get a list of flags to pass to the configure while we are at it.
https://git.alpinelinux.org/aports/tree/main/libwebp/APKBUILD?id=0e776a422ea9019bcbcb054cf5745e5e3010fab4#n21 https://developers.google.com/speed/webp/docs/compiling#compiling_on_unix-like_platforms are a good start
That are good sources, would love to see it inside the image by default :) Saves one step in my pipeline
https://github.com/jrottenberg/ffmpeg#contribute
I would love to add you as contributor
@jrottenberg hope to find some time soon
Sorry, for not following up :/ After I faced issues building the images via the instructions from the README.md
, I lost the motivation since I have a working work-around. (I think with some theora related stuff)