gpt4 book ai didi

php - 多个 shell_exec 到一个 shell_exec

转载 作者:行者123 更新时间:2023-12-04 23:00:35 27 4
gpt4 key购买 nike

有没有一种方法可以在一个 shell_exec 中缩短此命令?

shell_exec("$ffmpegPath  -i $inputPath -i $watermark -filter_complex overlay=10:10 $outPathOGG"); 

shell_exec("$ffmpegPath -i $inputPath -i $watermark -filter_complex overlay=10:10 $outPathMP4");

shell_exec("$ffmpegPath -i $inputPath -i $watermark -filter_complex overlay=10:10 $outPathWEBM");

像这样的东西:
shell_exec("$ffmpegPath  -i $inputPath -i $watermark -filter_complex overlay=10:10 $outPathWEBM,$outPathMP4,$outPathWEBM");

另外,使用 shell_exec 或 exec 来完成这项工作更好吗?

最佳答案

你可以试试

shell_exec("$ffmpegPath  -i $inputPath -i $watermark -filter_complex overlay=10:10 $outPathOGG & $ffmpegPath  -i $inputPath -i $watermark -filter_complex overlay=10:10 $outPathMP4 & $ffmpegPath  -i $inputPath -i $watermark -filter_complex overlay=10:10 $outPathWEBM");

这只是将 shell_execs 与命令之间的 & 登录结合起来。它应该工作。

关于php - 多个 shell_exec 到一个 shell_exec,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27984511/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com