gpt4 book ai didi

使用 libwebp 错误编译 ffmpeg

转载 作者:行者123 更新时间:2023-12-04 22:48:09 36 4
gpt4 key购买 nike

所以我试图用--enable-libwebp编译ffmpeg。但我收到以下错误:

In file included from libavcodec/libwebpenc_animencoder.c:30:0:
/usr/include/webp/mux.h:101:13: error: expected identifier or ‘(’ before ‘int’
WEBP_EXTERN(int) WebPGetMuxVersion(void);
^~~
/usr/include/webp/mux.h:107:13: error: expected identifier or ‘(’ before ‘WebPMux’
WEBP_EXTERN(WebPMux*) WebPNewInternal(int);
^~~~~~~
/usr/include/webp/mux.h:120:13: error: expected identifier or ‘(’ before ‘void’
WEBP_EXTERN(void) WebPMuxDelete(WebPMux* mux);
^~~~
/usr/include/webp/mux.h:126:13: error: expected identifier or ‘(’ before ‘WebPMux’
WEBP_EXTERN(WebPMux*) WebPMuxCreateInternal(const WebPData*, int, int);
^~~~~~~
/usr/include/webp/mux.h:163:13: error: expected identifier or ‘(’ before ‘WebPMuxError’
WEBP_EXTERN(WebPMuxError) WebPMuxSetChunk(
^~~~~~~~~~~~
/usr/include/webp/mux.h:179:13: error: expected identifier or ‘(’ before ‘WebPMuxError’
WEBP_EXTERN(WebPMuxError) WebPMuxGetChunk(
^~~~~~~~~~~~
/usr/include/webp/mux.h:192:13: error: expected identifier or ‘(’ before ‘WebPMuxError’
WEBP_EXTERN(WebPMuxError) WebPMuxDeleteChunk(
^~~~~~~~~~~~
/usr/include/webp/mux.h:225:13: error: expected identifier or ‘(’ before ‘WebPMuxError’
WEBP_EXTERN(WebPMuxError) WebPMuxSetImage(
^~~~~~~~~~~~
/usr/include/webp/mux.h:245:13: error: expected identifier or ‘(’ before ‘WebPMuxError’
WEBP_EXTERN(WebPMuxError) WebPMuxPushFrame(
^~~~~~~~~~~~
/usr/include/webp/mux.h:263:13: error: expected identifier or ‘(’ before ‘WebPMuxError’
WEBP_EXTERN(WebPMuxError) WebPMuxGetFrame(
^~~~~~~~~~~~
...

我需要使用某个版本的 libwebp 吗?任何帮助将不胜感激。

最佳答案

我刚刚从 https://www.ffmpeg.org/download.html 下载了源代码

加载 webp 库

sudo apt install libwebp-dev

有版本
apt-cache policy libwebp-dev 
libwebp-dev:
Installed: 0.4.4-1
Candidate: 0.4.4-1

然后我使用了这个语法
./configure  --enable-libwebp 

make -j8 # on a quad core, else use -j4

sudo make install

一切都运行得很好......完成的disted二进制现在给出
ffmpeg -version
ffmpeg version N-90893-gcae6f80 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.9) 20160609
configuration: --enable-libwebp
libavutil 56. 17.100 / 56. 17.100
libavcodec 58. 19.100 / 58. 19.100
libavformat 58. 13.100 / 58. 13.100
libavdevice 58. 4.100 / 58. 4.100
libavfilter 7. 21.100 / 7. 21.100
libswscale 5. 2.100 / 5. 2.100
libswresample 3. 2.100 / 3. 2.100

我在 ubuntu 16.04 x86_64 上的位置

关于使用 libwebp 错误编译 ffmpeg,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50091883/

36 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com