【问题标题】:MLT Move video upper?MLT 将视频上移?
【发布时间】:2017-06-27 23:41:58
【问题描述】:

不得不做这样的事情,但我找不到如何移动中间有点靠上的视频...

melt in.mp4 
-filter watermark:"title.jpg" composite.progressive=1 producer.align=centre composite.valign=top composite.halign=c
-filter watermark:"bottom.jpg" composite.progressive=1 producer.align=centre composite.valign=bottom composite.halign=c
-filter crop left=128 right=128 
-profile square_profile.txt -consumer avformat:"out.mp4" vcodec=libx264 vb=3500k ab=128k 

那么如何将居中的视频向上移动?找不到这样的过滤器...

【问题讨论】:

    标签: mlt


    【解决方案1】:

    “仿射”过滤器可用于更改视频帧的大小和位置: https://mltframework.org/plugins/FilterAffine/

    仿射过滤器实际上只是一个方便的包装器,它结合了黑色生产者(用于背景)和仿射过渡: https://mltframework.org/plugins/TransitionAffine/

    您可以通过在仿射滤镜上设置“transition.*”属性来修改仿射过渡属性。例如,要设置框架的大小和位置,请使用“transition.geometry”。

    melt in.mp4 -filter affine transition.geometry="-40/40:700x500" transition.distort=0 transition.fill=0 \
        -filter watermark:"bottom.jpg" composite.progressive=1 producer.align=centre composite.valign=bottom composite.halign=c \
        -filter watermark:"bottom.jpg" composite.progressive=1 producer.align=centre composite.valign=bottom composite.halign=c \
        -profile square_profile.txt -consumer avformat:"out.mp4" vcodec=libx264 vb=3500k ab=128k
    

    几何规范是:“X/Y:WxH”。因此,请根据您的需要进行设置。 X 和 Y 值可以为负数,以便裁剪掉您不想显示的部分。

    【讨论】:

    • 我有点困惑...个人资料 - 640x640(适用于 instagram)我看到您调整了地址标题 (title.jpg) 的大小,我需要将.mp4 移到更高一点。所以 in.mp4 -transition composite composite.geometry="-20/0:100%x100%" - 应该可以吗?
    • 对不起。我现在更好地理解了你的问题。请参阅我的更新答案。您将需要尝试几何值以获得所需的结果。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-03-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-03-13
    相关资源
    最近更新 更多