ffmpeg中vf与filter_complex的区别

ffmpeg中vf与filter_complex有什么区别

当我们通过ffmpeg使用简单的滤镜的时候,可以通过-vf与-af来实现滤镜效果:

 _______        _____________        _______        ________
|       |      |             |      |       |      |        |
| input | ---> | deinterlace | ---> | scale | ---> | output |
|_______|      |_____________|      |_______|      |________|

当我们在处理复杂的滤镜场景的是,就需要使用-filter_complex参数来实现复杂的特效场景:
其中 -lavfi 与 -filter_complex 效果是一样的

 _________
|         |
| input 0 |\                    __________
|_________| \                  |          |
             \   _________    /| output 0 |
              \ |         |  / |__________|
 _________     \| complex | /
|         |     |         |/
| input 1 |---->| filter  |\
|_________|     |         | \   __________
               /| graph   |  \ |          |
              / |         |   \| output 1 |
 _________   /  |_________|    |__________|
|         | /
| input 2 |/
|_________|

更多请参考
http://ffmpeg.org/ffmpeg-all.html#Filtering

发布了141 篇原创文章 · 获赞 107 · 访问量 30万+

猜你喜欢

转载自blog.csdn.net/ternence_hsu/article/details/103876842