您的位置:首页 > 其它

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);
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  ffmpeg