在ffmpeg中以特定间隔添加一个滤色镜 [英] Adding a color filter at specific intervals in ffmpeg

查看:200
本文介绍了在ffmpeg中以特定间隔添加一个滤色镜的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找以ffmpeg的特定时间间隔将颜色过滤器添加到rtmp流中,例如每10秒钟10秒。我已经尝试了两种方法。第一个:

  -vfcolor=#8EABB8@0.9:480x208,select ='gte(t,10)* lte (t,20)'[color]; [in] [color] overlay [out]

这只流出选择指示的10秒钟,并应用滤色镜,而不是播放整个流,并将滤镜应用于20秒。



然后我了解到split和fifo,尝试这种方法:

  -vf[in] split [no-color],fifo,[with-颜色] overlay [out]; [no-color] fifo,select ='gte(t,10)* lte(t,20)'[with-color]
pre>

我希望这可以播放整个流,然后选择指定的10秒,以便我可以应用过滤器,但它和第一种方法一样,只是选择10秒,而不是整个流。



提前感谢

解决方案

作为此问题 dis蔡司,似乎没有办法将视频过滤器应用于视频流的特定时间段,不能将其分解成片段,应用过滤器和重组。如果您找到更好的方法,请分享。


I am looking to add the color filter to a rtmp stream in ffmpeg at specific time intervals, say for 10 seconds every 10 seconds. I have tried two approaches. The first:

-vf "color=#8EABB8@0.9:480x208,select='gte(t,10)*lte(t,20)' [color];[in][color] overlay [out]"

This streams only the 10 seconds indicated by the select and applies the color filter rather than playing the whole stream and applying the filter to just those 20 seconds.

I then learnt about split and fifo and tried this approach:

-vf "[in] split [no-color], fifo, [with-color] overlay [out]; [no-color] fifo, select='gte(t,10)*lte(t,20)' [with-color]"

I would expect this to play the entire stream, and then select the 10 seconds specified so that I can apply filters, but it does the same as first approach and just plays the 10 seconds selected rather than the entire stream.

Thanks in advance.

解决方案

As this question discusses, there doesn't appear to be a way to apply video filters to a specific time period of a video stream, short of splitting it into pieces, applying filters, and recombining. Please share if you find a better method.

这篇关于在ffmpeg中以特定间隔添加一个滤色镜的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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