FFMPEG: [ 出错调试 ] >avformat_open_input调用失败

文章描述了一种特定的出错情况,即无法打开文件test.mp4,错误代码表示协议未找到。用户检查了可用协议列表,并发现file协议缺失。为了解决问题,建议在配置时通过--enable-protocol=file添加file协议支持。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

出错信息如下:

Couldn't open file test.mp4: -1330794744(Protocol not found)

协议没有找到, 先看下有哪些协议

 ./configure  --list-protocols
async                   http                    libssh                  rtmpts
bluray                  httpproxy               libzmq                  rtp
cache                   https                   md5                     sctp
concat                  icecast                 mmsh                    srtp
crypto                  libamqp                 mmst                    subfile
data                    librtmp                 pipe                    tcp
ffrtmpcrypt             librtmpe                prompeg                 tee
ffrtmphttp              librtmps                rtmp                    tls
file                    librtmpt                rtmpe                   udp
ftp                     librtmpte               rtmps                   udplite
gopher                  libsmbclient            rtmpt                   unix
hls                     libsrt                  rtmpte

因为test.mp4存在磁盘里, 所以先在配置时把file协议加上

--enable-protocol=file

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值