ffmpeg日志回调添加
来源:互联网 发布:csm算法 编辑:程序博客网 时间:2024/06/07 18:43
如果想抓取ffmpeg日志相关信息并作相关处理,可以用ffmpeg日志回调
统计H264解码错误
static int ffmpeg_decoder_error = 0;static void ffmpeg_log_callback(void *ptr, int level, const char *fmt, va_list vl){ if (level > av_log_get_level()) return; char temp[1024]; vsprintf(temp, fmt, vl); size_t len = strlen(temp); if (len > 0 && len < 1024&&temp[len - 1] == '\n') { temp[len - 1] = '\0'; } AVClass* avc = ptr ? *(AVClass **)ptr : NULL; const char *module = avc ? avc->item_name(ptr) : "NULL"; if (strstr(module, "264")) { if (strstr(temp, "error")) { ffmpeg_decoder_error++; } }}av_log_set_level(AV_LOG_INFO);av_log_set_callback(ffmpeg_log_callback);样例ffmpeg_decoder_error = 0;ret = avcodec_decode_video2(c, frame, &got_picture, &pkt);这样可以粗略计算H264解码失败个数 但是不太准确
1 1
- ffmpeg日志回调添加
- ffmpeg添加自己的日志
- ffmpeg主函数入口及添加自己的日志函数
- ffmpeg--日志
- FFMPEG 日志输出控制
- ffmpeg-日志系统
- FFmpeg日志相关
- ffmpeg 日志系统av_log()
- 使用ffmpeg添加logo
- 利用ffmpeg添加水印
- ffmpeg 调试信息 添加
- FFMPEG 添加水印
- ffmpeg 视频添加水印
- FFMPEG水印添加
- ffmpeg 添加水印LOGO
- 【FFMPEG】ffmpeg 中添加264支持
- FFMPEG 日志 锁 内存技巧
- 为ffmpeg添加自定义滤镜
- Struts2笔记
- Bitmap如何高效加载图片
- c++常见题目,编写string类
- bzoj 4176: Lucas的数论 (反演)
- Android Studio集成友盟APP统计
- ffmpeg日志回调添加
- 强化学习读书笔记
- nodeJS socket 多个房间的聊天室
- 总结的一些简单实用的小方法
- 初识Shiro
- Spring组合属性
- Android Matrix的用法总结
- Opencv的Kalman滤波器函数二
- 初识linux