ffmpeg返回“方法设置失败:找不到404". [英] ffmpeg returns "method SETUP failed: 404 Not Found"

查看:1246
本文介绍了ffmpeg返回“方法设置失败:找不到404".的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在使用ffmpeg(版本为ffmpeg-20190628-098ab93-win32-static)从Win 10系统上的摄像机RTSP流中获取快照.在某些相机上,我们收到此错误:

We're using ffmpeg (build ffmpeg-20190628-098ab93-win32-static) to take a snapshot from camera RTSP streams on a Win 10 system. On some cameras, we're getting this error:

[rtsp @ 06813ac0] method SETUP failed: 404 Not Found
rtsp://username:password@example.com: Server returned 404 Not Found

这是我们使用的示例命令:

Here's an example command we use:

ffmpeg -y -i rtsp://username:password@example.com -vframes 1 -pix_fmt yuvj420p 
  -vf select='eq(pict_type\,I)' -q:v 1 _test.jpg

但是,VLC可以从同一台计算机加载相同的流(尽管我们不能使用VLC).此外,我们还为ffmpeg打开了防火墙(它弹出了两个防火墙对话框,我们允许它通过).

However, VLC can load the same stream (we can't use VLC, though) from the same machine. Additionally, we've opened the firewall to ffmpeg (it popped up the two firewall dialogs and we allowed it through).

我们发现了有关DESCRIBE错误的帖子,但没有有关SETUP的帖子.任何帮助表示赞赏.谢谢.

We've found posts on the DESCRIBE error but nothing on SETUP. Any help is appreciated. Thank you.

更新:在VLC中,RTSP流出于某种原因两次要求提供凭据.想知道那是原因.

Update: In VLC, that RTSP stream asks for credentials twice for some reason. Wondering if that's the cause.

推荐答案

解决方案是@AmitSharma在此处:需要将RTSP地址用双引号引起来.

The solution was here by @AmitSharma: We needed to wrap the RTSP address in double-quotes.

这行不通:

ffmpeg -y -i rtsp://username:password@example.com -vframes 1 -pix_fmt yuvj420p 
  -vf select='eq(pict_type\,I)' -q:v 1 _test.jpg

我们使用了它,它就像一个魅力:

We used this and it worked like a charm:

ffmpeg -y -i "rtsp://username:password@example.com" -vframes 1 -pix_fmt yuvj420p 
  -vf select='eq(pict_type\,I)' -q:v 1 _test.jpg

这篇关于ffmpeg返回“方法设置失败:找不到404".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆