FFmpeg - 无法为FONTCONFIG_FILE找到合适的输出格式

时间:2017-05-28 09:19:32

标签: android ffmpeg

我使用下面的ffmpeg命令在视频上绘制文字 -

String path=getFilesDir()+"/fonts.conf";
String[] complexCommand ={"-i", inputFilePath,"FONTCONFIG_FILE="+path,"-vf","drawtext=fontfile=/assets/fonts/formataregular.otf: \\text='Stack Overflow: fontcolor=white: fontsize=24: box=1: boxcolor=black@0.5: boxborderw=5: x=(w-text_w)/2: y=(h-text_h)/2'","-codec:a","copy",outputFilePath};

我正在使用WritingMinds/ffmpeg-android并且我已按照指示 -

  

如果您想使用FONTCONFIG,则需要指定自定义   fontconfig配置文件(例如 - “FONTCONFIG_FILE = / sdcard / fonts.conf   ./ffmpeg --version“,其中/sdcard/fonts.conf是你的位置   FONTCONFIG配置文件)

我的配置文件存储在名为fonts.conf

的设备的内部存储中

我收到以下错误 -

  

无法找到合适的输出格式   'FONTCONFIG_FILE = /数据/数据/ videoeditor.bhuvnesh.com.ffmpegvideoeditor /文件/ fonts.conf'                                                                                         FONTCONFIG_FILE = /数据/数据/ videoeditor.bhuvnesh.com.ffmpegvideoeditor /文件/ fonts.conf:   参数无效

我也尝试过路径 -

  File dir=Environment.getExternalStorageDirectory();
  String path=dir.getAbsolutePath()+"/fonts.conf";

我哪里错了?

0 个答案:

没有答案