ffmpeg捕获当前帧并覆盖图像输出文件 [英] ffmpeg capture current frame and overwrite the image output file

查看:431
本文介绍了ffmpeg捕获当前帧并覆盖图像输出文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图每秒钟(也可能是每1分钟)从RTSP流url中提取图像文件并覆盖此图像文件.

I am trying to extract the image file from a RTSP stream url every second (could be every 1 min also) and overwrite this image file.

我下面的代码有效,但它输出到多个图像jpg文件:img1.jpg, img2.jpg, img3.jpg...

my below code works but it outputs to multiple image jpg files: img1.jpg, img2.jpg, img3.jpg...

ffmpeg -i rtsp://IP_ADDRESS/live.sdp -f image2 -r 1 img%01d.jpg

如何在Linux中使用ffmpeg或bash脚本覆盖同一图像文件,同时以不高的频率(例如1分钟或10秒)连续提取图像?

How to use ffmpeg or perhaps bash scripts in Linux to overwrite the same image file while continuously extract the image at a NOT high frequecy, say 1 min or 10 sec?

推荐答案

以下命令行应该对您有用.

Following command line should work for you.

ffmpeg -i rtsp://IP_ADDRESS/live.sdp -f image2 -updatefirst 1 img.jpg

这篇关于ffmpeg捕获当前帧并覆盖图像输出文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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