ffmpeg调用 avformat_open_input失败,返回 -2
来源:互联网 发布:实时访客没有数据 编辑:程序博客网 时间:2024/06/16 03:08
系统环境ubuntu12.04,开发环境Qt
执行程序卡在如下代码段:
if(avformat_open_input(&pFormatCtx,filepath,NULL,NULL)!=0){//打开输入视频文件 printf("Couldn't open input stream.\n"); return -1; }
插入下面的代码分析
char buf[] = ""; int err_code = avformat_open_input(&pFormatCtx,filepath,NULL,NULL);//打开输入视频文件 av_strerror(err_code, buf, 1024); printf("Couldn't open file %s: %d(%s)\n",filepath, err_code, buf);打印出错误代码是-2,错误原因是no file or directory
我是将视频文件放在了Qt的工程目录下,但是找不到,于是我将视频移动到debug目录下,或者将当前路径视为debug路径时,编译正确,程序执行成功!
参考:http://www.360doc.com/content/14/0515/15/2306903_377849306.shtml
0 0
- ffmpeg调用 avformat_open_input失败,返回 -2
- ffmpeg调用 avformat_open_input失败,返回 -2
- ffmpeg avformat_open_input返回失败的解决办法
- ffmpeg avformat_open_input返回失败的解决办法
- ffmpeg avformat_open_input返回失败的解决办法
- ffmpeg avformat_open_input返回失败的解决办法
- FFMPEG-avformat_open_input
- FFMPEG-avformat_open_input
- FFMPEG-avformat_open_input
- FFmpeg avformat_open_input函数打开acc,h264失败的错误问题
- ffmpeg avformat_open_input详解
- FFmpeg图解:avformat_open_input()
- FFMPEG函数之avformat_open_input
- 解决avformat_open_input()不返回
- ffmpeg源代码分析之avformat_open_input
- FFmpeg源代码简单分析:avformat_open_input()
- ffmpeg设置avformat_open_input( )超时 -stimeout
- FFmpeg源代码简单分析:avformat_open_input()
- 《iOS Human Interface Guidelines》——Web View
- 剑指offer:和为S的连续正数序列
- 约数个数和(数论,莫比乌斯反演)BZOJ3994
- 多线程与双端队列结合使用,实现持久化任务(2)
- 单片机传递浮点数方法
- ffmpeg调用 avformat_open_input失败,返回 -2
- 繁星花落谁家(屠龙)算法和统计概率结论
- 前中后序遍历二叉树的非递归实现
- DOM操纵样式表
- 在非root环境下安装某ss软件
- ActionBar基本使用
- poj 1125 Floyd算法
- Appium实践:测试脚本结构优化
- HDU 3681 Prison Break - 状压dp【TSP】