ffplay播放依赖SDL库,SDL(Simple DirectMedia Layer)是一套开放源代码的跨平台多媒体开发库。首先编译SDL然后再编译ffmpeg。
- SDL编译安装 ./configure --prefix=/xxx && make && make install
- ffmpeg编译安装./configure --prefix=/opt/AFB/ffmpeg/dir_install --enable-debug --disable-stripping --disable-optimizations --disable-doc --disable-ffmpeg --disable-ffprobe --disable-ffserver && make && make install && cp ./*/*.a* /opt/AFB/ffmpeg/dir_install/lib/(copy库文件才能使用gdb debug,原因不详 )
- 测试播放 ./ffplay -report -v info http://live.xmcdn.com/live/1065/64.m3u8
日志消息-v 选项说明
const struct { const char *name; int level; } log_levels[] = {
{ "quiet" , AV_LOG_QUIET },
{ "panic" , AV_LOG_PANIC },
{ "fatal" , AV_LOG_FATAL },
{ "error" , AV_LOG_ERROR },
{ "warning", AV_LOG_WARNING },
{ "info" , AV_LOG_INFO },
{ "verbose", AV_LOG_VERBOSE },
{ "debug" , AV_LOG_DEBUG },
{ "trace" , AV_LOG_TRACE },
};
#define AV_LOG_QUIET -8
#define AV_LOG_PANIC 0
#define AV_LOG_FATAL 8
#define AV_LOG_ERROR 16
#define AV_LOG_WARNING 24
#define AV_LOG_INFO 32
#define AV_LOG_VERBOSE 40
#define AV_LOG_DEBUG 48
#define AV_LOG_TRACE 56
时间: 2024-11-06 14:18:07