FFmpeg 出现错误 Invalida data found when processing input
2016-04-08 09:13
8373 查看
1.检查文件路径是否正确
2.命令行中试试ffmpeg -i filaename E:\image%d.jpg 如果可行,说明你的ffmpeg库没问题
3、若不行,试试我下面的方法:(强制指定输入视频的格式)
//原来的代码
int errocode=avformat_open_input(&pFormatCtx,filepath,NULL,NULL);
//修改后的代码
//添加这句话AVInputFormat* iformat=av_find_input_format("h264");(因为我的视频时H.264压缩的,这句话为强制指定视频的输入格式。估计我的视频压缩不标准或是其他什么原因导致了pFormatCtx无法获取正确的AVInputFormat)
int errocode=avformat_open_input(&pFormatCtx,filepath,iformat,NULL);
2.命令行中试试ffmpeg -i filaename E:\image%d.jpg 如果可行,说明你的ffmpeg库没问题
3、若不行,试试我下面的方法:(强制指定输入视频的格式)
//原来的代码
int errocode=avformat_open_input(&pFormatCtx,filepath,NULL,NULL);
//修改后的代码
//添加这句话AVInputFormat* iformat=av_find_input_format("h264");(因为我的视频时H.264压缩的,这句话为强制指定视频的输入格式。估计我的视频压缩不标准或是其他什么原因导致了pFormatCtx无法获取正确的AVInputFormat)
int errocode=avformat_open_input(&pFormatCtx,filepath,iformat,NULL);
相关文章推荐
- c++11 + SDL2 + ffmpeg +OpenAL + java = Android播放器
- Managed Media Aggregation using Rtsp and Rtp
- [总结]FFMPEG视音频编解码零基础学习方法
- 利用Ffmpeg获得flv视频缩略图和视频时间的代码
- codeigniter教程之上传视频并使用ffmpeg转flv示例
- PHP使用ffmpeg给视频增加字幕显示的方法
- PHP+FFMPEG实现将视频自动转码成H264标准Mp4文件
- 快速解决Android平台移植ffmpeg的一些问题
- java调用ffmpeg实现视频转换的方法
- python+ffmpeg视频并发直播压力测试
- [总结]FFMPEG视音频编解码零基础学习方法
- ffmpeg的headers设置
- ffmpeg从rtsp抓流存flv[c# NReco.VideoConverter flv]
- CentOs 下安装 ffmpeg 以及添加 ogg 音频支持
- FFmpeg音视频编解码实践总结
- ffmpeg 视频压缩 转换
- linux ffmpeg编译配置安装详解
- 解密FFmpeg播放track mode控制
- [学习与生活]视频开发网
- FFMPEG SDK 开发介绍