Generate a movie with ffmpeg from a changing still image url?

我与影子孤独终老i 提交于 2020-12-04 12:48:19

问题


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.

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.

regards,

Wim


回答1:


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

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.



来源:https://stackoverflow.com/questions/5026699/generate-a-movie-with-ffmpeg-from-a-changing-still-image-url

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!