编写源代码 ffmpeg_log.c
#include <stdio.h>
#include <libavutil/log.h>
int main(int argc, char *argv[])
{
av_log_set_level(AV_LOG_DEBUG);
av_log(NULL, AV_LOG_DEBUG, "hello world!\n");
return 0;
}
使用clang 编译器编译源代码生成可执行文件
进入源文件所在目录,执行下面命令:
clang -g -o ffmepg_log ffmpeg_log.c `pkg-config --cflags --libs libavutil`
image.png
成功后,回生成一个ffmpeg_log文件,我把名字
ffmpeg打错了,打成了 ffmepg 不改了
image.png
运行ffmpeg_log程序,我把名字打错了,不改了
image.png











网友评论