ffmpeg:ffmpeg拉流rtsp报错method SETUP failed: 454 Session Not Found

报错

试用ffmpeg请求rtsp流时,UDP端口时无法返回

[rtsp @ 0x5650696e2580] UDP timeout, retrying with TCP
[rtsp @ 0x5650696e2580] method SETUP failed: 454 Session Not Found
[rtsp @ 0x5650696e2580] Could not find codec parameters for stream 0 (Video: h264, none): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options

解决

强制将ffmpeg对rtsp拉流时试用tcp协议,目前有效,加上-rtsp_transport tcp参数

ffmpeg -rtsp_transport tcp -i 'rtsp://admin:admin123!@192.168.15.2:554/cam/realmonitor?channel=17&subtype=0' -an -c:v copy -f mp4 -movflags +frag_keyframe+empty_moov+default_base_moof pipe:1

但是性能上是存在问题的,毕竟tcp需要多次握手,具体UDP为什么无法使用,问题还在排查中。

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值