从不断变化的静态图片网址生成带有ffmpeg的电影? [英] Generate a movie with ffmpeg from a changing still image url?
问题描述
我需要从指向图像的HTTP url创建带有ffmpeg的电影/流.这张图片每秒更新1次.
I need to create a movie/stream with ffmpeg from a HTTP url that points to an image. This image gets updated 1 time per second.
我已经知道如何使用ffmpeg命令行从MPEG-4转换为flv,但是现在我需要从已更新的静止图像开始.例如,我希望ffmpeg每秒1次获取"网址.
I already know how to convert from MPEG-4 to flv for example using the ffmpeg command line, but now I need to start from this still image that gets updated. I would like ffmpeg to 'GET' the url 1 time per second for example.
致谢
Wim
推荐答案
所需的命令行选项是 -loop_input
.我目前正在使用此命令行执行此操作:
The command line option needed is -loop_input
. I am currenly using this command line to do it:
ffmpeg -loop_input -analyzeduration 0 -r 3 -i http://ipaddress/current.jpg -an -re -copyts -f flv output.flv
-loop_input
指示ffmpeg以输入帧速率(在此示例中为3 fps)读取给定URL上的jpg. -analyzeduration 0
将加快启动速度,并更快地显示电影的第一帧.输出可以是任何东西,在这里的示例中,它是Flash电影,但也可以是ffmpeg支持的任何东西.
The -loop_input
instructs ffmpeg to read the jpg on the given URL at the input frame rate (3 fps in this example). The -analyzeduration 0
will give a quicker startup and show the first frame of your movie faster. The output can be anything, in the example here, it is a flash movie, but it can be anything ffmpeg supports.
这篇关于从不断变化的静态图片网址生成带有ffmpeg的电影?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!