欢迎访问 生活随笔!

生活随笔

当前位置: 首页 > 编程资源 > 编程问答 >内容正文

编程问答

avformat_open_input返回-1094995529 “Invalid data found when processing input“

发布时间:2024/3/12 编程问答 48 豆豆
生活随笔 收集整理的这篇文章主要介绍了 avformat_open_input返回-1094995529 “Invalid data found when processing input“ 小编觉得挺不错的,现在分享给大家,帮大家做个参考.

avformat_open_input返回-1094995529

    • avformat_open_input() 返回"Invalid data found when processing input" 错误码为-1094995529

avformat_open_input() 返回"Invalid data found when processing input" 错误码为-1094995529

遇到这个问题时,我一脸黑人问号。由于项目限制,之前在使用ffmpeg项目时,configure编译选项没有做筛选,导致编译出来的库十分巨大。后面发现库包含的许多功能都是用不上的,就把没必要的功能都去除了,但是当重新运行程序段时发现在打开输入流时一直失败,定位到是 avformat_open_input() 这个函数这里出的问题。网上查到的资料也只是说要添加

av_register_all();
avcodec_register_all()

但是这两个接口已经废弃了啊!!于是又查了很多资料,最终看到别人遇到类似的错误:
FFmpeg Invalid data found when processing input.
里面提到重新编译就OK了,但是也没给出具体细节。后面自己摸索,终于是解决了这个问题。
编译的时候添加上
–enable-demuxers --enable-parsers --enable-ffprobe**

这三个选项就可以了,具体是什么原因引起的,我没继续去深入了解,简单的记录一下,免得以后又遇到这个问题。ffmpeg中其他函数的问题也可能是因为编译时某些功能被去掉引起的,出错的时候要考虑这方面的原因。


红色部分由于有换行,没有执行这些条件

总结

以上是生活随笔为你收集整理的avformat_open_input返回-1094995529 “Invalid data found when processing input“的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。