【问题标题】:Combining two ffmpeg commands into single command将两个 ffmpeg 命令组合成一个命令
【发布时间】:2019-06-18 20:12:23
【问题描述】:

我想将两个 ffmpeg 命令组合成一个 ffmpeg 命令。

exec("ffmpeg -i mimic/api/video/1560754087943.mp4 -i logo.png -filter_complex"." overlay=20:20"." topleft.mp4");



exec('ffmpeg -i topleft.mp4 -vf drawtext="fontfile=ARIBLK.ttf: text=sonukh3921: fontcolor=white: fontsize=20: x=20: y=65" output_video.mp4');

这是否可以将第一个命令的输出用于第二行,而不使用两个单独的命令?

【问题讨论】:

    标签: ffmpeg ffmpeg-php


    【解决方案1】:

    以下单个命令仅适用于您:

    ffmpeg \
    -i mimic/api/video/1560754087943.mp4 \
    -i logo.png \
    -filter_complex "overlay=20:20[video];[video]drawtext=fontfile=ARIBLK.ttf:text=sonukh3921:fontcolor=white:fontsize=20:x=20:y=65" \
    output_video.mp4
    

    【讨论】:

    • exec('ffmpeg \ -i 1.mp4 \ -i logo.png \ -filter_complex "overlay=20:20[video];[video]drawtext=fontfile=ARIBLK.ttf:text= sonukh3921:fontcolor=white:fontsize=20:x=20:y=65" \ output_video.mp4');
    • no " 和 \ 在命令行字符串中,它用于 bash 命令行,您可以尝试 exec('ffmpeg -i 1.mp4 -i logo.png -filter_complex overlay=20:20[video ];[视频]drawtext=fontfile=ARIBLK.ttf:text=sonukh3921:fontcolor=white:fontsize=20:x=20:y=65 output_video.mp4');
    猜你喜欢
    • 1970-01-01
    • 2014-08-15
    • 1970-01-01
    • 2014-08-13
    • 2022-01-07
    • 2012-07-22
    • 2021-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多