是否有可能从FMS的实时流中检索到图像帧?[英] Is it possible to retrieve frames as images out of FMS live stream?

本文是小编为大家收集整理的关于是否有可能从FMS的实时流中检索到图像帧?的处理/解决方法,可以参考本文帮助大家快速定位并解决问题,中文翻译不准确的可切换到English标签页查看源文。

问题描述

有人尝试过吗?

最佳做法是什么?

推荐答案

fms live流正在使用 rtmp rtmp

复制-vcodec副本-y *捕获***.flv**

在这里,我们将整个流将整个流保存到FLV文件,这是Flash的静态电影文件格式,因此可以始终保留所有RTMP音频和视频编解码器.

您可以提取所需的任何帧,例如

ffmpeg -i * ** starttime -vframes 1 -f Impaim2 -vcodec mjpeg *捕获***.

如果您雄心勃勃,并且确切地知道要提前捕获的时间偏移和间隔,则可以立即执行这两个步骤,例如每秒一帧:

ffmpeg -i rtmp://*** server/path*** - r 1 -f image2 -vcodec mjpeg *捕获的***%d.jp.jpg **

尚未测试所有命令,需要修复,但给您一个很好的印象

本文地址:https://www.itbaoku.cn/post/2091190.html

问题描述

Has anyone tried this ?

What's the best practice for this?

推荐答案

FMS live streams are using the RTMP protocol:

ffmpeg -i rtmp://***server/path* **-acodec copy -vcodec copy -y *captured***.flv**

Here, we are saving the whole stream to an FLV file, which is Flash's static movie file format and so can always preserve all RTMP audio and video codecs without conversion.

You can then extract any frames you want, e.g.

ffmpeg -i *captured***.flv -s** starttime -vframes 1 -f image2 -vcodec mjpeg *captured***.jpg**

If you are ambitious and know exactly what time offsets and intervals you want to capture in advance, you can do both steps at once, e.g. one frame every second:

ffmpeg -i rtmp://***server/path* **-r 1 -f image2 -vcodec mjpeg *captured***%d.jpg**

All commandlines have not been tested, will need fixing but give you a good impression