使用ffmpeg处理rtsp流URL时出现unkonwn命令失败 [英] unkonwn command failure occured when using ffmpeg to handle rtsp stream url

查看:119
本文介绍了使用ffmpeg处理rtsp流URL时出现unkonwn命令失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用ffmpeg从rtsp流中抓取图像,命令如下:

I want to use ffmpeg to grab a image from a rtsp stream,the command is as following:

ffmpeg -y -i rtsp://zigong.stream.xl02.cn:557/HongTranSvr?DevId=1b038d27-858c-46a1-b803-a2984af343df&Session=1b038d27-858c-46a1-b803-a2984af343df -vframes 1 do.jpg

,但使用bash:-vframes:unkonwn命令失败.我猜测可能是缺少软件包,所以我尝试使用.mp4视频而不是rtsp流:

but failed with bash:-vframes:unkonwn command. I guees it may be a lack of package,so I tried with a .mp4 video instead of rtsp stream:

ffmpeg -y -i hehe.mp4 -vframes 1 do.jpg

结果很好...

故障是否与我的rtsp流url有关?我可以通过VLC(视频播放器)显示它,从而可以播放...

Does the failure has something to do with my rtsp stream url? I can display it via VLC(a video player) so it's playable...

推荐答案

在URL周围加上引号:

Place quotes around the URL:

ffmpeg -y -i "rtsp://zigong.stream.xl02.cn:557/HongTranSvr?DevId=1b038d27-858c-46a1-b803-a2984af343df&Session=1b038d27-858c-46a1-b803-a2984af343df" -vframes 1 do.jpg

这篇关于使用ffmpeg处理rtsp流URL时出现unkonwn命令失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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