FFmpeg 出现错误 Invalida data found when processing input
生活随笔
收集整理的這篇文章主要介紹了
FFmpeg 出现错误 Invalida data found when processing input
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
1.檢查文件路徑是否正確
2.命令行中試試ffmpeg -i filaename E:\image%d.jpg ? ?如果可行,說明你的ffmpeg庫沒問題
3、若不行,試試我下面的方法:(強(qiáng)制指定輸入視頻的格式)
//原來的代碼int errocode=avformat_open_input(&pFormatCtx,filepath,NULL,NULL);
//修改后的代碼
//添加這句話AVInputFormat* iformat=av_find_input_format("h264");(因?yàn)槲业囊曨l時H.264壓縮的,這句話為強(qiáng)制指定視頻的輸入格式。估計我的視頻壓縮不標(biāo)準(zhǔn)或是其他什么原因?qū)е铝藀FormatCtx無法獲取正確的AVInputFormat)
int errocode=avformat_open_input(&pFormatCtx,filepath,iformat,NULL);
總結(jié)
以上是生活随笔為你收集整理的FFmpeg 出现错误 Invalida data found when processing input的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: uniApp学习(8)搜索框的创建和自动
- 下一篇: Linux多进程编程