ffmpeg returns “method SETUP failed: 404 Not Found” [duplicate]

落花浮王杯 提交于 2019-12-20 02:53:08

问题


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

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).

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

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


回答1:


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

This didn't work:

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


来源:https://stackoverflow.com/questions/56808123/ffmpeg-returns-method-setup-failed-404-not-found

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!