douxian9943 2017-04-24 22:04
浏览 233
已采纳

从php shell_exec运行ffmpeg时如何添加空格

I am trying to insert text overlay, and can do this, but I cannot add spaces to the text.

ffmpeg -i meme.mp4 -y -vf drawtext='/Users/me/Library/Fonts/Champagne & Limousines.ttf:text='testtext': fontcolor=white: fontsize=24' -codec:a copy outputtexttest.mp4 2>&1

The error when I make testtext test text is:

Unable to find a suitable output format for 'text: fontcolor=white: fontsize=24' text: fontcolor=white: fontsize=24: Invalid argument

  • 写回答

1条回答 默认 最新

  • dpz1983 2017-04-24 22:11
    关注

    Add double quotes around the text, not single quotes like you have:

    echo shell_exec("$ffmpeg -i meme.mp4 -y -vf drawtext='/Users/me/Library/Fonts/Champagne & Limousines.ttf:text=''test    + infinity spaces :)   text'': fontcolor=white: fontsize=24' -codec:a copy outputtexttest.mp4 2>&1");
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料
  • ¥15 使用R语言marginaleffects包进行边际效应图绘制