问题描述
有人尝试过吗?
最佳做法是什么?
推荐答案
fms live流正在使用 rtmp rtmp
在这里,我们将整个流将整个流保存到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 **
尚未测试所有命令,需要修复,但给您一个很好的印象
问题描述
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