Opened 7 hours ago
Last modified 5 hours ago
#70958 assigned enhancement
ffmpeg: add libwebp support
Reported by: | seamusdemora (Seamus) | Owned by: | mascguy (Christopher Nielsen) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.10.1 |
Keywords: | Cc: | dbevans (David B. Evans), jeremyhu (Jeremy Huddleston Sequoia) | |
Port: | ffmpeg |
Description (last modified by ryandesign (Ryan Carsten Schmidt))
I gather that 'libwebp' is not included with the 'ffmpeg' port. I found a recipe for converting an 'mp4' to a 'webp', but all I got for that was the error 'Unknown encoder 'libwebp.
I followed Google's advice & tried to build 'libwebp' following these instructions: https://developers.google.com/speed/webp/docs/compiling#building
But this did not work either. I got the exact same error message. FWIW, here's the command I was trying to use:
ffmpeg -i "JW-recording.mp4" \ -vf "fps=10,scale=720:-1:flags=lanczos" \ -vcodec libwebp -lossless 0 -compression_level 6 \ -q:v 50 -loop 0 \ -preset picture -an -vsync 0 JW-recording.webp ffmpeg version 4.4.4 Copyright (c) 2000-2023 the FFmpeg developers built with Apple clang version 14.0.3 (clang-1403.0.22.14.1) configuration: --prefix=/opt/local --cc=/usr/bin/clang --mandir=/opt/local/share/man --enable-audiotoolbox --disable-indev=jack --disable-libjack --disable-libopencore-amrnb --disable-libopencore-amrwb --disable-libxcb --disable-libxcb-shm --disable-libxcb-xfixes --enable-opencl --disable-outdev=xv --enable-sdl2 --disable-securetransport --enable-videotoolbox --enable-avfilter --enable-avresample --enable-fontconfig --enable-gnutls --enable-libass --enable-libbluray --enable-libdav1d --enable-libfreetype --enable-libfribidi --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-librsvg --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libzimg --enable-libzvbi --enable-lzma --enable-pthreads --enable-shared --enable-swscale --enable-zlib --enable-libaom --enable-libsvtav1 --arch=arm64 --enable-gpl --enable-libvidstab --enable-libx264 --enable-libx265 --enable-libxvid --enable-postproc libavutil 56. 70.100 / 56. 70.100 libavcodec 58.134.100 / 58.134.100 libavformat 58. 76.100 / 58. 76.100 libavdevice 58. 13.100 / 58. 13.100 libavfilter 7.110.100 / 7.110.100 libavresample 4. 0. 0 / 4. 0. 0 libswscale 5. 9.100 / 5. 9.100 libswresample 3. 9.100 / 3. 9.100 libpostproc 55. 9.100 / 55. 9.100 [libdav1d @ 0x12e815e00] libdav1d 1.4.3 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'JW-recording.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomav01iso2mp41 encoder : Lavf58.76.100 Duration: 00:00:05.50, start: 0.000000, bitrate: 106 kb/s Stream #0:0(und): Video: av1 (Main) (av01 / 0x31307661), yuv420p(tv, progressive), 460x332 [SAR 1:1 DAR 115:83], 104 kb/s, 10 fps, 10 tbr, 10240 tbn, 10240 tbc (default) Metadata: handler_name : VideoHandler vendor_id : [0][0][0][0] Unknown encoder 'libwebp' <===ERROR MESSAGE
I did set the environment variable for 'LD_LIBRARY_PATH' as follows: 'export LD_LIBRARY_PATH=/usr/local/lib/', but that also didn't help. I even ran the above command using the following (in the 3rd line of the command above):
-vcodec /usr/local/lib/libwebp -lossless 0 -compression_level 6 \
I'm afraid I've reached the limits of my ability to troubleshoot this issue; posting here looking for some help!
Change History (2)
comment:1 Changed 5 hours ago by ryandesign (Ryan Carsten Schmidt)
Cc: | dbevans jeremyhu added |
---|---|
Description: | modified (diff) |
Keywords: | ffmpeg libwebp removed |
Milestone: | MacPorts 2.10.2 |
Owner: | set to mascguy |
Status: | new → assigned |
Summary: | ffmpeg - how to incorporate libwebp? → ffmpeg: add libwebp support |
Type: | request → enhancement |
comment:2 Changed 5 hours ago by seamusdemora (Seamus)
Ryan,
I should have mentioned that I also installed webp
using MacPorts... but that didn't prevent the error with ffmpeg
.
~S
You don't have to compile webp yourself; there's already a port for it in MacPorts. The maintainers of the ffmpeg port would just have to modify it to use webp.
You should not set
LD_LIBRARY_PATH
. Any instructions you see advising you to do so are probably for Linux and inapplicable to macOS.